Skip to content

Glossary: NLP with Transformers

Data collator

Also written: DataCollatorWithPadding, DataCollatorForTokenClassification, collator

Code that builds each training batch from a list of rows. It pads them to the longest in the batch and renames `label` to `labels`.

Where the book teaches it

Related terms

Padding, truncation