torchtune.data.GrammarErrorCorrectionTemplate¶
- torchtune.data.GrammarErrorCorrectionTemplate = functools.partial(<class 'torchtune.data._prompt_templates.PromptTemplate'>, template={'user': ('将此更正为标准英语:', '\n---\n已更正:')})¶
用于语法错误纠正任务的提示模板
Correct this to standard English: {user_message} --- Corrected: {assistant_message}
有关完整的 API 参数,请参阅
PromptTemplate
。