Dataset Splitter
Split a dataset into training, validation and test files with a repeatable shuffle.
Convert a conversation into ChatML, Llama 3, Mistral, Gemma or Alpaca prompt templates.
The ChatML Formatter converts a conversation between a JSON messages array, a labelled transcript and the prompt templates local models are trained on — ChatML, Llama 3, Mistral, Gemma and Alpaca — with an optional generation prompt.
Chat models are trained on conversations wrapped in special tokens — ChatML uses im_start and im_end, Llama 3 uses header and end-of-turn tokens, Mistral wraps user turns in [INST] tags. Chat endpoints apply the template for you, but a raw completion endpoint, a llama.cpp server or a training script needs the exact string, and a wrong template quietly makes a good model perform badly.
Paste a conversation as a JSON messages array, an already-formatted ChatML or Llama string, or a transcript with User: and Assistant: labels, and convert it to ChatML, Llama 3, Mistral, Gemma, an Alpaca instruction block, a plain transcript or back to JSON. The generation prompt — the opened assistant turn that makes the model answer rather than continue your message — can be added or left off for training data.
Model quirks are handled and explained: Mistral and Gemma have no system role, so the system message is folded into the first user turn, and consecutive turns from the same role, which several templates reject, are flagged.
ChatML, Llama 3, Mistral [INST], Gemma and Alpaca, plus plain text and JSON.
JSON messages, ShareGPT turns, ChatML, Llama or Gemma strings and labelled transcripts.
Open an assistant turn for inference, or leave it off for training examples.
System messages are folded in for Mistral and Gemma, which have no system role.
Consecutive turns from the same role, which several templates reject, are flagged.
A JSON messages array, a formatted template string, or a labelled transcript.
Match the model: ChatML for Qwen and many fine-tunes, Llama 3, Mistral or Gemma.
Keep it for inference; turn it off when building training examples.
Send it to a raw completion endpoint, or use it in a dataset.
Chat Markup Language: a prompt format that wraps each message between im_start and im_end tokens with the role name. Qwen, Yi, Hermes and many community fine-tunes use it.
Check the chat_template field in the model tokenizer_config.json on Hugging Face, or the TEMPLATE in its Ollama Modelfile.
No. Chat APIs take a messages array and apply the template themselves. Templates matter for raw completion endpoints, local inference servers and training.
The opening of an empty assistant turn at the end of the prompt. Without it, a raw model may continue the user message instead of answering it.
No. Conversion happens in your browser.
What people who use the ChatML Formatter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the ChatML Formatter. It takes half a minute and no account.
Write the first reviewSplit a dataset into training, validation and test files with a repeatable shuffle.
Compare GPT, Claude, Gemini, DeepSeek and Llama by price, context and monthly cost.
Build a structured system prompt for a chatbot, assistant or custom GPT.
Turn a rough idea into a structured prompt that gets a usable answer.
Scan untrusted text for prompt injection patterns and hidden characters before a model reads it.
Convert between tokens, words, characters, pages and reading time.
Generate MCP server config for Claude Desktop, Claude Code, Cursor, VS Code and Windsurf.
Write both custom instruction boxes, each checked against the 1,500 character limit.