EN

Language

Our editions

Written for each audience, not translated word for word.

Model distillation explained: how a small model learns from a large one

ExplainerBy Lucas Matías García TorresUpdated Data checked 6 min read

Reviewed on . How we work.

Leer en español

A 3D lattice of thin steel lines and nodes with a few pathways lit in orange, like a neural network

Short answer

Model distillation trains a small student model on the full probabilities or the answers of a large teacher model. In the 2015 paper that named it, a distilled network made 74 errors on a digit test against 146 without distillation and 67 for its teacher. Google's Gemma 2 2B and 9B, Meta's Llama 3.2 1B and 3B and DeepSeek's R1 distilled models were built this way. Students usually stay below their teacher, and the terms of OpenAI, Anthropic and the Gemini API forbid using their output to train competing models.

Prices and limits change often: check the vendor's page before you pay. How we make money.

Model distillation is a way to train a small model to copy a large one. The large model, called the teacher, shows the small one, the student, not only the right answer but how likely it thinks every other answer is, and the student learns from that richer signal. The idea was set out in a 2015 paper by Geoffrey Hinton, Oriol Vinyals and Jeff Dean, and it is behind many of the small open models you can run on your own computer: Google trained Gemma 2 2B and 9B this way, Meta used it for Llama 3.2 1B and 3B, and DeepSeek published six distilled versions of its R1 reasoning model. This guide explains how distillation works, what the published results show and where it stops working. We checked every source on October 28, 2026.

How distillation works

A model normally learns from hard targets: for each example it is told the one correct answer. Distillation adds soft targets, the full set of probabilities the teacher gives to every possible answer. Hinton and his co-authors give an example from handwritten digits: one version of a 2 may get a probability of one in a million of being a 3 and one in a billion of being a 7, while another version gets the reverse. Those tiny numbers say which 2s look like 3s and which look like 7s, information that a single correct label throws away.

The trick that makes those small probabilities usable is temperature. The paper raises the temperature of the teacher's final softmax, the step that turns raw scores into probabilities, until the distribution is soft enough to show the differences, and trains the student at the same high temperature. Once trained, the student runs at a temperature of 1. It is the same setting that our guide to LLM temperature explains for text generation, used here for training instead.

When the correct labels are also known, the authors got their best results by combining both objectives, with a considerably lower weight on the correct labels than on the teacher's soft targets.

What the original paper showed

Table: results reported by Hinton, Vinyals and Dean (arXiv 1503.02531, 2015)

Experiment Student without distillation Student with distillation Teacher
Handwritten digits (MNIST), small network 146 test errors 74 test errors, at temperature 20 67 test errors, one large network
Speech recognition, Android voice search acoustic model of about 85 million parameters 58.9% frame accuracy, 10.9% word error rate 60.8% frame accuracy, 10.7% word error rate 61.1% and 10.7%, an ensemble of 10 models

In the speech test, the single distilled model kept more than 80% of the gain in frame accuracy that the ensemble of 10 models achieved. The most striking result is about knowledge the student never saw: when every 3 was removed from the examples the student learned from, it still recognised 98.6% of the 3s in the test set once one bias value was corrected.

Two ways to distill a language model

Distillation from probabilities. The student learns from the teacher's probabilities for every possible next token. That needs the teacher's full output for every example, so in practice it is done by whoever runs the teacher. Google says it trained Gemma 2 2B and 9B with knowledge distillation instead of plain next-token prediction. Meta built Llama 3.2 1B and 3B by pruning Llama 3.1 8B and then using the outputs of Llama 3.1 8B and 70B as token-level targets during pre-training, with distillation used after pruning to recover performance. An earlier example, DistilBERT, was 40% smaller and 60% faster than BERT while keeping 97% of its language understanding, according to its authors.

Distillation from answers. The teacher writes answers to many prompts and the student is fine-tuned on them. This only needs the teacher's text, not its probabilities. DeepSeek fine-tuned six existing open models, from the Qwen2.5 and Llama families, on samples generated by DeepSeek-R1, and says the result beat the reasoning that the same small models learned through reinforcement learning on their own. The fine-tuning step is the same one described in our guide to RAG vs fine-tuning.

How close do distilled models get?

DeepSeek's model card compares the teacher, which has 671 billion parameters with 37 billion active per token, with its students on maths and science tests.

Table: scores reported by DeepSeek for DeepSeek-R1 and its distilled models (pass@1, %; DeepSeek-R1 model card, checked October 28, 2026)

Model Parameters AIME 2024 MATH-500 GPQA Diamond
DeepSeek-R1 (teacher) 671B, 37B active 79.8 97.3 71.5
DeepSeek-R1-Distill-Qwen-32B 32B 72.6 94.3 62.1
DeepSeek-R1-Distill-Llama-70B 70B 70.0 94.5 65.2
DeepSeek-R1-Distill-Qwen-14B 14B 69.7 93.9 59.1
DeepSeek-R1-Distill-Qwen-7B 7B 55.5 92.8 49.1
DeepSeek-R1-Distill-Qwen-1.5B 1.5B 28.9 83.9 33.8

On MATH-500, where every score is high, even the 7B student stays close to the teacher. On AIME 2024, where the teacher itself scores lower, the results fall quickly with size, and the 1.5B model gets about a third of the teacher's score. These are the developer's own figures on a handful of tests, so treat them as a guide, not as proof that a student matches its teacher on your work. The distilled models are reasoning models: they write out their thinking before the answer, as our guide to reasoning models explains.

Limits and rules

  • The student usually stays below the teacher. In every result above, the distilled model came close to its teacher without beating it.
  • Distillation is not quantization. Distillation trains a new, smaller model. Quantization stores the same model with fewer bits per weight, as our guide to quantization explains, and a distilled model can be quantized too. A mixture of experts is a third route: a large model that uses only part of its weights for each token.
  • Licences travel with the weights. DeepSeek's MIT licence allows distillation from DeepSeek-R1, but each student also keeps the licence of the model it was built on: Apache 2.0 for the Qwen2.5 ones and Meta's Llama licences for the Llama ones.
  • Closed models forbid it in their terms. OpenAI's Europe terms of use say you may not use output to develop models that compete with OpenAI. Anthropic's consumer terms forbid using its services to develop competing products or services, including to train models. Google's Gemini API terms forbid using the services to develop models that compete with them. Owning the text a chatbot gives you does not make it free to use as training data for a rival model.

Running a distilled model yourself

DeepSeek says its distilled models can be used in the same way as Qwen or Llama models, as long as you keep its settings, because it slightly changed their configuration and tokenizers. Our guide to running an LLM locally covers the setup, and how much VRAM you need helps you pick a size. DeepSeek recommends a temperature between 0.5 and 0.7, with 0.6 as the default, no system prompt, and starting every answer with its thinking tag, because the models sometimes skip their reasoning and then perform worse.

How we checked

On October 28, 2026 we read the 2015 paper by Hinton, Vinyals and Dean, the DistilBERT and Gemma 2 papers on arXiv, Meta's Llama 3.2 announcement, the DeepSeek-R1 model card and the terms of OpenAI, Anthropic and the Gemini API. All the scores here are as reported by their authors; we have not trained or tested any of these models ourselves.

What we checked

  • Hinton, Vinyals and Dean (2015) train the distilled model on soft targets produced by the cumbersome model with a raised softmax temperature, use the same high temperature when training the distilled model and a temperature of 1 afterwards, give the example of a 2 with a probability of 10^-6 of being a 3 and 10^-9 of being a 7, and found the best results with a considerably lower weight on the objective with the correct labels. (arXiv, )
  • In the same paper, on MNIST, a large network made 67 test errors, a smaller network trained without regularization 146, and the smaller network trained to match soft targets at temperature 20 made 74; with all 3s removed from the transfer set and one bias corrected, the distilled model got 98.6% of the test 3s right; on an Android voice search acoustic model of about 85 million parameters, the baseline reached 58.9% frame accuracy and 10.9% word error rate, a 10-model ensemble 61.1% and 10.7%, and the distilled single model 60.8% and 10.7%, keeping more than 80% of the ensemble's gain in frame accuracy. (arXiv, )
  • DistilBERT's authors report reducing the size of a BERT model by 40% while retaining 97% of its language understanding capabilities and being 60% faster. (arXiv, )
  • The Gemma 2 report says the 2B and 9B models were trained with knowledge distillation instead of next token prediction. (arXiv, )
  • Meta's Llama 3.2 announcement says the 1B and 3B models used structured pruning from Llama 3.1 8B and incorporated logits from Llama 3.1 8B and 70B as token-level targets in pre-training, with knowledge distillation used after pruning to recover performance. (Meta, )
  • The DeepSeek-R1 model card lists six dense models distilled from DeepSeek-R1 on Qwen2.5 and Llama bases, fine-tuned on samples generated by DeepSeek-R1, with configs and tokenizers slightly changed; DeepSeek-R1 has 671B total and 37B activated parameters; reported pass@1 scores on AIME 2024, MATH-500 and GPQA Diamond are 79.8, 97.3 and 71.5 for DeepSeek-R1, 72.6, 94.3 and 62.1 for Distill-Qwen-32B, 70.0, 94.5 and 65.2 for Distill-Llama-70B, 69.7, 93.9 and 59.1 for Distill-Qwen-14B, 55.5, 92.8 and 49.1 for Distill-Qwen-7B and 28.9, 83.9 and 33.8 for Distill-Qwen-1.5B; the MIT license allows distillation, the Qwen-based students derive from Apache 2.0 models and the Llama-based ones from the Llama 3.1 and 3.3 licenses; recommended settings are a temperature of 0.5 to 0.7 (0.6), no system prompt and starting each output with the thinking tag. (DeepSeek (Hugging Face), )
  • OpenAI's Europe terms of use say you may not use Output to develop models that compete with OpenAI. (OpenAI, )
  • Anthropic's Consumer Terms of Service forbid using the services to develop any products or services that compete with them, including to develop or train models. (Anthropic, )
  • The Gemini API Additional Terms of Service, effective March 23, 2026, say you may not use the services to develop models that compete with them. (Google, )

What may change

  • New distilled models and new terms of use appear often. This page is reviewed every quarter.

Frequently asked questions

Is a distilled model as good as the original?

Usually not quite. In the original 2015 paper and in DeepSeek's published scores, distilled students came close to their teachers without beating them, and the gap grew as the student got smaller, especially on the hardest tests.

What is the difference between distillation and quantization?

Distillation trains a new, smaller model that imitates a larger one. Quantization keeps the same model but stores its weights with fewer bits. They solve the same problem in different ways, and a distilled model can also be quantized.

Can I distill ChatGPT or Claude into my own model?

Their terms say no. OpenAI's Europe terms forbid using output to develop competing models, Anthropic's consumer terms forbid using its services to train competing models, and Google's Gemini API terms contain a similar ban.

What does temperature do in distillation?

A higher temperature in the teacher's softmax makes its probabilities softer, so the small differences between wrong answers become visible to the student. The student trains at the same high temperature and then runs at a temperature of 1.

Sources

  1. Distilling the Knowledge in a Neural Network (Hinton, Vinyals and Dean, arXiv 1503.02531, 2015), arXiv. Accessed October 28, 2026.
  2. DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter (Sanh et al., arXiv 1910.01108), arXiv. Accessed October 28, 2026.
  3. Gemma 2: Improving Open Language Models at a Practical Size (Gemma Team, arXiv 2408.00118), arXiv. Accessed October 28, 2026.
  4. Llama 3.2 announcement (September 25, 2024): 1B and 3B models built with pruning and knowledge distillation from Llama 3.1 8B and 70B, Meta. Accessed October 28, 2026.
  5. DeepSeek-R1 model card: distilled models on Qwen2.5 and Llama, evaluation tables, usage recommendations and MIT license, DeepSeek (Hugging Face). Accessed October 28, 2026.
  6. Europe Terms of Use (updated January 16, 2026): ownership of content, similarity of output, accuracy and prohibited uses, OpenAI. Accessed October 28, 2026.
  7. Consumer Terms of Service, Anthropic. Accessed October 28, 2026.
  8. Gemini API Additional Terms of Service (effective March 23, 2026), Google. Accessed October 28, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked against the 2015 paper by Hinton, Vinyals and Dean, the DistilBERT and Gemma 2 papers, Meta's Llama 3.2 announcement, the DeepSeek-R1 model card and the terms of OpenAI, Anthropic and the Gemini API on October 28, 2026.

Next review: .

Part of our Language Models Explained guide.

Other topics