ValueError: You have to specify either decoder_input_ids or decoder_inputs_embeds

See @Rocketknight1 's response in this thread.

Pass in the labels to your to_tf_dataset call

columns=["attention_mask", "input_ids", "labels"],

Also consider using the model.prepare_tf_dataset method which is supposed to shape the dataset appropriately - but I have not tried that out.

Also

1 Like