What knowledge distillation is
Knowledge distillation is a training method in which a small model, the student, learns to reproduce the outputs of a larger model, the teacher. IBM Think (published 16 April 2024, updated 17 November 2025) defines it as “a machine learning technique that aims to transfer the learnings of a large pre-trained model, the ‘teacher model,’ to a smaller ‘student model.’” Wikipedia (retrieved 5 December 2026) puts both common names into one sentence: “knowledge distillation or model distillation is the process of transferring knowledge from a large model to a smaller one”. This entry uses the two names for the same method, as Wikipedia does. Distillation here means the training method, not the chemical process.
In a large language model, the teacher's output can be handed over in two forms: the probability it assigns to every possible next token, or the text it writes.
Where it comes from
Buciluă, Caruana and Niculescu-Mizil described the method at the KDD conference in August 2006, in a paper titled “Model Compression”. They trained a large ensemble first and then a single neural network on its answers: “we use the ensemble to label a large unlabeled data set and then train the neural net on this much larger, ensemble labeled, data set.” Where unlabeled data was scarce, they generated synthetic examples with a method they called MUNGE, and reported: “Using MUNGE, we are able to train neural nets that are a thousand times smaller and faster than ensemble selection ensembles”.
The name came nine years later. Hinton, Vinyals and Dean wrote, in a paper first posted on arXiv on 9 March 2015, that once the large model is trained, “we can then use a different kind of training, which we call ‘distillation’ to transfer the knowledge from the cumbersome model to a small model that is more suitable for deployment.” They point to the earlier work: “A version of this strategy has already been pioneered by Rich Caruana and his collaborators”.
Kim and Rush (25 June 2016) applied the method to machine translation and introduced “two novel sequence-level versions of knowledge distillation”. In the first version of their paper, the best student “runs 10 times faster than its state-of-the-art teacher with only a decrease of 0.2 BLEU”.
| Paper and date | What it added |
|---|---|
| Buciluă, Caruana, Niculescu-Mizil, KDD (20 Aug 2006) | A small network trained on labels produced by a large ensemble, including synthetic data |
| Hinton, Vinyals, Dean, arXiv (9 Mar 2015) | The name distillation, soft targets and the temperature |
| Kim and Rush, arXiv (25 Jun 2016) | Distillation of whole output sequences |
Sources date the beginning differently. IBM writes: “The concept has its origins in a 2006 paper titled ‘Model Compression.’” Wikipedia names an earlier case: “An early example of neural network distillation was published by Jürgen Schmidhuber in 1991”. The 2006 paper says compression, the 2015 paper says distillation.
How it works
In Hinton's formulation, the teacher is trained first, as a large model or an ensemble of models. For each example it outputs a probability for every class, and the student is trained on these probabilities: “use the class probabilities produced by the cumbersome model as ‘soft targets’ for training the small model”. A normal label names only the right class. Soft targets also show how the teacher ranks the wrong ones: “An image of a BMW, for example, may only have a very small chance of being mistaken for a garbage truck, but that mistake is still many times more probable than mistaking it for a carrot.”
The temperature controls how much of that ranking is visible. The softmax function that turns a model's raw scores (logits) into probabilities contains a temperature T that “is normally set to 1”. In the paper's words, “Using a higher value for T produces a softer probability distribution over classes.” During the transfer, teacher and student use the same high temperature. Once trained, the student runs at a temperature of 1 again. The entry on LLM temperature covers the temperature setting that vendors offer when a model writes text.
When the correct labels are known, the paper combines two goals and found it better “to simply use a weighted average of two different objective functions”: the cross-entropy with the soft targets at high temperature, and the cross-entropy with the correct labels at a temperature of 1. Because the gradients from the soft targets shrink with 1/T², the paper multiplies them by T², so that the balance between the two goals does not shift when the temperature changes.
The paper reports two results. On the MNIST digit images, a large network made 67 test errors and a smaller network without regularization made 146. The same small network, trained in addition to match the large network's soft targets at a temperature of 20, made 74. In speech recognition, trained on about 2,000 hours of spoken English, a single model reached 58.9% frame accuracy and a word error rate of 10.9%, an ensemble of ten models 61.1% and 10.7%, and one model distilled from that ensemble 60.8% and 10.7%.
One training example, two targets
Soft targets, at a high temperature T
Teacher
trained first, fixed
BMW
garbage truck
carrot
Student
same high T, still learning
BMW
garbage truck
carrot
Cross-entropy between the two: soft loss
Correct label, at T = 1
Student
same logits, T = 1
BMW
garbage truck
carrot
Correct label
the class that is right
BMW
garbage truck
carrot
Cross-entropy with the label: hard loss
Weighted sum trains the student
soft loss × T² + small weight × hard loss
T² keeps both parts in proportion as T changes
Bar heights are illustrative, not measured
Variants
Token probabilities. The student learns the teacher's probability for every token at every position. Google's Gemma 2 report (31 July 2024): “We also train the 2B and 9B models with knowledge distillation (Hinton et al., 2015) instead of next token prediction.” More precisely, “we minimize the negative log-likelihood between the probabilities from the teacher and the student”. The teacher there is “a large language model”. This form needs the teacher's full output probabilities.
Generated text. The teacher writes answers, and the student is fine-tuned on them like on any other dataset. The first version of the DeepSeek-R1 paper (22 January 2025) describes it this way: “we directly fine-tuned open-source models like Qwen (Qwen, 2024b) and Llama (AI@Meta, 2024) using the 800k samples curated with DeepSeek-R1”. OpenAI added the same procedure to its API on 1 October 2024: “Model distillation involves fine-tuning smaller, cost-efficient models using outputs from more capable models”.
Inside the teacher. TinyBERT (23 September 2019) also transfers what the teacher computes in its layers. Its authors write that “The attention based distillation ensures that the linguistic knowledge can be well transferred from teacher BERT to student TinyBERT”.
| Variant | Teacher provides |
|---|---|
| Token probabilities (Hinton et al. 2015; Gemma 2, 31 Jul 2024) | A probability for every class or token |
| Generated text (Kim and Rush, 25 Jun 2016; Alpaca, 13 Mar 2023; OpenAI API, 1 Oct 2024; DeepSeek-R1, 22 Jan 2025) | Complete outputs, such as translations or answers, used as training data |
| Intermediate layers (TinyBERT, 23 Sep 2019) | Attention and hidden states, in addition to outputs |
Gou et al. (9 June 2020) sort the training schemes by “whether the teacher model is simultaneously updated with the student model or not” into “online distillation, offline distillation and self-distillation”.
Examples with dates
| Model (date) | Teacher to student |
|---|---|
| Distilled speech model (9 Mar 2015) | Ten-model ensemble to one model; Hinton, Vinyals, Dean |
| TinyBERT (23 Sep 2019) | BERT-Base to a 4-layer model; Jiao et al. |
| DistilBERT (2 Oct 2019) | BERT to a model 40% smaller; Sanh et al. |
| Alpaca 7B (13 Mar 2023) | text-davinci-003 wrote the data, LLaMA 7B learned from it; Stanford CRFM |
| Orca 13B (5 Jun 2023) | GPT-4, with ChatGPT as teacher assistant; Mukherjee et al. |
| Gemma 2 2B and 9B (31 Jul 2024) | A larger language model to the 2B and 9B models; Gemma Team |
| DeepSeek-R1-Distill (22 Jan 2025) | DeepSeek-R1 to six models from 1.5B to 70B; DeepSeek-AI |
The table lists models whose makers describe training on a teacher's outputs, on the date given. Alpaca and Orca do not use the word distillation for it. Two of the makers state sizes and speeds. DistilBERT: “it is possible to reduce the size of a BERT model by 40%, while retaining 97% of its language understanding capabilities and being 60% faster”. TinyBERT, in the abstract of its revised version (16 October 2020): “7.5x smaller and 9.4x faster on inference”.
Further models trained by distillation, among them Gemma 3 and the small Llama 3.2 models, are listed in the entry on small language models.
Limits
A bigger teacher does not always help. Mirzadeh et al. (9 February 2019, abstract revised 17 December 2019) found that “the student network performance degrades when the gap between student and teacher is large”. Their answer is a teacher assistant of medium size between the two.
A student can copy the style of its teacher without its knowledge. Stanford wrote on 13 March 2023 that Alpaca “behaves qualitatively similarly to OpenAI’s text-davinci-003” on its preliminary evaluation. Gudibande et al. tested such imitation models on 25 May 2023. They “close little to none of the gap from the base LM to ChatGPT” on tasks the imitation data covers little, and because “imitation models are adept at mimicking ChatGPT's style but not its factuality” the gap “may slip past human raters”.
Distillation is not always the cheaper path. Busbridge et al. (12 February 2025, abstract revised 25 July 2025) studied how much compute it takes. With an existing teacher or many students, “distillation outperforms supervised learning up to a compute level that scales predictably with student size”. Their opposite case: “if only one student is to be distilled and a teacher also requires training, supervised learning is generally preferable.”
Distillation and related terms
Fine-tuning. Distillation from generated text is fine-tuning on data the teacher wrote. Hugging Face counts data written by large language models as synthetic data; the entry on synthetic data compares that with the definitions of NIST and the EDPS. Distillation from probabilities replaces the training target itself, as Gemma 2 does instead of next token prediction.
Model compression. The sources draw the line differently. Gou et al. (9 June 2020, abstract revised 20 May 2021) call distillation “a representative type of model compression and acceleration”. Wikipedia separates the two: “Model distillation is not to be confused with model compression, which describes methods to decrease the size of a large model itself, without training a new model.” Pruning and quantization, two other ways to shrink a model, are explained in the entry on small language models.
Mixture of experts. Hinton et al. also trained specialist models for classes the full model confuses, and set them apart: “Unlike a mixture of experts, these specialist models can be trained rapidly and in parallel.”
Reasoning model. The six DeepSeek-R1-Distill models received their reasoning from a teacher by fine-tuning. The first version of the paper: “Our findings indicate that this straightforward distillation method significantly enhances the reasoning abilities of smaller models.”
Terms of service and distillation
Distillation from generated text can use another company's model as the teacher. OpenAI and Anthropic address this in their terms of use. The wording differs by provider and by version; the table quotes it as retrieved on 5 December 2026.
| Provider and version | Wording |
|---|---|
| OpenAI Terms of Use, rest of world (effective 1 Jan 2026) | “Use Output to develop models that compete with OpenAI.” |
| OpenAI Terms of Use, Europe (version of 16 Jan 2026) | “Using Output to develop models that compete with OpenAI.” |
| Anthropic Commercial Terms (effective 17 Jun 2025) | “to train competing AI models or resell the Services except as expressly approved by Anthropic” |
| Anthropic Consumer Terms (effective 8 Oct 2025) | “including to develop or train any artificial intelligence or machine learning algorithms or models or resell the Services” |
Stanford gave the OpenAI terms as one reason Alpaca stayed a research model: its data came from text-davinci-003, “whose terms of use prohibit developing models that compete with OpenAI.”
Anthropic uses the term distillation attack in a statement of 23 February 2026 (page changed 20 October 2026, retrieved 5 December 2026). It separates the method from its misuse: “Distillation is a widely used and legitimate training method.” It describes the misuse as: “competitors can use it to acquire powerful capabilities from other labs in a fraction of the time, and at a fraction of the cost, that it would take to develop them independently”.
Source
- IBM Think, “What is knowledge distillation?” (16 April 2024, updated 17 November 2025). Source for the definition and the 2006 origin (retrieved 2026-12-05): https://www.ibm.com/think/topics/knowledge-distillation
- Wikipedia, “Knowledge distillation”. Source for both names, the 1991 example and the separation from model compression (retrieved 2026-12-05): https://en.wikipedia.org/wiki/Knowledge_distillation
- Buciluă, Caruana and Niculescu-Mizil, “Model Compression”, KDD 2006 (20 August 2006). Source for ensemble labeling and MUNGE (retrieved 2026-12-05): https://dl.acm.org/doi/10.1145/1150402.1150464
- Hinton, Vinyals and Dean, “Distilling the Knowledge in a Neural Network” (arXiv 1503.02531, 9 March 2015). Source for the name, soft targets, temperature, the two objectives, the MNIST and speech results and the specialist models (retrieved 2026-12-05): https://arxiv.org/abs/1503.02531
- Kim and Rush, “Sequence-Level Knowledge Distillation” (arXiv 1606.07947, 25 June 2016). Source for sequence-level distillation and the translation result (retrieved 2026-12-05): https://arxiv.org/abs/1606.07947
- Mirzadeh et al., “Improved Knowledge Distillation via Teacher Assistant” (arXiv 1902.03393, 9 February 2019, abstract revised 17 December 2019). Source for the gap between teacher and student (retrieved 2026-12-05): https://arxiv.org/abs/1902.03393
- Jiao et al., “TinyBERT: Distilling BERT for Natural Language Understanding” (arXiv 1909.10351, 23 September 2019, revised 16 October 2020). Source for attention-based distillation, size and speed (retrieved 2026-12-05): https://arxiv.org/abs/1909.10351
- Sanh et al., “DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter” (arXiv 1910.01108, 2 October 2019). Source for size, retained capability and speed (retrieved 2026-12-05): https://arxiv.org/abs/1910.01108
- Gou et al., “Knowledge Distillation: A Survey” (arXiv 2006.05525, 9 June 2020, abstract revised 20 May 2021). Source for training schemes and distillation as model compression (retrieved 2026-12-05): https://arxiv.org/abs/2006.05525
- Stanford CRFM, “Alpaca: A Strong, Replicable Instruction-Following Model” (13 March 2023). Source for the Alpaca data, its similarity to text-davinci-003 and the terms of use (retrieved 2026-12-05): https://crfm.stanford.edu/2023/03/13/alpaca.html
- Gudibande et al., “The False Promise of Imitating Proprietary LLMs” (arXiv 2305.15717, 25 May 2023). Source for style without factuality (retrieved 2026-12-05): https://arxiv.org/abs/2305.15717
- Mukherjee et al., “Orca: Progressive Learning from Complex Explanation Traces of GPT-4” (arXiv 2306.02707, 5 June 2023). Source for explanation traces (retrieved 2026-12-05): https://arxiv.org/abs/2306.02707
- Gemma Team, “Gemma 2: Improving Open Language Models at a Practical Size” (arXiv 2408.00118, 31 July 2024). Source for distillation from token probabilities (retrieved 2026-12-05): https://arxiv.org/abs/2408.00118
- OpenAI, “Model Distillation in the API” (1 October 2024). Source for distillation through the API and stored completions (retrieved 2026-12-05): https://openai.com/index/api-model-distillation/
- DeepSeek-AI, “DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning” (arXiv 2501.12948, first version of 22 January 2025; the revised version of 4 January 2026 words these passages differently). Source for the 800k samples and the six distilled models (retrieved 2026-12-05): https://arxiv.org/abs/2501.12948
- Busbridge et al., “Distillation Scaling Laws” (arXiv 2502.08606, 12 February 2025, abstract revised 25 July 2025). Source for when distillation pays off (retrieved 2026-12-05): https://arxiv.org/abs/2502.08606
- OpenAI, Terms of Use, rest of world (effective 1 January 2026). Source for the wording on competing models (retrieved 2026-12-05): https://openai.com/policies/row-terms-of-use/
- OpenAI, Terms of Use, Europe (version of 16 January 2026). Source for the wording on competing models (retrieved 2026-12-05): https://openai.com/policies/terms-of-use/
- Anthropic, Commercial Terms of Service (effective 17 June 2025). Source for the wording on competing models (retrieved 2026-12-05): https://www.anthropic.com/legal/commercial-terms
- Anthropic, Consumer Terms of Service (effective 8 October 2025). Source for the wording on competing models (retrieved 2026-12-05): https://www.anthropic.com/legal/consumer-terms
- Anthropic, statement on distillation attacks (23 February 2026, updated 20 October 2026). Source for the term distillation attack (retrieved 2026-12-05): https://www.anthropic.com/news/detecting-and-preventing-distillation-attacks
Frequently asked questions
Can you explain knowledge distillation in a simple way?
A large model, the teacher, answers many examples. A small model, the student, is trained to give the same answers. In the classic form the student copies the teacher's probabilities for every possible answer, which carries more information than a single right label. With language models the student often learns from text the teacher wrote.
Is AI distillation legal?
What a provider allows is set in its terms of use, and the wording differs. OpenAI's terms (effective 1 January 2026) list “Use Output to develop models that compete with OpenAI.” under “What you cannot do”. Anthropic's commercial terms (effective 17 June 2025) bar using the services to “build a competing product or service, including to train competing AI models or resell the Services except as expressly approved by Anthropic”. Anthropic's statement of 23 February 2026 calls distillation “a widely used and legitimate training method”.
Does model distillation actually work?
Hinton et al. (2015) distilled an ensemble of ten speech models into one model with 60.8% frame accuracy, against 61.1% for the ensemble. DistilBERT (2019) kept 97% of BERT's language understanding at 40% less size. Gudibande et al. (2023) found the limit for imitation models, which copied ChatGPT's style but not its factuality.
What is the disadvantage of distillation?
Three are documented. A student learns worse when the teacher is far larger (Mirzadeh et al., 2019). A student can copy the teacher's style without its factual accuracy (Gudibande et al., 2023). And if the teacher still has to be trained for one student only, Busbridge et al. (2025) found ordinary supervised training generally preferable.
How to distil an AI model?
In Hinton's method: train the teacher, let it produce probabilities at a high temperature, and train the student on those probabilities plus the correct labels, weighting the soft part by T². For language models, one route is to collect the teacher's answers to many prompts and fine-tune the student on them, as OpenAI's API has offered since 1 October 2024.
Are DeepSeek models distilled?
Six of them are, by DeepSeek's own description. The first version of the DeepSeek-R1 paper (22 January 2025) describes six dense models from 1.5 to 70 billion parameters, based on Qwen and Llama, fine-tuned on about 800,000 samples curated with DeepSeek-R1. Their names carry the suffix Distill, for example DeepSeek-R1-Distill-Qwen-7B.