Shortcuts

ChatML模板

class torchtune.data.ChatMLTemplate(*args, **kwargs)[source]

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|>