The TrainerForConditionalGeneration and EvaluatorForConditionalGeneration lacked default generation length parameter, leading to crashes during MBART finetuning since the model's max length is 1024. This pull request addresses the issue by setting default generation max input and target length parameters.
Changes
An additional max_input_length parameter has been added to TrainerForConditionalGeneration and EvaluatorForConditionalGeneration. This parameter has been set according to the generation configuration.
Description
The
TrainerForConditionalGeneration
andEvaluatorForConditionalGeneration
lacked default generation length parameter, leading to crashes during MBART finetuning since the model's max length is 1024. This pull request addresses the issue by setting default generation max input and target length parameters.Changes
An additional max_input_length parameter has been added to
TrainerForConditionalGeneration
andEvaluatorForConditionalGeneration
. This parameter has been set according to the generation configuration.