Looking to fine-tune a model for QA/Text-Generation (not sure how to frame this) and I’m wondering how to best prepare the dataset in a way that I can feed multiple answers to the same question?
My goal is to facilitate the creation of a unique answer to a given question that is based on the input answers. The answers are longer-form (2 to 3 sentences) and I want the model to output this kind of length too.
For now my idea is to fine-tune GPT-2 and look at this as a text generation problem (but I don’t know how GPT-2 would treat multiple answers to the same question - would it adjust the weight simply in favor of the used tokens in the answers?). Maybe creating a summary of the given answers would have the same effect.
Hello can i use multiple context in a question and answer huggingface api?? I am actually trying to make a context that involves several paragraphs about all the past 46 US presidents and I cannot seem to put all those under a single context. Can you please help me ???
If I understood your situation, you have a context, questions and answers, but your context is too big to feed the model in one passage.
I suggest you to take a look on Hugging Face’s question answering example notebook. They manage to solve this problem splitting up the context in several parts, when necessary. During training, if the context split does not contain the answer, they point the answer to the CLS token. Finally, during evaluation, they search for the answer in all splits and consider the most likely answer.