Hi,
Does the GPU Memory usages vary with the size of the dataset? I am experimenting with the code from here.
  

      gist.github.com
  

  
    https://gist.github.com/jiahao87/50cec29725824da7ff6dd9314b53c4b3 4

  pegasus_fine_tune.py
  """Script for fine-tuning Pegasus
Example usage:
  # use XSum dataset as example, with first 1000 docs as training data
  from datasets import load_dataset
  dataset = load_dataset("xsum")
  train_texts, train_labels = dataset['train']['document'][:1000], dataset['train']['summary'][:1000]
  
  # use Pegasus Large model as base for fine-tuning
  model_name = 'google/pegasus-large'
  train_dataset, _, _, tokenizer = prepare_data(model_name, train_texts, train_labels)
    This file has been truncated. show original




  

  
    
    
  

  


I observed the GPU memory varies (not proportional to) the size of the dataset. Trying to understand why? Anyone would help explain?