Define supervised fine-tuning (SFT) in one breath.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
SFT is continued next-token training on curated (prompt, response) demos, with loss masked to response tokens, to install assistant behaviour on a pretrained base.
Imagine a brilliant student who has read every book in the library but has never been to a job interview. They know everything but they ramble, they speak out of turn, they cite obscure sources when a one-line answer would do. SFT is a weekend with a tutor who shows the student a few hundred good interview answers. The tutor never teaches new facts; the student already knows the material. What changes is style and shape, when to be concise, when to elaborate, when to refuse, when to ask. By Monday the student answers in the right format. Same knowledge, brand new presentation. That polish is exactly what SFT installs on top of a pretrained base.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
6 min: SFT definition + same loss as pretraining + masked to assistant tokens + low LR vs pretraining + behaviour vs knowledge distinction + dataset-quality vs quantity + where SFT sits in the alignment stack.
| Dimension | Pretraining | SFT |
|---|---|---|
| Data shape | Raw text, no labels | Curated chat-format demos |
| Data volume | Trillions of tokens | Thousands to low millions |
| Loss | Next-token CE, every token | Next-token CE, assistant only |
| Learning rate | 1e-4 to 6e-4 | 1e-5 to 2e-5 |
| What changes | World knowledge | Format and behaviour |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating SFT as a way to inject new factual knowledge. SFT primarily reshapes behaviour and format; for genuinely new facts you usually need retrieval or continued pretraining.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.