Using LongformerForMultipleChoice for processing multiple-choice questions with the 4 options


Suppose that I want to process multiple-choice questions with 4 options with LongformerForMultipleChoice.

so each question has main_question, option1, option2, option3, and option4.

How can I generate input_ids from the LongformerTokenizer, so that the LongformerForMultipleChoice can correctly take each of my multiple-choice question as the ones with 4 options?

Thank you,

What you are doing here seems correct

just make sure when you are passing labels it’s value should be between [0.. num_choices-1]