Hi all,
The documentation says: The tokenizer used to preprocess the data. If provided, will be used to automatically pad the inputs the maximum length when batching inputs, and it will be saved along the model to make it easier to rerun an interrupted training or reuse the fine-tuned model.
If I understand it correctly, the library itself applies bucketing to the training data, right ? With bucketing I mean that each batch will be extended to the maximum length in that particular batch. I want to use this feature rather than padding everything to the global maximum length(of all samples). That’s why when I create the input encodings for train_dataset and eval_dataset, I set the truncation and padding to False.
In this case the training works but the validation throws and error. Saying that: RuntimeError: Sizes of tensors must match except in dimension 0. Got 56 and 28 in dimension 1 (The offending index is 1)
I actually do not exactly understand the error. Because my evaluation batch size is 1. So regardless of the size, it should have worked I think.
Does anyone have an idea what it is going on here ?