@claartje-barkhof ,thank you for your response . Can you provide a example for bert2bert model ?
because I build the model like this
  model = EncoderDecoderModel.from_encoder_decoder_pretrained('bert-base-uncased', 'bert-base-uncased')

And when I run the forward method like this
outputs = model(input_ids=src, decoder_input_ids=dst, labels=dst, return_dict=True)

It outputs all the logits at once.
I don’t konw how to control it .