Yup the data collator can take a batch as input and apply the padding
I don’t have a code example but you can check the DataCollatorWithPadding that does tokenization + padding for example: Data Collator
Yup the data collator can take a batch as input and apply the padding
I don’t have a code example but you can check the DataCollatorWithPadding that does tokenization + padding for example: Data Collator