Shortcuts

ChatMLTemplate

class torchtune.data.ChatMLTemplate[source]

OpenAI’s Chat Markup Language used by their chat models.

It is the default chat template used by Hugging Face models.

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources