Knowledge Distillation
Knowledge distillation is a machine learning technique for training a smaller "student" model to reproduce the behavior of a larger, more capable "teacher" model, transferring much of the teacher's performance into a model that is cheaper…
Definition
Knowledge distillation is a machine learning technique for training a smaller "student" model to reproduce the behavior of a larger, more capable "teacher" model, transferring much of the teacher's performance into a model that is cheaper and faster to run.
Overview
Large, high-capacity models are often expensive and slow to run in production, while smaller models trained from scratch on the same raw data typically underperform them. Knowledge distillation bridges this gap by training the smaller student model not just on raw labeled data, but on the outputs of the larger teacher model — often its full probability distribution over possible outputs ("soft labels") rather than just the single correct answer ("hard labels"), since the teacher's confidence and relative rankings across all options carry additional information about how it reasons that a single ground-truth label doesn't capture. In the context of large language models, distillation is commonly used to compress a large frontier model into a smaller one that retains much of its capability at a fraction of the inference cost, or to specialize a compact model for a narrower task by training it on the outputs a large general-purpose model produces for that task. This can involve generating synthetic training examples with the teacher model, having the student mimic the teacher's step-by-step reasoning traces, or directly matching internal representations between the two models, depending on the specific distillation method used. Distillation is one of several standard model compression techniques, often used alongside quantization and pruning, and is distinct from simply fine-tuning a small model on human-labeled data because it specifically leverages a stronger teacher's outputs as a richer training signal. It has become especially prominent in the era of frontier LLMs, where distilling a large proprietary or open model into a smaller openly deployable one is a common way to make advanced capabilities more broadly accessible and affordable.
Key Concepts
- Trains a smaller student model using outputs from a larger teacher model
- Often uses "soft labels" — full output probability distributions — as training signal
- Transfers much of a large model's capability into a cheaper, faster model
- Can involve mimicking step-by-step reasoning traces from the teacher
- Commonly used to compress frontier LLMs into smaller deployable variants
- Distinct from standard fine-tuning by leveraging a stronger model's outputs directly
- Often combined with quantization and pruning for further model compression
- Enables broader, cheaper access to capabilities originally developed in larger models