add alpaca multiple choice instruct dataset support

This commit is contained in:
Wing Lian
2023-05-16 21:45:34 -04:00
parent f98e173b59
commit b46bc02f0a
4 changed files with 22 additions and 3 deletions

View File

@@ -35,6 +35,10 @@ class JeopardyPrompter(AlpacaPrompter):
prompt_input = "Below is a Jeopardy clue paired with input providing the category of the clue. Write a concise response that best answers tbe clue given the category.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n"
class MultipleChoiceExplainPrompter(AlpacaPrompter):
prompt_input = "Choose the answer that best answers the question. Explain your reasoning.\n\n### Question:\n{instruction}\n\n### Choices:\n{input}\n\n### Response:\n"
class CompletionPrompter(AlpacaPrompter):
def build_prompt(self, instruction: str, input=None, output=None) -> Generator[str, None, None]:
yield instruction