Chat Template Preview
What your fine-tuning data actually looks like to the model. A JSONL file is a list of role/content objects, and no model has ever seen one — what a model sees is a single string built by its chat template, special tokens and all. Paste your records and read that string.
100% client-side. No upload.
Render
Drop a .jsonl file here, or
Why this matters
Fine-tuning bugs divide almost perfectly into two kinds: the data is wrong, or the template is wrong. Validators catch the first. The second is invisible in the JSONL, because the JSONL is correct — it is what the trainer does with it that differs. A model that will not stop generating, a model that starts every reply with a stray header, a system prompt that seems to be ignored: all three are template mismatches, and all three are obvious the moment you look at the string.
What each template does differently
- ChatML wraps every turn in
<|im_start|>role…<|im_end|>. It has a real system role. This is what OpenAI-style data assumes and what most community fine-tunes use. - Llama 3 opens with
<|begin_of_text|>once, then uses header tokens per turn and<|eot_id|>to end them. Missing the<|eot_id|>is the classic cause of a model that never stops. - Mistral [INST] has no system role at all. Every trainer folds the system message into the first user turn — so if you are targeting Mistral, your system prompt is not where you think it is. It also strictly alternates user and assistant; two turns of the same role in a row break the pairing.
- Gemma also has no system role, and calls the assistant
model, notassistant. - Alpaca / Vicuna uses no special tokens whatsoever — just
### Instruction:and### Response:headers. Useful as a control: if the output looks the same as your input, that is why.
The generation prompt
At inference the template appends an empty assistant header — <|im_start|>assistant\n
for ChatML — to tell the model it is its turn. During training that suffix is not added,
because the assistant reply is already there. Toggle it to see both, and to check that the reply in
your data begins exactly where the generation prompt ends. A leading space or newline that is present
in training and absent at inference is a real, and very annoying, source of drift.
What the status line tells you
- Special token count. Zero special tokens on a template that should have them means the template did not apply — usually the wrong option selected.
- Character and token estimate. Four characters per token, the same rough figure the token counter uses. Templates are not free: ChatML adds roughly 7 tokens per turn, Llama 3 rather more.
- Records with no assistant turn. They render fine and train nothing. The fine-tune validator is the place to fix them.
- Notes. Anything the template had to do to your data to make it fit — folding a system message, skipping an unknown role, flattening a content-parts array — is listed under the output rather than done quietly.
Things worth checking in the rendered string
- Is the system prompt where you expect? On Mistral and Gemma it will have moved.
- Does every assistant turn end with the stop token? That token is what teaches the model to stop.
- Is there exactly one BOS? Llama tokenizers add
<|begin_of_text|>themselves in some trainer configurations, which gives you two. Two is not harmless. - Does the content contain the special tokens as literal text? If a user message in your data literally contains
<|im_end|>, it will terminate the turn early. Search the rendered string for them.
FAQ
Is this the same string my trainer will produce?
It is the documented form of each template, and it matches what tokenizer.apply_chat_template produces for the standard configurations. It cannot account for a model repo that ships a customised chat_template in its tokenizer config — when in doubt, print the trainer's own output and compare it with this side by side. That comparison is the point.
Does it tokenize?
No. Real tokenization needs the model's vocabulary, which is tens of megabytes per model. The token figure is the 4-characters-per-token estimate, which is close enough to spot a record that will blow the context window and not close enough to budget with.
Can I use my legacy prompt/completion file?
Yes. A record with prompt and completion is read as one user turn and one assistant turn, and a note says so. Converting properly is what chat format converter is for.
Is my data uploaded?
No. Everything is rendered in this page.