IN THIS BREAKDOWN · 10 SECTIONS
You can read 22% of this breakdown.
The paper in one minute
Knowledge distillation trains a small student to match a large teacher's next-token distributions. Two choices matter: which loss (forward KL, reverse KL, or blends) and which data the loss is computed on (responses written by the teacher, or by the student itself). Forward KL rewards covering everything the teacher might say, which in a small student smears probability over bad outputs; reverse KL rewards saying only what the teacher likes, which can make the student narrow. Student-written data closes the gap between training and inference, but is lower quality.
DistiLLM-2 pairs each loss with the data it suits. On teacher responses, a skew forward KL (KL from the teacher to a mix of teacher and student) pulls the student's probability up on what the teacher writes. On student responses, a skew reverse KL pushes the student's probability down where the teacher assigns little. The two terms are weighted (1 − β) and β, with β rising linearly from 0.5 toward 1 during training. The skew coefficient α is set per sample from how far the student's probability is from the teacher's. Student responses are regenerated once per epoch rather than every step, which works with fast batched inference.
The authors also show what does not work. Plugging DPO's preference loss in with the teacher as the reference model (DPKD) maximizes the gap between the two responses and drives the student into degenerate text. Using responses from stronger models than the teacher on the forward-KL side did worse than the teacher's own text.
DistiLLM-2 beat KD, SeqKD, ImitKD, GKD, DistiLLM and Speculative KD on instruction following for three teacher-student pairs, on GSM8K and MATH, and on HumanEval and MBPP, and helped as a reference model for DPO, for vision-language students, for recovering INT4 quantized models and for training speculative-decoding drafters.
Research notes: the problem, approach and results
average win-rate points over the next best method for Gemma-2-9B distilled into Gemma-2-2B (74.83 vs 70.30)
speculative-decoding speedup for Phi-3-medium with a 68M drafter distilled by DistiLLM-2; 1.32x with a fine-tuned drafter
ROUGE-L on Dolly when DPO is applied with the teacher as reference (DPKD) versus DistiLLM-2; the DPO variant degenerates
Distilling an LLM into a small model usually applies one loss to whatever data is used, teacher-written or student-written. Forward KL on teacher text spreads the student thin; reverse KL on student text makes it narrow. Applying preference-style losses directly can collapse the student.
Use skew forward KL on teacher responses (pull the student up where the teacher is confident) and skew reverse KL on student responses (push it down where the teacher is not), weight the second more as training goes, set the skew per sample by how far apart teacher and student are, and regenerate student responses once per epoch.
Across three teacher-student pairs, average win rate rose 2.0 to 4.5 points over the next best method; math and code gains over DistiLLM were 0.2 to 6.3 points. A 68M drafter distilled this way sped up Phi-3-medium's speculative decoding 1.97x, against 1.71x for the previous DistiLLM and 1.32x for fine-tuning.
Why it matters to an FDE
Customers who settle on a capable 7B to 9B model often want something smaller for edge devices, latency or cost. Distillation is the standard path, and the choices this paper studies are the ones a team makes, usually by default: which loss, on which data.
The default is often the weakest. Plain KD (forward KL on teacher outputs) scored 41.19 average win rate for Qwen2-1.5B, against 56 to 59 for methods that also use student outputs. If a team's distillation script only replays teacher text, it is leaving most of the gain behind.
Batched student generation is cheap enough. Regenerating student responses once per epoch with a fast inference engine matched fully on-policy training on the authors' Dolly test (ROUGE-L 26.20 vs 26.37), so the on-policy benefit does not require a slow training loop.
Drafters for speculative decoding. A tiny draft model trained this way was accepted more often by the large model, giving 1.97x speedup on Phi-3-medium. If a customer serves a large model and wants lower latency, distilling a better drafter is a direct application.
The gains are a few points, not a new tier. Win-rate gains over the next best method were 2.0 to 4.5 points; math gains over DistiLLM were 0.2 to 1.8. The student still trails the teacher by 15 to 27 points of win rate.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 149 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
What each component added, the data findings, side applications, and three misreadings
Free account - 04How it works
Skew KL and skew reverse KL, the contrastive pairing, the schedules and the training setup
Premium - 05The numbers that matter
Instruction following, math, code, ablations, capacity gap and the side applications
Premium - 06Try it yourself
Recheck the tables, then distill a toy teacher four ways and compare quality and coverage
Premium - 07Where it breaks
LLM-judge evaluation, small math gains, LoRA only, hyperparameters and slips
Premium - 08Using it on a deployment
Distilling a customer's model into a small student or a drafter, and what to measure along the way
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
