Distillation
Why Distillation Matters
Modern language models are trained at a scale that was difficult to imagine only a few years ago. Models with tens of billions of parameters can write high quality code, solve complex mathematical problems, and produce detailed scientific explanations. These capabilities emerge from large datasets and large model capacity.
However, the same scale that produces these abilities also creates a practical constraint.
A model with 70 billion parameters may perform extremely well during evaluation, but deploying it is expensive. Each inference request requires significant GPU memory. Latency increases because many layers must be executed sequentially. Running such a model continuously often requires large clusters of specialized hardware. For many applications this is simply not practical.
This creates a tension between capability and usability. The most capable models are often the hardest to deploy.
A natural response is to ask whether the behavior of a large model can be transferred to a smaller one. Instead of serving the original system, we train a compact model that imitates its behavior. If the imitation is successful, the smaller model preserves most of the teacher's performance while requiring far fewer computational resources.
This idea forms the basis of knowledge distillation.
In distillation, a large pretrained model acts as a teacher. A smaller model, called the student, is trained to reproduce the teacher's outputs. The student learns by observing how the teacher responds to many inputs and gradually adjusting its parameters so that its predictions match the teacher's behavior.
Early work framed distillation primarily as a compression technique. Large ensembles or heavy neural networks could be distilled into smaller models that were easier to deploy. The goal was efficiency. If a compact model could approximate the teacher's predictions closely enough, it could replace the original system in production.
However, the role of distillation has expanded as language models have grown larger and more complex.
In modern LLM training pipelines, distillation is used not only to reduce model size but also to transfer capabilities between models. A powerful frontier model can be used to generate supervision signals for smaller models. Distillation can also stabilize continual learning, help align models with instruction following behavior, and improve reasoning performance when combined with other training strategies.
The basic idea therefore appears simple: train a small model to imitate a large one.
However, once we look more closely, the problem becomes more subtle.
A language model does not only produce answers. It produces probability distributions over thousands of tokens at every step of generation. These distributions encode relationships between words, concepts, and reasoning patterns that the model has learned during training.
The central question of distillation is therefore not simply how to copy the teacher's answers.
The real question is how to transfer the structure of the teacher's knowledge into a smaller network.
Understanding how this transfer works requires a closer look at how distillation is formulated mathematically and how the training signal is constructed.
Preliminaries
Before looking at specific distillation methods, we first need to clarify the basic setup. The vocabulary of distillation is small, but each term refers to a specific role in the training process. Once these pieces are clear, the later techniques become easier to understand.
Teacher, Student, and Transfer Data
Every distillation procedure contains three components.
The first is the teacher model. This is a large model that has already been trained. The teacher contains the knowledge we want to transfer. In modern LLM pipelines this could be a frontier system such as GPT-4, Llama-3.1-70B, or DeepSeek-R1.
The second component is the student model. The student is smaller and cheaper to run. During distillation we update the student's parameters so that its behavior becomes similar to the teacher's.
The third component is the transfer dataset. This dataset contains the inputs that both models process during training. For each example, the teacher produces outputs that become the supervision signal for the student.
An important detail is that this dataset does not always require human labels. In many cases the teacher itself generates the training signal. This allows researchers to create extremely large supervision datasets without manual annotation.
At first glance, this setup looks similar to ordinary supervised learning. A model sees inputs and learns to predict outputs. But distillation differs in one important way. The teacher does not only provide the final answer. It also provides information about how confident it is about every possible answer.
This distinction leads to the concepts of hard targets and soft targets.
Hard Targets and Soft Targets
In standard supervised learning the model receives a hard target. A hard target places all probability on a single correct answer.
For example, suppose the question is:
What is the capital of France?
A hard label simply says the answer is Paris. In probability form it would look like this:
Paris = 1.00
Lyon = 0.00
Bordeaux = 0.00
This representation throws away a lot of information. It only tells the model which answer is correct.
A teacher model, however, produces a full probability distribution. Its output might look like this:
Paris = 0.91
Lyon = 0.04
Bordeaux = 0.02
Other tokens = small probabilities
This is called a soft target.
Even the incorrect answers contain useful information. If the teacher gives 4 percent probability to Lyon, it is quietly encoding the fact that Lyon is also a major French city. That relational information reflects how the model organizes knowledge internally.
Hinton, Vinyals, and Dean described this hidden structure as dark knowledge (Hinton, Vinyals et al. 2015). When a student learns from the full probability distribution rather than only the correct answer, it can absorb part of this structure.
However, there is a practical issue.
Well trained language models often produce very sharp probability distributions. The correct token may receive 99 percent probability while the remaining tokens receive extremely small values. In that situation the distribution does not provide much additional signal beyond the correct answer.
To make the distribution more informative, distillation introduces a simple adjustment called temperature scaling.
Temperature Scaling
Temperature scaling changes how sharp or flat the output probabilities are.
If the temperature is low, the distribution becomes very sharp. One token receives almost all the probability.
If the temperature is higher, the probabilities spread out and reveal more information about the relationships between tokens.
The idea can be understood with a small example.
Suppose the teacher produces four scores for four tokens:
3.2,1.1,0.4,−0.83.2,1.1,0.4,−0.8
When these scores are converted to probabilities using a standard softmax with temperature equal to 1, the result might look like this:
0.83,0.10,0.05,0.020.83,0.10,0.05,0.02
The first token clearly dominates the distribution.
Now imagine we increase the temperature to 3. This softens the distribution. The same scores might now produce probabilities closer to:
0.40,0.24,0.20,0.160.40,0.24,0.20,0.16
Instead of one token dominating the entire signal, all tokens now contribute information. The student can observe which alternatives the teacher considers somewhat plausible and which ones it strongly rejects.
In practice, many distillation experiments use temperature values such as 4, 8, or even 20 to expose this relational structure (Hinton, Vinyals et al. 2015).
Once the teacher distribution is softened, the student can attempt to match it.
But this raises another question. Should the student only learn from the teacher's probabilities, or should it also learn from the original labels?
The standard answer is to use both.
The Distillation Loss
Distillation training typically combines two learning signals.
The first signal comes from the original labels. The student should still learn the correct answers.
The second signal comes from the teacher's probability distribution. The student should also imitate the teacher's confidence patterns.
These two objectives are combined in a single loss function.
In simple terms the training rule can be written as:
total loss=α× label loss+(1−α)×teacher losstotal loss=α× label loss+(1−α)×teacher loss
The parameter αα controls how much weight each signal receives.
To see how this works, consider a small numerical example with four possible tokens.
Teacher probabilities:
0.45,0.30,0.15,0.100.45,0.30,0.15,0.10
Student probabilities:
0.35,0.28,0.22,0.150.35,0.28,0.22,0.15
The correct answer is the first token.
If the student assigns probability 0.35 to the correct answer, the label cross-entropy loss is roughly 1.05.
loss=−ln(0.35)=1.05loss=−ln(0.35)=1.05
The difference between the teacher and student distributions might produce a teacher loss of about 0.036.
KL=∑pteacherln(pteacherpstudent)=0.45ln(0.45/0.35)+0.30ln(0.30/0.28)+0.15ln(0.15/0.22)+0.10ln(0.10/0.15)=0.45×0.251+0.30×0.069+0.15×(−0.383)+0.10×(−0.405)=0.113+0.021−0.057−0.040=0.036KL=∑pteacherln(pstudentpteacher)=0.45ln(0.45/0.35)+0.30ln(0.30/0.28)+0.15ln(0.15/0.22)+0.10ln(0.10/0.15)=0.45×0.251+0.30×0.069+0.15×(−0.383)+0.10×(−0.405)=0.113+0.021−0.057−0.040=0.036
If we choose αα = 0.5 and use a temperature of 4, the combined loss becomes approximately 0.81
total=α×label loss+(1−α)×T2×teacher loss=0.5×1.05+0.5×16×0.036=0.525+0.288=0.813total=α×label loss+(1−α)×T2×teacher loss=0.5×1.05+0.5×16×0.036=0.525+0.288=0.813
This number simply tells us how far the student is from matching both the correct answer and the teacher's probability structure.
Training then adjusts the student parameters to reduce this loss over many examples.
This formulation, introduced by Hinton, Vinyals, and Dean (2015), became the standard framework for knowledge distillation.
Forward KL and Reverse KL
Once the student begins learning from the teacher's probability distribution, another design choice appears. We must decide how the student should compare its probabilities with the teacher's probabilities.
Two closely related measures are commonly used for this comparison. They are known as forward KL and reverse KL. Both measure how different two probability distributions are, but they encourage slightly different behavior from the student.
KL, or KL divergence, short for Kullback–Leibler divergence, is simply a way to measure how far one probability distribution is from another. If two distributions are identical, the KL value is zero. As the distributions become more different, the KL value increases. In distillation, the teacher's probabilities act as a reference, and the student adjusts its predictions so that its distribution becomes closer to the teacher's.
To see why this matters, consider a simple example. Suppose the teacher believes that two answers are somewhat reasonable, but one is clearly better.
Teacher distribution:
Answer A = 0.60
Answer B = 0.30
Answer C = 0.10
Now imagine the student produces the following distribution:
Answer A = 0.40
Answer B = 0.40
Answer C = 0.20
The student has spread probability more evenly across the options. The question is how strongly the training objective should penalize this behavior.
Forward KL: covering all possibilities
Forward KL measures the difference between the teacher distribution and the student distribution. In simple terms it asks:
How well does the student cover the probabilities that the teacher assigns?
The formula can be written as
forward KL=sum of teacher probability×log(teacher probability÷student probability)forward KL=sum of teacher probability×log(teacher probability÷student probability)
What matters here is that each term is weighted by the teacher's probability.
Because of this weighting, forward KL encourages the student to assign probability to all tokens that the teacher considers plausible. If the teacher gives 30% probability to answer B, the student is encouraged to place probability there as well.
In practice this produces what researchers call mode covering behavior. The student tries to cover all the possibilities the teacher considers reasonable.
This behavior can be useful when the goal is to preserve the full range of the teacher's predictions.
However, language generation often requires a different kind of behavior.
Reverse KL: choosing the strongest option
Reverse KL flips the comparison. Instead of weighting the difference by the teacher probabilities, it weights it by the student probabilities.
The formula becomes
reverse KL=sum of student probability×log(student probability÷teacher probability)reverse KL=sum of student probability×log(student probability÷teacher probability)
Now the penalty depends on where the student places its probability.
If the student puts weight on an option that the teacher thinks is very unlikely, the loss becomes large. As a result, the student quickly learns to avoid those options.
This produces mode seeking behavior. Instead of covering every possibility, the student tends to concentrate probability on the strongest option.
In language generation this often produces more decisive outputs. Rather than producing text that averages several possibilities, the model commits to a specific continuation.
Why this matters for LLMs
This distinction becomes important for long text generation.
When forward KL is used, the student sometimes spreads probability across many tokens that the teacher considers only slightly plausible. Over many steps this can lead to text that feels vague or hedged.
Reverse KL pushes the student toward sharper predictions. The model learns to concentrate on the most likely continuation rather than distributing probability across many alternatives.
The MiniLLM study showed that reverse KL often works better for language generation tasks, especially when outputs become long and reasoning chains extend across many tokens (Gu, Dong et al. 2023).
Benchmarks such as TriviaQA, Natural Questions, HellaSwag, and WinoGrande showed consistent improvements when reverse KL was used during distillation.
This observation highlights an important point.
Distillation is not only about copying the teacher's probabilities. The way those probabilities are compared during training can change how the student generates text.
Once this difference became clear, researchers began to revisit the broader training process used in distillation. The next issue they encountered was not about the loss function itself, but about how the training data is generated.
This leads to a deeper problem in sequence generation known as exposure bias.
The Exposure Bias Problem
The ideas introduced in the previous section explain how the student can learn from the teacher's probability distributions. However, these methods assume something about the training data that turns out to be problematic for language generation.
To see the issue, consider how early distillation systems were trained.
The simplest approach is straightforward. The teacher generates text, and the student learns to imitate it. The student receives the teacher's sequences and is trained using standard cross entropy. This method is often called off policy distillation because the student learns from data that it did not generate itself.
At first this seems perfectly reasonable. If the teacher is strong, then the text it produces will be high quality. Training on such data should allow the student to inherit the teacher's capabilities.
In practice this approach works well for many tasks. Instruction tuning methods such as Alpaca follow this strategy. A powerful teacher model generates instruction following examples, and a smaller model is trained to reproduce them. This simple pipeline can transfer a surprising amount of capability from a large model to a smaller one.
However, when language models generate long sequences, another issue appears.
The mismatch between training and inference
Language models generate text one token at a time. At each step the model conditions on all tokens that came before it.
During training with off policy distillation, the student always sees teacher generated prefixes. These prefixes are usually correct and well formed. As a result the student learns to predict the next token assuming that all previous tokens are accurate.
During inference the situation is different.
The student now generates the text itself. Small mistakes inevitably occur. Once an incorrect token appears, the rest of the sequence must be generated from that flawed prefix.
This situation was studied earlier in imitation learning and is known as exposure bias (Ross, Gordon et al. 2011). The idea comes from sequence prediction problems where a model learns to imitate expert behavior but later has to act on its own.
The core issue is a distribution mismatch between training and inference.
During training with standard supervised learning or off-policy distillation, the model always sees correct prefixes. The teacher generates the sequence, and every step of training assumes that the previous tokens are accurate.
During inference, however, the student generates the sequence itself. Small mistakes inevitably occur, and once a mistake appears, the rest of the sequence must be generated from that imperfect context.
In other words, the model was trained in one environment but deployed in another.
Consider a model learning to generate a short reasoning trace.
Question: What is 17 + 8?
Teacher reasoning sequence:
Step 1: 17 + 8
Step 2: (17 + 3) + 5 = 20 + 5
Step 3: 20 + 5 = 25
Final answer: 25
During training the student always sees prefixes like
Step 1: 17 + 8
Step 2: (17 + 3) + 5 = 20 + 5
and learns to continue correctly.
Now imagine you are inferencing the student model.
Suppose the student makes a small mistake early in the reasoning chain:
Step 1: 17 + 8
Step 2: (17 + 4) + 5 = 21 + 5
This prefix will be expected to be correct, as during training, the prefix are assumed to be correct. But obviously it is incorrect. However, the model still has to continue from this state.
Since it never learned how to recover from incorrect intermediate steps, the sequence would naturally deteriorates, with the error compounding over time.
Step 1: 17 + 8
Step 2: (17 + 4) + 5 = 21 + 5
Step 3: 21 + 5 = 26
Final answer: 26
This compounding effect becomes much more severe for long sequences. A single early mistake can push the model into regions of the input space it never saw during training.
Why stronger teachers do not fully solve the problem
One natural response is to improve the quality of the teacher's outputs. If the teacher produces extremely good reasoning traces, perhaps the student can simply learn from those demonstrations.
This strategy has indeed produced impressive results. DeepSeek R1 showed that a strong teacher can transfer reasoning capabilities to smaller models through supervised distillation alone (Guo, Yang et al. 2025).
However, the exposure bias problem does not disappear.
Even if the teacher's outputs are excellent, the student still never experiences its own mistakes during training. Once generation begins at inference time, the model may enter states that were never observed during training.
The lesson is that sequence models must be trained on the same distribution they will encounter at inference.
If the student generates the text during deployment, then the training data should include student generated prefixes as well.
Learning from student generated sequences
This idea leads to a different training strategy.
Instead of training only on teacher generated sequences, the student generates text during training. The teacher then evaluates these sequences and provides feedback token by token.
In other words, the student learns from its own trajectories, not just from the teacher's demonstrations.
This principle was first formalized in the DAgger framework for imitation learning (Ross, Gordon et al. 2011). Later work extended the idea to large language models (Agarwal, Vieillard et al. 2023).
Once this shift occurs, the structure of distillation changes in an important way. The student is no longer simply copying teacher outputs. Instead, the teacher acts as a guide that evaluates the student's behavior during generation.
This training strategy is known as on policy distillation, and it represents a major shift in how knowledge transfer is performed in modern LLM systems.
On policy vs off policy distillation
So there is an important distinction between the 2.
Let's use chess as an intuitive example.
For off policy distillation:
The teacher model plays many chess games and produces a dataset of board positions and best moves. The student model is trained to imitate the teacher on those recorded positions, but the student never plays during training.
But the problem is:
- Teacher dataset contains only strong positions from good play.
- After deployment, the student makes a blunder the teacher would almost never make.
Now the board is a bad position that never appeared in the teacher dataset.
Because the student was never trained on such states, it does not know how the teacher would recover.
This leads to:
student blunder → unfamiliar position → worse move → worse position → collapse
For on policy distillation:
The student model plays games during training. For every board position the student reaches, the teacher is queried for the correct move distribution, and the student learns from that feedback.
If the student makes the same blunder, the teacher will still provide guidance, so the student learns how the teacher would respond even in positions caused by its own mistakes.
History of Knowledge Distillation
The ideas behind distillation did not appear all at once. Instead, the field evolved through several stages. Each stage addressed a limitation in the previous one and gradually expanded the role of distillation in machine learning systems.
Early work focused on model compression. Later work clarified why soft targets are useful. As language models became more prominent, researchers adapted distillation to sequence generation and reasoning tasks. Looking at this progression helps explain why modern distillation methods take the form they do.
Model Compression
One of the earliest formulations of distillation appeared in work by Bucilǎ, Caruana, and Niculescu-Mizil (2006). Their goal was simple. They wanted to replace a large ensemble of models with a single smaller model that produced similar predictions.
Ensembles often perform very well because they combine the predictions of many models. However, they are expensive to run. Each prediction requires evaluating several networks instead of one.
The researchers proposed training a smaller model directly on the outputs of the ensemble (MUNGE). Instead of learning from the original labels alone, the student learned to match the predictions produced by the larger system.
This idea worked surprisingly well. The compressed model often approached the performance of the full ensemble even though it was much cheaper to evaluate.
At this stage the main goal of distillation was efficiency. The focus was on reducing computational cost while preserving accuracy.
However, later work revealed that the success of distillation was not only due to compression.
Dark Knowledge
The next major step came from Hinton, Vinyals, and Dean (2015). Their work provided a clearer explanation for why distillation works.
They argued that the full probability distribution produced by a model contains information that is absent from the hard labels. The relative probabilities assigned to incorrect answers reflect how the model organizes its internal representations.
For example, if a model assigns small probability to "Lyon" when answering a question about France, it is implicitly encoding that Lyon is related to the concept of French cities.
These relationships are not visible in a hard label that simply states the correct answer.
Hinton and colleagues introduced temperature scaling and the combined loss function discussed earlier. These tools allowed the student to learn from the teacher's softened probability distributions.
Their experiments showed that a single distilled model could sometimes match the performance of a large ensemble while using far fewer parameters.
At this point distillation was understood as more than compression. It was also a way to transfer the structure of the teacher's learned representations.
Still, most of these experiments focused on classification problems. Language generation introduced new challenges.
Sequence Level Distillation
Kim and Rush (2016) extended distillation to sequence generation tasks such as machine translation.
Instead of training the student on the original human references, they first ran the teacher model on the training inputs and collected the sequences it produced. These teacher generated outputs replaced the original references.
The student was then trained with standard cross entropy to reproduce the teacher's sequences.
This approach simplified the learning problem. Human reference translations can be diverse and sometimes inconsistent. Teacher generated outputs tend to be more consistent, which makes the training signal easier for the student to follow.
This idea became extremely influential. Many modern instruction tuning pipelines follow the same pattern. A powerful model generates demonstrations, and smaller models are trained on those outputs.
However, sequence level distillation also inherits the exposure bias issue discussed earlier. The student learns from teacher generated prefixes and may struggle when generating its own sequences.
As distillation research continued, another surprising observation appeared.
Born Again Networks
Furlanello et al (2018) studied what happens when the teacher and student have the same architecture and size.
Intuitively one might expect the student to perform roughly the same as the teacher. After all, the two models have identical capacity.
However, their experiments showed that the student sometimes outperformed the teacher.
They called these systems born again networks. A model could be trained, distilled into another model of the same size, and occasionally achieve better performance than the original.
One explanation is that soft targets act as a form of regularization. Instead of memorizing hard labels, the student learns smoother probability distributions that capture broader relationships in the data.
The process can even be repeated several times. Each new generation of the model learns from the previous one.
This result suggested that distillation might improve generalization even when compression is not required.
Despite these successes, later work raised an important caution.
Fidelity versus Task Performance
Stanton et al (2021) examined the relationship between two quantities. The first is fidelity, which measures how closely the student matches the teacher's output distribution. The second is task performance, which measures how well the student performs on the actual evaluation task.
One might expect these two measures to be strongly related. If the student perfectly reproduces the teacher's predictions, it should also achieve similar performance.
Their experiments showed that the relationship is surprisingly weak.
A student that closely matches the teacher's logits does not always perform better on downstream tasks. In some cases the correlation between fidelity and performance is quite small.
This observation suggests that distillation may succeed for reasons other than strict imitation. The process may act as a regularizer that reshapes the student's learning dynamics rather than simply copying knowledge.
This insight became increasingly relevant as distillation was applied to large language models. Once generation and reasoning tasks entered the picture, the question was no longer just how closely the student could match the teacher.
The more important question became how distillation could transfer complex capabilities such as instruction following and reasoning.
Distillation in Large Language Models
The earlier sections described the basic mechanics of distillation and how the idea developed historically. Once large language models became widely used, distillation entered a new phase. The goal was no longer just compressing classifiers or ensembles. Researchers now wanted to transfer complex capabilities such as instruction following, reasoning, and long text generation.
This change required adapting distillation methods to the structure of autoregressive language models. In practice the field moved through two stages. First came large scale off policy distillation, where smaller models learned from text generated by powerful teachers. Later work introduced on policy distillation, where the student learns while generating its own sequences.
Distilling Large Language Models with Off Policy Imitation
The simplest way to distill a language model is still the same idea introduced in earlier work. The teacher generates outputs for many prompts, and the student learns to reproduce those outputs.
This approach is often called off policy distillation because the student does not generate the training data. The training sequences come entirely from the teacher.
One of the earliest large scale examples is DistilBERT (Sanh, Debut et al. 2019). The authors wanted to compress the BERT base model while preserving most of its performance. The student network used half the number of layers but kept the same vocabulary and embedding dimensions as the teacher.
Instead of relying on a single training signal, the authors combined several objectives. The student was trained to match the teacher's output distribution using KL divergence. At the same time the student tried to match hidden layer representations using mean squared error. A cosine similarity loss encouraged the internal representations to remain aligned.
The result was a model that was about 40% smaller while maintaining roughly ninety seven percent of the original BERT performance on the GLUE benchmark. Inference also became significantly faster.
As language models grew larger, researchers began applying similar ideas to instruction tuning.
A well known example is Alpaca (Taori et al. 2023). The authors generated about fifty two thousand instruction following examples using GPT 4. A smaller LLaMA model with seven billion parameters was then fine tuned on those examples using standard cross entropy.
This approach is essentially sequence level distillation. The teacher provides high quality demonstrations, and the student learns to imitate them. Despite its simplicity, the method transfers a substantial amount of capability. Many instruction tuned models follow this same strategy.
However, as discussed in the previous section, off policy distillation inherits the exposure bias problem. The student learns from teacher generated prefixes but must generate its own sequences during inference.
This limitation becomes particularly visible in tasks that require long reasoning traces.
On Policy Distillation
To address this issue researchers began to explore on policy distillation.
In this training setup the student generates text during training. The teacher then evaluates the generated sequence and provides a token by token probability distribution that the student tries to match.
Because the student produces the prefixes, the training distribution now matches the inference distribution. If the student makes a mistake at some position in the sequence, that mistake becomes part of the training example. The teacher can still provide guidance for the next token even though the prefix contains errors.
This allows the student to learn how to recover from its own mistakes.
The learning objective can be described in simple terms. For each token the student produces, the teacher supplies a probability distribution over the vocabulary. The student then adjusts its parameters so that its distribution becomes closer to the teacher's distribution at that position.
This approach has an important advantage compared with reinforcement learning.
In reinforcement learning the model usually receives a single reward for the entire sequence. For example a reasoning trace might receive a score indicating whether the final answer is correct.
In contrast, on policy distillation provides feedback at every token. If a generated sequence contains five hundred tokens and the vocabulary contains one hundred thousand tokens, the teacher provides a full probability distribution at each step. This means the training signal contains vastly more information than a single reward value.
Work from Agarwal et al. showed that this dense signal can make on policy distillation much more efficient than reinforcement learning when a strong teacher model is available to evaluate the student's outputs (Agarwal, Vieillard et al. 2024).
Another important observation concerns the choice of divergence. When reverse KL is used instead of forward KL, the student tends to produce sharper and more decisive outputs. This effect was demonstrated in the MiniLLM study (Gu, Dong et al. 2023), which showed improvements on several language understanding benchmarks when reverse KL was used during distillation.
These results suggest that on policy distillation is particularly well suited for reasoning tasks where long sequences are generated.
Self Distillation
More recent work has taken the idea one step further by removing the need for an external teacher.
In self distillation, the model acts as both teacher and student under different conditions.
One example is On Policy Self Distillation for reasoning, often abbreviated OPSD (Agarwal, Vieillard et al. 2024). The key observation is that a model often produces stronger reasoning when it is given the correct answer as additional context.
The training procedure uses two versions of the same model. The student version receives only the question and generates a reasoning trace. The teacher version receives both the question and the correct answer. Because it has more context, it produces better token distributions.
The student is then trained to match those distributions using reverse KL. In this way the model learns to approximate the stronger reasoning behavior of the teacher.
Another example focuses on continual learning.
In Self Distillation for Fine Tuning (Shenfeld, Damani et al. 2026), the model takes a snapshot of its parameters before fine tuning on a new dataset. This frozen checkpoint becomes a teacher that preserves the model's previous behavior.
During fine tuning the student is trained on the new task but also receives a penalty if its probability distribution deviates too far from the frozen teacher. This helps prevent catastrophic forgetting while still allowing the model to learn new capabilities.
Together these methods show that distillation has become a general framework for transferring behavior between models. The teacher may be a large external model, a previous version of the same model, or even the same model operating with additional context.
Let's take a look now at how these ideas are used in practice when building modern language model systems.
Current Practice: How Distillation Is Used in Real Systems
The previous sections focused on the ideas behind distillation and the research that shaped the field. In practice, modern language model systems rarely rely on a single distillation step. Instead, distillation is usually embedded inside a larger training pipeline that includes pruning, fine tuning, alignment, and sometimes reinforcement learning.
In this section we look at how distillation is used in real model development pipelines and what kinds of problems practitioners encounter.
Compression Pipelines and Model Families
One common use of distillation is building smaller members of a model family.
Large frontier models are expensive to deploy, so companies often create smaller variants that inherit their behavior. The smaller models may run faster, require less memory, and can be deployed on a wider range of hardware.
A good example is NVIDIA Minitron (Muralidharan, Turuvekere Sreenivas et al. 2024). In this system, the starting point is a large pretrained model such as Llama-3.1-8B. The researchers first apply structured pruning. Neurons or weights that appear less important during activation analysis are removed.
After pruning, the model has lost some capability. Distillation is then used to recover that lost performance. The original model acts as the teacher, and the pruned model becomes the student. By training the smaller network to reproduce the teacher's outputs, much of the lost accuracy can be restored.
A short phase of continued pretraining stabilizes the model after these steps. The resulting systems, such as Minitron-4B, were shown to outperform several larger baseline models on benchmarks including MMLU, HellaSwag, and WinoGrande.
Another strategy is cascade distillation. Instead of compressing a large model directly into a very small one, the compression happens gradually across several stages.
The Ministral-3 system follows this approach (Liu, Khandelwal et al. 2026). A 14B model is first distilled into an 8B model. The 8B model then becomes the teacher for a 3B student.
Each stage transfers knowledge across a smaller capacity gap. Because the difference between teacher and student is smaller at every step, the training process tends to be more stable.
These examples show how distillation can be used not only to compress models but also to construct an entire family of models at different sizes.
The Modern Post Training Pipeline
In large language model development, distillation is often only one stage in a multi step training pipeline.
A simplified version of this pipeline might look like this.
Stage 1: Pretraining or pruning
A base model is created through large scale pretraining or through compression of a larger model.
Stage 2: Supervised distillation
Instruction following examples are generated using a strong teacher model. The student is trained using cross entropy to reproduce these demonstrations. This step is often similar to the Alpaca style pipelines described earlier.
Stage 3: Alignment
Some systems introduce an additional alignment stage using methods such as RLHF or direct preference optimization. The goal here is to shape the model's behavior according to preference signals or safety requirements.
Stage 4: On policy distillation
Finally, the model may undergo on policy distillation to improve reasoning ability. The student generates sequences and receives token level feedback from the teacher using KL divergence.
This final stage is particularly useful for tasks that require long outputs such as mathematical reasoning or complex explanations.
The overall pipeline therefore mixes several forms of supervision. Some signals come from human annotations, others come from teacher models, and still others come from preference data.
Distillation serves as the mechanism that transfers knowledge between these stages.
Common Failure Modes
Although distillation is powerful, it also introduces several risks that practitioners must manage.
One issue is memorization transfer. If the teacher model memorized rare sequences during its own training, those sequences may be reproduced by the student. Research by Borkar et al showed that soft target distillation can transfer memorized fragments of text from the teacher into the student model (Borkar, Chadha et al. 2026).
This becomes a concern when the teacher was trained on proprietary or sensitive data.
Another issue involves fidelity versus generalization. As discussed earlier, closely matching the teacher's probability distribution does not guarantee improved performance on new tasks. Stanton and colleagues demonstrated that fidelity and downstream accuracy can be weakly correlated (Stanton, Izmailov et al. 2021).
In some cases the student may reproduce the teacher's logits very closely while still failing on evaluation benchmarks.
A third limitation is the capacity bottleneck. Distillation cannot create information that the student model has no capacity to represent. A small model may capture the general behavior of a large teacher, but some capabilities will inevitably degrade as the parameter count decreases.
For example, a 1B parameter student is unlikely to fully replicate the reasoning abilities of a 70B parameter teacher regardless of the training method used.
These limitations highlight an important practical point. Distillation works best when the student still has enough capacity to represent the knowledge being transferred.
Even with these constraints, distillation remains one of the most widely used tools for deploying large language models efficiently.
Understanding how these methods fit together leads naturally to a broader question. After several generations of research, what does the overall landscape of distillation methods look like today?
Final Perspective
Across two decades of research, distillation has evolved from a compression trick into a central tool in the development of large language models.
Instead of training every model independently, modern pipelines increasingly rely on knowledge transfer between models. Large frontier models generate supervision signals that guide smaller systems. Models can learn from previous versions of themselves. Even reasoning strategies can be transferred through structured distillation procedures. A clear example is how DeepSeek-V3 and DeepSeek-R1.
In this sense, distillation has become part of a broader shift in machine learning.
Rather than building each model from scratch, researchers increasingly build networks of models that teach one another.