Shortcuts

torchtune.data.QuestionAnswerTemplate

torchtune.data.QuestionAnswerTemplate = functools.partial(<class 'torchtune.data._prompt_templates.PromptTemplate'>, template={'user': ('Question: ', '\n\nAnswer: ')})

用于问答任务的提示模板:

Question: {user_message}

Answer: {assistant_message}

请参阅PromptTemplate以获取完整的API参数。