Are dynamic padding and smart batching in the library?

Hi,

This video makes it quite clear: What is dynamic padding? - YouTube

In order to use dynamic padding in combination with the Trainer, one typically postpones the padding, by only specifying truncation=True when preprocessing the dataset, and then using the DataCollatorWithPadding when defining the data loaders, which will dynamically pad the batches.

2 Likes