Where to set the Evaluation Batch Size in Trainer

Hi, I am training a model on colab with the trainer class. Training is fine. However I am running into the problem that I get a CUDA out of memory error and I am seeing the trainer uses evaluation of batch size = 8 even though I have a batch size of 2.

I did not see a parameter that I can set to change it.
Is my only option to subclass the Trainer class?

Thanks for any tips and help!!

The default TrainingArguments have the following two options, for training and evaluation respectively. So you’ll need the latter.

1 Like

Thank you so much! I was looking through the arguments in the docs but this I have missed! thanks a lot!