Mistral Fine-Tune JSONL Validator
Your training data never leaves this tab. La Plateforme uploads your file when a job starts; this pre-flight check is fully local.
Validate
Mistral Fine-Tune JSONL Validator
Mistral's La Plateforme uses an OpenAI-compatible messages array — same roles (system, user, assistant, tool), same shape, with a couple of small differences in how tool calls are described. This validator enforces the rules La Plateforme actually checks at upload: a final assistant turn, non-empty content, valid roles, and correctly-shaped tool_calls. 100% in-browser.
Validating a different provider? OpenAI, Anthropic (Claude), Google Gemini, Llama / ShareGPT.
Mistral's shape, in one line
{"messages": [
{"role": "system", "content": "You are helpful."},
{"role": "user", "content": "Hi"},
{"role": "assistant", "content": "Hello"}
]}
What the validator checks
- Each line is valid JSON.
- Top-level
messagesis present and is an array. - Every role is one of
system,user,assistant,tool. - At least one
assistantturn (that's what the model learns to generate). - Last message is an assistant turn.
- Non-empty
content(or validtool_callsif content is empty). tool_callsshape:id,type: "function",function.name,function.arguments(string).toolrole messages have a matchingtool_call_id.
Common mistakes I catch
{"messages": [{"role": "user", "content": "Hi"}]}
// Error: missing assistant turn — the model needs a target to learn.
{"messages": [{"role": "developer", "content": "..."}]}
// Error: Mistral does not support the 'developer' role (use 'system').
{"messages": [
{"role": "assistant", "tool_calls": [{"function": {"name": "f"}}]}
]}
// Error: tool_calls missing 'id' and 'type: "function"'.
Differences from OpenAI
- No
developerrole. Mistral uses the classicsystemonly. - Tool arguments are strings. The
function.argumentsfield is a serialized JSON string, not an object — same as OpenAI. - Vision via base64. If you're using Pixtral, content can be an array with
image_urlparts; this validator accepts that shape.
Frequently asked questions
Which Mistral models support fine-tuning?
Mistral Small, Mistral Large, Codestral, Ministral on La Plateforme; community Mistral 7B / Mixtral via Together, Fireworks, RunPod, etc. — those usually accept the same messages shape. For Axolotl/Unsloth recipes, the ShareGPT shape is also common (use the Llama validator).
Why does Mistral reject my file even though it validates here?
Two common reasons: (1) total token count exceeds the per-example or per-file cap; (2) the file is not strictly JSONL (e.g., a JSON array, or pretty-printed with line breaks inside records). Run the JSONL validator first to rule out (2), and the token counter to check (1).
Is my data uploaded?
Never. Everything runs in your browser. See the privacy policy.