# Distillation

> Canonical: https://skillalmanac.com/glossary/distillation | Last verified: 2026-11-25 | Index status: index-eligible

Knowledge distillation trains with guidance from a teacher model or ensemble. A common compression setup uses a smaller student; other variants include self-distillation within one network. Cost, speed and retained capability must be evaluated for the actual deployment.

Also called: knowledge distillation, model distillation, distillation in AI, distilled model, distilled models, teacher-student training.

## In plain language

A common compression form of distillation teaches a smaller student using a larger teacher’s outputs, including its probabilities over options. Distillation need not involve differently sized networks: an ensemble can teach a single model the size of its members, and self-distillation can use one network in both roles. Compression aims to reduce deployment cost or latency, like a revision guide drawn from a textbook, but actual benefits depend on the model, runtime and task. The catch is that the student can still lack the teacher's accuracy and knowledge, according to IBM, and it may inherit the teacher's mistakes. It also needs a good teacher. Evaluate both resource use and task quality; neither savings nor a particular quality change follows from the name alone.

## Technical definition

In the 2015 paper by Hinton, Vinyals and Dean, the behaviour of an ensemble of models is transferred into a single model which is easier to deploy. IBM describes training the student on the teacher's output probabilities, called soft targets, instead of only the correct labels. It lists variants: offline distillation from a fixed pre-trained teacher, online distillation where both models train together, and self-distillation. IBM also notes that many methods for large language models rely on proprietary teachers whose weights cannot be modified.

## How it shows up when you use agents

You will meet distillation in model descriptions: a vendor says a smaller model was distilled from a larger one, or an open model is said to be trained on a bigger model's outputs. It matters to someone running Claude Code, Codex or Cursor for one reason: a distilled model is meant to be cheaper and faster, and it is not the same as the teacher. A [small language model](/glossary/small-language-model) made this way may handle routine edits well and still fail on long multi-step work.

What breaks when it is misunderstood: people assume a distilled model matches its teacher on everything, swap it in without testing, then see weaker plans and tool calls. IBM notes that smaller students can still lack the accuracy and knowledge capacity of larger models.

The safer habit is to compare on your own tasks. Build a held-out set of real examples, run teacher and student on it, look at where the student fails, then decide whether the saving is worth it. Distillation is related to [fine-tuning](/glossary/fine-tuning), but the training signal comes from another model's outputs.

If you are choosing a model to run yourself, the sizing skill below estimates memory requirements and the cost skill prices supplied workload assumptions; actual fit, speed and task quality still need testing.

## Common confusions

- **Distillation versus fine-tuning.** Fine-tuning continues training a model on new data. Distillation trains a student to match a teacher. The two can be combined.
- **Distillation versus quantization.** Quantization stores a model's numbers at lower precision. A common distillation form trains a smaller student, but other variants need not reduce network size. IBM's small language model page lists both, along with pruning.
- **Distillation versus pruning.** Pruning removes parts of an existing network. Conventional teacher/student distillation can use separate models; self-distillation uses one network in both roles.
- **Myth.** A distilled model is a copy of its teacher. It is trained to imitate the teacher's outputs and can still fall short on accuracy and knowledge.

## Worked examples in this catalogue

### [llm-cost-estimator](https://skillalmanac.com/skills/skill-almanac/llm-cost-estimator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A monthly cost range for an LLM feature, from your own usage profile and your own price table.

Why it exercises the concept: For a hypothetical compression comparison, supplied model prices and workload can estimate costs. This does not measure retained task quality or guarantee deployment savings.

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An eval dataset for an LLM feature with a checker for duplicates, missing graders and imbalance.

Why it exercises the concept: This prepares case structure and selected duplicate/leakage checks for a held-out teacher/student comparison. It does not run either model or score retained capability; that evaluation is separate.

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of whether an open-weight language model will run on a given GPU, Mac or PC, with a script that computes the memory it needs.

Why it exercises the concept: A compression goal may be local deployment. This skill estimates weight, cache and overhead memory under supplied assumptions; it does not establish measured hardware fit or runtime performance.

## Related terms

- [Small language model (SLM)](https://skillalmanac.com/glossary/small-language-model.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Fine-tuning](https://skillalmanac.com/glossary/fine-tuning.md)
- [Synthetic data](https://skillalmanac.com/glossary/synthetic-data.md)
- [Inference](https://skillalmanac.com/glossary/inference.md)

## Sources

- [Distilling the Knowledge in a Neural Network](https://arxiv.org/abs/1503.02531), arXiv (Hinton, Vinyals, Dean) (accessed 2026-11-23)
- [What is knowledge distillation?](https://www.ibm.com/think/topics/knowledge-distillation), IBM (accessed 2026-11-23)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
