Distillation trains a small, fast model (the student) to act like a large, strong one (the teacher). It is how most small models today get much of their skill, and it is central to how we work.
Why
Why distill
A small model trained only on raw text learns slowly from a weak signal: one right next word at a time. A teacher gives a richer signal: which answers are good, how to reason step by step, and how likely every possible next word is.
Small models are cheap to run, can run on a laptop or phone, and answer faster.
Reports from open teams show that distilled small models beat small models trained with reinforcement learning directly, for the same compute. Long reasoning distilled from a strong teacher into models from 1.5 to 70 billion parameters gave large jumps in math and code.
Kinds
The main kinds of distillation
Soft labels (logits)
The student learns to match the teacher's full probability for every next token, softened by a temperature so small probabilities still carry information. Needs the same tokenizer for both, and access to the teacher's outputs, not just its text.
Sequence level
The teacher writes complete answers and the student is fine-tuned on them. Simple, works with any teacher whose terms allow it, and is the most common method in practice, including for long reasoning.
On-policy
The student writes the answer, and the teacher scores every token of the student's own attempt. Fixes the student's real mistakes rather than ones it would never make.
Hidden states
The student also learns to match the teacher's internal layers. Used mostly when the two share a design.
During pretraining
A small model is pretrained on the teacher's top predictions for each token instead of the single real next token. Several small open models were made this way and beat same-size models trained normally.
Self-distillation
A model learns from its own best answers, for example after thinking longer or voting across many tries.
On-policy
Why on-policy distillation works so well
When a student only copies the teacher's answers, it never sees its own mistakes during training. At use time, one early slip can send it somewhere it has never been. On-policy distillation fixes this: the student generates, and the teacher grades each token of that exact answer.
The usual loss is a reverse KL: it pushes the student toward the teacher's most likely choices rather than spreading thin across everything the teacher might say.
It gives a dense signal on every token, unlike reinforcement learning, which gives one score per answer. Published comparisons find it reaches similar results with far less compute.
It works well as a final step after sequence-level distillation, and for recovering skills a model lost during other training.
Compression
Prune, then distill
Instead of training a small model from scratch, start from a large one and cut it down: remove whole layers, attention heads, or part of each layer's width, choosing the parts that matter least on sample data. Then distill from the original to recover the lost skill.
Published results recovered most of the quality using a small fraction (a few percent) of the tokens needed to train from scratch.
Cutting width (narrower layers) usually works better than cutting depth (fewer layers), but depth cuts give bigger speedups.
Done step by step (cut a little, distill, cut again) it can make a family of sizes from one big model.
How we do it
Our distillation recipe
Pick a teacher whose license and terms allow its outputs to train other models. This matters: some do not.
Build the prompt set: hundreds of thousands of real tasks across math, code, science, writing, chat and tool use, with test sets removed.
Generate several answers per prompt, including the reasoning.
Filter: keep answers that are correct (checked automatically where possible), readable, in one language and not padded. Drop near-duplicates.
Fine-tune the student on what is left, for two to three passes.
Finish on-policy: let the student answer and the teacher grade each token, or run a short round of reinforcement learning with checkable rewards.
Measure on held-out tests and publish everything.
Limits
What distillation can't do
The capacity gap. A very small student can't absorb everything a huge teacher knows. A mid-size "teaching assistant" model in between can help, and very small students do better with shorter, simpler reasoning.
Different tokenizers block soft-label distillation. Use sequence-level instead, or methods that align the two vocabularies.
The teacher's flaws carry over, including wrong facts and bad habits. Filtering and checking catch some of them.
A student rarely passes its teacher. To go further, you still need pretraining scale or reinforcement learning.