Cold Starts, Rejection Sampling, and Distillation › Distillation: hard targets, soft targets
Language AI HandbookAll chapters Distillation fits a student to targets supplied by a teacher. DeepSeek-R1 used the same roughly 800,000 training examples for the large model's intermediate supervised stage and the smaller Qwen and Llama models. The student checkpoints ranged from 1.5B to 70B parameters and included Llama-3.3-70B-Instruct. The report describes supervised fine-tuning for those students without an RL stage. DeepSeek-R1 report, §2.4
The sequence-level and logit-level variants are worth separating carefully.
Hard-target sequence distillation. Let be a fixed dataset of prompt and teacher-response pairs . The response can come from stochastic sampling, deterministic decoding, or a filtered teacher proposal. The student objective over this fixed dataset is
The hard target supplies one token at each visited prefix. If averaging over newly sampled teacher responses instead of a fixed dataset, the population objective also averages over for each prompt. With fixed deterministic decoding the response is a function of the prompt.
Kim and Rush compared word-level and sequence-level distillation for machine translation. A hard sequence target can be chosen from the teacher’s output and then used in ordinary supervised training. Student free-running prefixes can still differ from those seen during training. Kim and Rush, §§3–4
Soft-target distillation. On the same fixed prompt and response pairs, the teacher gives a next-token distribution at each visited prefix. The student uses these distributional targets:
Here is the teacher next-token distribution and is the student distribution on the same token categories. Both are evaluated on shared training prefixes . Temperature can change how much probability mass each distribution allocates to alternatives. The displayed equation is cross-entropy at the chosen temperature; specifying any temperature or auxiliary hard-label terms is a separate design choice. Hinton, Vinyals, and Dean, §2
Hard-target distillation is a special case of soft-target distillation in which is a Dirac mass on the teacher's sampled token. Both are valid; they trade off against different concerns.
- Hard targets are straightforward to generate with a text-only teacher and can be retokenized. A chosen response gives the student a precise target for each visited context.
- A single hard target does not tell the student how the teacher scored alternative tokens. Quality depends on the teacher output and dataset selection, and calibration is a separate empirical question.
- Soft targets provide information about alternatives at the training prefix. Exact token-level comparisons require compatible categories or an explicit mapping. Better agreement with the teacher need not improve task accuracy or calibration.
Kim and Rush report results for a machine-translation setup. Their work distinguishes matching teacher token distributions from fitting a sequence selected using the teacher. It does not establish that one method dominates for long reasoning traces. Kim and Rush, §§4–5 and Table 1
Hard targets give the selected token at each visited prefix. Soft targets also give the probabilities of the alternatives at those same prefixes. Neither loss follows branches absent from the training-prefix set. At a fixed prefix, averaging one-hot targets sampled from the same teacher distribution gives that distributional cross-entropy in expectation. The practical difference depends on teacher concentration and prefix coverage.
In that example, the reasoning rows were filtered outputs of the earlier reasoning-RL checkpoint. The non-reasoning rows came from the DeepSeek-V3 pipeline. The report calls student training on this mixture distillation. The role of a teacher in building a corpus can involve proposing or judging rows at different stages.
A student may perform differently across trace lengths or problem types. The following figure makes a hypothetical length pattern explicit. It models a chosen scenario and gives no estimate for a language model.
Longer outputs consume more decoding steps. To compare models across length groups, record how prompts are grouped and whether length is a task property or an outcome of the model’s own generation.
The following illustrative calculation makes the shape of that length dependence explicit. The curves use logistic parameters for a teacher with a longer effective horizon and a student with a shorter one; they are a mechanism sketch, not a fitted model of any specific system.
PythonIn [6]Expand
import numpy as np
trace_lengths = np.arange(20, 421, 10)
teacher_curve = 0.90 - 0.45 / (1.0 + np.exp(-(trace_lengths - 320.0) / 45.0))
student_curve = 0.82 - 0.75 / (1.0 + np.exp(-(trace_lengths - 160.0) / 35.0))VisualizationOut [7]Expand

Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!