ELI Ladder

What is model distillation in AI?

Distillation trains a small "student" model to copy a big "teacher" model's answers, giving a cheaper model that keeps much of the skill.

Teacher → student input Teacher big, frozen Student soft targets (T = 4) cat 0.55 dog 0.33 car 0.12 loss + true label "cat" update the student only With LLMs, often simpler: the teacher writes answers, the student is fine-tuned on them.

Rung 1 Explain like I'm 6

Imagine a wise old chess master who has played for fifty years. You cannot have her years, but you can watch her play.

Each time she moves, she also tells you, "This move is best, that one is nearly as good, and that one is silly." After watching thousands of games, you play a lot like her, even though you learned in weeks, not fifty years.

Model distillation is the same idea. A big, slow, clever AI is the teacher. A small, fast AI is the student. The student learns by copying the teacher's answers and its hints about which answers are close, so it ends up much smarter than its size would suggest.

Rung 2 High-school level

Distillation (or knowledge distillation) trains a small model, the student, to imitate a big model, the teacher. The goal is a cheaper model that keeps much of the teacher's skill: it needs less memory, answers faster and costs less to run.

The trick is that the teacher gives more than a right-or-wrong label. For a photo of a cat, the plain label just says "cat". The teacher's output says something like "cat 88%, dog 12%, car almost 0%". Those numbers, called soft targets, carry extra knowledge: a cat looks more like a dog than a car. The idea was popularised by Hinton, Vinyals and Dean in 2015 [1].

A classic example: DistilBERT (2019) was 40% smaller and 60% faster than the BERT model it learned from, while keeping 97% of its language-understanding score [2].

With large language models (LLMs), distillation often means something simpler: the teacher writes lots of answers, and the student is fine-tuned on them. In January 2025 DeepSeek released small models trained this way on answers from its big reasoning model, DeepSeek-R1 [3].

Check yourself: In distillation, why are the teacher's probabilities more useful than a plain label?

They show which wrong answers are close, extra knowledge a single label throws away.

Rung 3 Undergraduate level

Same logits (cat 6, dog 4, car 0), two temperatures T = 1 0.88 0.12 0.002 T = 4 0.55 0.33 0.12 catdogcar catdogcar Higher T flattens the outputs, so "dog is closer than car" becomes something the student can learn.
Raising the temperature T reveals what the teacher thinks is similar. Logits are illustrative; the maths is exact.

A classifier turns its raw scores, logits z, into probabilities with a softmax. Distillation adds a temperature T:

p_i = exp(z_i / T) / Σ_j exp(z_j / T)

At T = 1 you get normal outputs. Larger T flattens them so the small probabilities become visible.

Worked example. A teacher sees a photo and outputs logits cat 6, dog 4, car 0.

  • T = 1: cat 0.88, dog 0.12, car 0.002. Almost a hard label.
  • T = 4: cat 0.55, dog 0.33, car 0.12. Now the ranking of mistakes shows.

The student is trained on a mix of two losses [1]:

L = α · CE(y, p_student at T = 1) + (1 − α) · T² · KL(p_teacher at T ‖ p_student at T)

The first term is ordinary cross-entropy against the true label y. The second pulls the student's softened outputs towards the teacher's. Gradients from the soft term shrink by about 1/T², so it is multiplied by T² to keep the two terms balanced when T changes [1].

For LLMs the same idea works per token: the teacher gives a probability for every word in the vocabulary at each position. If you only have the teacher's text, not its probabilities (for example, through an API), you do sequence-level distillation: generate answers with the teacher and fine-tune the student on them. That is how the DeepSeek-R1 distilled models were made [3].

Check yourself: What does raising the temperature T do to the teacher's probabilities?

It flattens them, so the small probabilities for near-miss answers become large enough to learn from.

Rung 4 Graduate level

AIME 2024, pass@1 (%) Qwen-32B + RLR1-Zero recipe 47.0 QwQ-32B-Preview 50.0 OpenAI o1-mini 63.6 R1-Distill-Qwen-32Bfine-tuned on R1 outputs 72.6 Bars to scale (0 to 100). Source: DeepSeek-R1 paper, 2025, Table 6 and distilled-model table
Same base size, different recipe: distilling from R1 beat running RL on the small model directly. Scores from the DeepSeek-R1 paper.

Distillation vs fine-tuning. Mechanically, sequence-level distillation is supervised fine-tuning where a stronger model wrote the targets. What changes is the data source and the goal: compressing a teacher's ability into fewer parameters, not teaching new behaviour from human examples.

Kinds of signal, cheapest first:

  • Teacher text only. DeepSeek fine-tuned Qwen2.5 and Llama 3 bases (1.5B to 70B) on about 800,000 samples curated with R1, using only supervised fine-tuning and no RL stage [3].
  • Full probabilities (logits). Richer per token, but you need the teacher's weights or logits, and teacher and student must share a tokenizer.
  • Intermediate layers. Matching hidden states or attention patterns; DistilBERT used a mix of soft-target, language-modelling and hidden-state losses [2].

Distillation beat RL on a small model. DeepSeek trained Qwen-32B with large-scale reinforcement learning and reached 47.0% on AIME 2024; the same base distilled from R1 reached 72.6%, above OpenAI's o1-mini at 63.6% [3]. The authors concluded that distilling a stronger model is very effective, while pushing past current limits still needs bigger base models and more RL [3].

Labs distill their own frontier models. Meta reported in April 2025 that Llama 4 Maverick was codistilled from Llama 4 Behemoth (288B active parameters, nearly two trillion in total), with a loss that changes the weighting of soft and hard targets during training [4].

Trade-offs. The student is capped roughly by the teacher and by its own size; it copies the teacher's errors and biases; teacher inference to make the data has a real cost; and model licences or terms of service can forbid training on outputs.

Rung 5 PhD level

Why does distillation help at all, when the student could train on the same data directly? Hinton et al. argued that soft targets carry knowledge a hard label lacks (often called "dark knowledge"): the relative probabilities of wrong answers show how the teacher generalises, and they give far more information per example than a hard label [1]. They also showed distillation can compress an ensemble into a single model [1].

But the student often does not match the teacher. Stanton et al. (2021) found a "surprisingly large discrepancy" between teacher and student predictions even when the student had enough capacity, traced mainly to optimisation difficulty, and found that closer agreement with the teacher does not always mean better accuracy [5]. Distillation works, but not quite for the reason the name suggests.

Exposure bias in LLMs. Training on teacher-written sequences shows the student only the teacher's paths. At inference the student generates its own tokens, drifts into states the teacher never visited, and has no training signal there. GKD (2023) fixed this by sampling outputs from the student and asking the teacher to score each token, and allowed divergences other than forward KL [6]. Reverse KL, for example, is mode-seeking: it lets a small student focus on what it can do well, not spread itself over everything the teacher might say.

Open problems:

  • Capacity gap. A much larger teacher is not always a better teacher; when and why is unsettled.
  • What transfers. Students can copy a teacher's style and answer format without its underlying reasoning, which benchmarks may not catch.
  • Distillation and safety. A student can inherit a teacher's failures, or lose safeguards that were never in the copied outputs.
  • Protection. Any model behind an API can be imitated through its outputs; detecting this is an arms race.

Rung 6 State of the art: what experts work on now

Last checked 19 November 2026.

As of 2026-11-19.

Distillation became a standard post-training stage. DeepSeek's distilled R1 models (January 2025) showed that small open models can inherit long chain-of-thought reasoning from fine-tuning alone [3], and Meta codistilled Llama 4 Maverick from Behemoth (April 2025) [4].

On-policy distillation went mainstream. In October 2025 Thinking Machines Lab described a recipe in the GKD line [6]: the student samples, and the teacher grades every token with a per-token reverse KL [7]. Starting from an SFT checkpoint at 60% on AIME'24, it reached 70% in about 150 steps, and the authors estimated 9 to 30 times less compute than continuing with supervised fine-tuning [7]. They also cited the Qwen3 technical report, where on-policy distillation scored 74.4% on AIME'24 using about 1,800 GPU hours against 67.6% for RL at about 17,920 [7]. These are the lab's own experiments, not independent benchmarks.

Distillation as a security problem. On 23 February 2026 Anthropic reported "industrial-scale" campaigns by three labs (DeepSeek, Moonshot and MiniMax) using about 24,000 fraudulent accounts and over 16 million exchanges to distill Claude [8]. Anthropic called distillation "a widely used and legitimate training method" when labs use it on their own models [8].

Sources

  1. Hinton, Vinyals and Dean, Distilling the Knowledge in a Neural Network (2015)
  2. Sanh et al., DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter (2019)
  3. DeepSeek-AI, DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (2025)
  4. Meta AI, The Llama 4 herd (2025)
  5. Stanton et al., Does Knowledge Distillation Really Work? (NeurIPS 2021) (2021)
  6. Agarwal et al., On-Policy Distillation of Language Models: Learning from Self-Generated Mistakes (ICLR 2024) (2023)
  7. Lu et al. (Thinking Machines Lab), On-Policy Distillation (2025)
  8. Anthropic, Detecting and preventing distillation attacks (2026)