AI Engineering · interactive
Distillation
A big model is slow and expensive to run. Distillation uses it as a teacher: it labels a pile of inputs, and a small student trains on its answers. Keep the teacher's whole probability distribution rather than its top pick and the student learns far more from each example.
Unlabelled inputs
8,000
Teacher, 70B
94% · $15/M
Soft labels
T = 4
Student, 3B
80% · $0.3/M
Your app
180 tok/s
one photo of a cat · what the student is told · T = 4
- cat46.2%
- fox25.4%
- dog21.3%
- car7.1%
1.76 bits of information per example · fox is far more likely than car: that is the knowledge
Student, 3B, 8,000 soft labels at T = 4: 80% (teacher 94%, ceiling for this size 86%).
Labels
Step 1 of 5 · read left to right
In production
Tools and technologies
Distillation is how most small models are made, from logit matching to training on a teacher's outputs.
Not tied to one language — use these names when you search docs or design a system.
- Distilling the Knowledge in a Neural NetworkStandard
Hinton, Vinyals and Dean, 2015: soft targets at a temperature.
Official site ↗ - DistilBERTStandard
Sanh et al., 2019: a 40% smaller BERT keeping 97% of its ability.
Official site ↗ - OpenAI model distillationService
Capture a large model's outputs and fine-tune a smaller one on them.
Documentation ↗ - GemmaSoftware
Google's small open models, trained with distillation from larger ones.
GitHub ↗ - DeepSeek-R1 distilled modelsSoftware
Small models trained on a reasoning model's outputs.
GitHub ↗