Hi @valhalla
Thank you for your detailed explanation!
Now I understand that:
_encode does the same work as collate_fn, but _encode is used with Seq2SeqTrainer which supports TPU, and preparing the labels and decoder_input_ids is also done by this method.
If I want to use Seq2SeqTrainer, I should use Seq2SeqDataCollator (there is a possibility I should use collate_fn when I have to do something without using Seq2SeqTrainer).
Thank you again for your help!
yusukemori