SEBIS{URGENT},ValueError: You have to specify either decoder_inputs or decoder_inputs_embeds
image1527×834 50.8 KBValueError: You have to specify either decoder_inputs or decoder_inputs_embedsCould somebody please help.
2020-12-29T06:29:51Z
Hi@RohitIt’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 theAutoModelForConditionalGenerationorT5ForConditionalGenerationclass and use thegeneratemethod.And in general theforwardof any seq2seq models expectsinput_ids(input for encoder) anddecoder_input_ids(input for decoder). T5Model throws this error when thedecoder_input_idsare not provided.
2020-12-29T11:38:53Z
Thanks a lot…Actually I m new to this so i didnt knew how to use it…i wanted to use it as seq2seq I followed your refernce and it worked…
2021-01-01T08:54:09Z
Hi@Rohit,You could also set the pipeline like:Screen Shot 2021-01-01 at 9.52.27 AM2150×246 50.7 KBand use pipeline([code]) to generate description for the input code.Here is one Colab example:https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/java/base_model.ipynb