Fine-tuning data
For engineers
Building supervised fine-tuning datasets: chat formats and loss masking, curation, synthetic data, privacy and licensing, and held-out evaluation
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A fine-tuning row is stored as JSONL. What does each line hold?
Check yourself · 2 of 5
What does supervised fine-tuning teach most reliably?
Check yourself · 3 of 5
What is synthetic data in fine-tuning?
Check yourself · 4 of 5
Why is personal data in a fine-tuning set a risk?
Check yourself · 5 of 5
What makes a test split "held out"?
Topics
- Chat formats for training examples5 min read · JSONL messages with system, user, assistant and tool turns, the model's chat template, and masking the loss to assistant tokens
- Curating a small high-quality dataset5 min read · Hundreds to a few thousand clean, consistent and diverse examples beat large noisy sets when they are deduplicated and match production inputs
- Synthetic data from stronger models5 min read · Generating examples with a frontier model, filtering them with checks and judges, and the collapse, bias and terms-of-use risks involved
- Personal data and rights in training sets5 min read · Removing personal data and secrets, checking consent and licences of source data, and remembering that tuned models can repeat examples verbatim
- Held-out evals for fine-tuned models5 min read · A frozen test split, task metrics, comparison against base and prompted baselines, and regression checks on general skills
Start here
- OpenAI: Supervised fine-tuning guide (opens in a new tab)DocsFree
How a hosted provider expects training data to be formatted, sized and evaluated.
- Hugging Face TRL: SFT Trainer (opens in a new tab)DocsFree
How an open-source trainer reads conversational data and masks the loss.
- Chat templates (Hugging Face Transformers) (opens in a new tab)DocsFree
Shows how a model's chat template turns messages into the exact training text.
Helps to know first
110 questions · last verified 2026-12