F
Member
【Editorial Discussion】
A distillation pipeline may store only the teacher's top-k token probabilities to reduce storage. During training, it may then renormalize both teacher and student over that shortlist and compute a divergence there. The loss can be small even while the student assigns most of its probability to tokens outside the shortlist. Matching relative preferences within a subset is not the same objective as matching its probability mass.
This discussion assumes a shared vocabulary and tokenization. It is not about a stale speculative-decoding draft or a tokenizer mismatch. The failure mechanism is an objective that discards the very mass it appears to supervise.
**An algebraic fixture before a training run**
Let p be a normalized teacher target supported on the stored shortlist S. Construct a full student distribution q such that q(i)=c*p(i) for tokens in S, with the remaining probability outside S. Here c is strictly between zero and one. After renormalizing q within S, the two conditional distributions match exactly, regardless of c.
The conditional KL is therefore zero. By contrast, comparing p with the full student distribution gives KL(p||q) equal to -log(c). This tiny constructed example distinguishes the objectives without any model training or empirical performance claim. A unit test should vary c while keeping within-shortlist proportions fixed and verify which quantity the implemented loss actually responds to.
**Inspect what the stored teacher data can support**
If only normalized shortlist probabilities were saved, the teacher's original mass outside S is unavailable. An implementation cannot reconstruct that information by applying another softmax. If the original shortlist mass or a residual bucket is retained, it may support a richer objective, but a single residual mass still does not identify how the teacher distributed probability among omitted tokens.
Next, inspect the student's normalization. Reading logits for S and applying a shortlist softmax differs from selecting log probabilities computed with the full vocabulary normalizer. The tensors may have the same shape and the loss may decrease in both cases, while the gradients express different training goals.
Compare those gradients on the synthetic fixture. Does moving probability from S to its complement incur a penalty? Does redistributing probability within S incur a different one? Add an ordinary full-vocabulary small example where the complete teacher distribution is available to show what each truncated objective loses.
There are limits. Conditional distillation may be an intentional auxiliary objective rather than a defect, especially when combined with other losses. Treating the teacher's omitted tail as zero also changes the target and can discourage legitimate alternatives. Storage savings, tail fidelity, and optimization behavior require an explicit trade-off, not an assumption that one KL calculation is universally correct.
What probability information do you retain when caching teacher outputs? Which loss test tells you whether the student learned the teacher's shortlist mass or merely its ordering within that shortlist?
A distillation pipeline may store only the teacher's top-k token probabilities to reduce storage. During training, it may then renormalize both teacher and student over that shortlist and compute a divergence there. The loss can be small even while the student assigns most of its probability to tokens outside the shortlist. Matching relative preferences within a subset is not the same objective as matching its probability mass.
This discussion assumes a shared vocabulary and tokenization. It is not about a stale speculative-decoding draft or a tokenizer mismatch. The failure mechanism is an objective that discards the very mass it appears to supervise.
**An algebraic fixture before a training run**
Let p be a normalized teacher target supported on the stored shortlist S. Construct a full student distribution q such that q(i)=c*p(i) for tokens in S, with the remaining probability outside S. Here c is strictly between zero and one. After renormalizing q within S, the two conditional distributions match exactly, regardless of c.
The conditional KL is therefore zero. By contrast, comparing p with the full student distribution gives KL(p||q) equal to -log(c). This tiny constructed example distinguishes the objectives without any model training or empirical performance claim. A unit test should vary c while keeping within-shortlist proportions fixed and verify which quantity the implemented loss actually responds to.
**Inspect what the stored teacher data can support**
If only normalized shortlist probabilities were saved, the teacher's original mass outside S is unavailable. An implementation cannot reconstruct that information by applying another softmax. If the original shortlist mass or a residual bucket is retained, it may support a richer objective, but a single residual mass still does not identify how the teacher distributed probability among omitted tokens.
Next, inspect the student's normalization. Reading logits for S and applying a shortlist softmax differs from selecting log probabilities computed with the full vocabulary normalizer. The tensors may have the same shape and the loss may decrease in both cases, while the gradients express different training goals.
Compare those gradients on the synthetic fixture. Does moving probability from S to its complement incur a penalty? Does redistributing probability within S incur a different one? Add an ordinary full-vocabulary small example where the complete teacher distribution is available to show what each truncated objective loses.
There are limits. Conditional distillation may be an intentional auxiliary objective rather than a defect, especially when combined with other losses. Treating the teacher's omitted tail as zero also changes the target and can discourage legitimate alternatives. Storage savings, tail fidelity, and optimization behavior require an explicit trade-off, not an assumption that one KL calculation is universally correct.
What probability information do you retain when caching teacher outputs? Which loss test tells you whether the student learned the teacher's shortlist mass or merely its ordering within that shortlist?