Sorry to bother you again.  I now wanted to implement what I learned in my training loop, but now get a value error that I must specify either input_ids or inputs_embeds. Do I need to specify anything else, so that the decoder_input_ids and decoder_attention_mask from the collator get passed into the model? My training arguments look like this:

batch_size = 2
learning_rate = 2e-5
epochs = 1
training_args = Seq2SeqTrainingArguments(output_dir = “model_checkpoints/”,
evaluation_strategy = “epoch”,
learning_rate = learning_rate,
per_device_train_batch_size = batch_size,
per_device_eval_batch_size = batch_size,
save_total_limit = 3,
num_train_epochs = epochs,
predict_with_generate = True,
fp16 = True)


trainer = Seq2SeqTrainer(bert2bert,
training_args,
train_dataset = tokenized_traindata,
eval_dataset = tokenized_valdata,
data_collator = data_collator,
tokenizer = tokenizer,
compute_metrics = compute_metrics)

Thank you again for your time and patience!