快捷方式

ChatMLTemplate

class torchtune.data.ChatMLTemplate(*args, **kwargs)[源代码]

OpenAI 聊天模型使用的聊天标记语言 (Chat Markup Language)。

它是 Hugging Face 模型使用的默认聊天模板。

<|im_start|>system
Provide some context and/or instructions to the model.<|im_end|>
<|im_start|>user
The user’s message goes here<|im_end|>
<|im_start|>assistant
The assistant’s response goes here<|im_end|>

文档

访问 PyTorch 的全面开发者文档

查看文档

教程

获取针对初学者和高级开发者的深度教程

查看教程

资源

查找开发资源并获得问题解答

查看资源