On-policy distillation
×One model learns from the specialists: on its own sampled trajectories it minimizes a weighted reverse KL to each teacher, over the full vocabulary.
On-policy distillation
The model being trained writes its own response and a teacher scores each of its tokens: a token the teacher finds more probable than the student does is rewarded, one it finds less probable is penalized.
DeepSeek-V4 report, eq. 29
What the letters mean
: the student, whose own sampled trajectories the loss is taken on; : the -th of expert models; : its weight, typically set by the expert’s relative importance. The KL is over the full vocabulary at each position. Minimized.
On-policy distillation as drawn for Kimi K3 →That plate draws it with Kimi K3’s nine teachers.
- Teachers
- more than ten
- Place
- in place of V3.2’s mixed RL
Not disclosed The weights wᵢ · Steps · Learning rate · Trainable
Why
Distilling at the level of logits merges the experts’ knowledge into one set of weights, avoiding the losses of weight merging or of mixed RL. DeepSeek-V4 report §5.1.2, p. 33
Architecture at this stageThe model as drawn, the published DeepSeek V4-Flash.
What the terms meanTrajectory
- Trajectory
- The record of a model working through a task: its reasoning, its tool calls and what the tools returned, turn by turn.
All settings5
- Objective
- Σᵢ wᵢ · KL(π_θ ‖ π_Eᵢ), the reverse KL to each expert, weighted typically by its relative importance, on trajectories sampled from the student (eq. 29)
- Teachers
- More than ten, covering various domains
- Logits
- Full-vocabulary logit distillation, the complete distribution kept in the reverse KL; in place of the token-level KL estimate of prior work, which leads to high-variance gradients and often unstable training
- Place
- Replaces DeepSeek-V3.2’s mixed RL stage; the rest of the pipeline largely mirrors V3.2’s
- Number format
- Quantization-aware training in post-training: the MoE experts’ weights and the indexer’s query–key path in MXFP4, its index scores in BF16; teacher and reference models included
Sources4
- DeepSeek-V4-2606.19348v1.pdf, p. 32Objective
- DeepSeek-V4-2606.19348v1.pdf, p. 33Objective, Teachers, Logits, Number format
- DeepSeek-V4-2606.19348v1.pdf, p. 28Place
- DeepSeek-V4-2606.19348v1.pdf, p. 4Number format