I found an oversight when I was running through the transformers translation examples, wanted to let you know how to fix.
Page: https://huggingface.co/docs/transformers/tasks/translation
Correction:
Specify model
In the pytorch example of collating the data, either specify the model beforehand:
model = "t5-small"
data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=model)
or more precise:
data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model="t5-small")