Hi sgugger, Thanks for the advice, I just tried the same code from How to fine-tune a model on translation 4
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)

batch_size = 16

args = Seq2SeqTrainingArguments(

    "test-translation",

    evaluation_strategy = "epoch",

    learning_rate=2e-5,

    per_device_train_batch_size=batch_size,

    per_device_eval_batch_size=batch_size,

    weight_decay=0.01,

    save_total_limit=3,

    num_train_epochs=1,

    predict_with_generate=True,

    fp16=True,

    push_to_hub=True,

    push_to_hub_model_id=f"{model_checkpoint}-finetuned-{source_lang}-to-{target_lang}",

)
data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)

trainer = Seq2SeqTrainer(

    model,

    args,

    train_dataset=tokenized_datasets["train"],

    eval_dataset=tokenized_datasets["validation"],

    data_collator=data_collator,

    tokenizer=tokenizer,

    compute_metrics=compute_metrics

)