Input format for T5 model in Question Answering task
Hi, everyone. I am working with the T5 model for fine-tuning question-answering tasks with the custom dataset. My dataset contains 3 parts (question, question_context, answer_text). According to my understanding, we can encode thequestion + question_contextintoinput_idsand feed it to the model, likewise, theanswer_textwill belabelsfor evaluating the model generation. I looked around the implementation of T5ForConditionalGeneration and realized that if the users input thelabelsanddo not define thedecoder_input_ids, they will assign it by thelabelsand shift it right for performing autoregressive internally. Here is the implementation for thecode. However, in my case, I want to feed the model with the question asinput_ids, question_context asdecoder_input_ids, and answer_text aslabels, so does the T5ForConditionalGeneration will shift right thedecoder_input_idsfor me internally or I have to do it by my self externally?Hope you guys help me clear this situation. Thank you in advance!