SEBIS{URGENT},ValueError: You have to specify either decoder_inputs or decoder_inputs_embeds

Hi @Rohit

It’s not clear what exactly you want to do. Could you please provide more information?

From what I can see, it’s a T5 model. If you want to use it for Seq2Seq generation then you should use the AutoModelForConditionalGeneration or T5ForConditionalGeneration class and use the generate method.

And in general the forward of any seq2seq models expects input_ids (input for encoder) and decoder_input_ids (input for decoder). T5Model throws this error when the decoder_input_ids are not provided.

2 Likes