Knowledge Distillation
A model compression technique that transfers the capabilities and reasoning patterns of a large Teacher model into a compact Student model for drastically lower latency and inference cost
Table of Contents
Structure Diagram
What is Knowledge Distillation?
A model compression technique that transfers the capabilities and reasoning patterns of a large Teacher model into a compact Student model for drastically lower latency and inference cost. It is a core concept in Training & Tuning within AI / ML.
Core Principles
Knowledge Distillation transfers the capabilities of a large, expensive Teacher model into a compact, fast Student model.
Classic logit distillation minimizes KL divergence between teacher and student Softmax distributions. In modern LLM engineering, synthetic data distillation—collecting verified answers and CoT reasoning traces from a strong teacher to SFT/DPO a 3B–8B student—is the most practical path to frontier-like task quality at a fraction of the cost.
Practical Takeaways
- Prototype big, distill small: Launch with a frontier model to prove product fit and collect real traffic, then distill thousands of verified examples into a compact model to cut serving cost by up to 90%.
- Filter teacher outputs ruthlessly: Only keep teacher completions that pass automated verifiers (schema checks, unit tests, or human review) so errors are not amplified.
- Check provider Terms of Service: Verify licensing rules before distilling from proprietary APIs; open-weights frontier models avoid commercial restriction risks.
Notable Examples
- DeepSeek-R1-Distill Series: Transfers long CoT reasoning capabilities into fast 7B–32B open models.
- Low-Latency Triage & Guardrail Models: Distills complex moderation or intent routing into sub-3B models running in
<30ms. - DistilBERT & Distil-Whisper: Landmark distilled models retaining ~95%+ accuracy at roughly half the size.