Learn › Inference & Serving
·★ MEMBER·PAPER·7 min read

Paper Explained: When EOS Tokens Disagree — Why On-Policy Distillation Students Forget How to Stop

In on-policy distillation, student responses can grow until they hit the generation budget. This paper (arXiv:2609.20511) traces a major cause to student and teacher marking 'the end' with different special tokens. We walk through it from scratch, using only the paper itself.

Key points

  • In on-policy distillation (OPD), the student writes its own answer and the teacher marks it up token by token.
  • The paper identifies a termination-token mismatch between a pretrained (base) student and a post-trained teacher as a key source of excessive response length.
  • The Qwen3 base model declares only <|endoftext|>, while post-trained Qwen3 also stops on the chat terminator <|im_end|>.
  • Treating functionally equivalent EOS tokens as one shared semantic "stop" action substantially reduces mismatch-induced inflation in all three families.
  • A stage-wise study on K2-Horizon also reveals a separate, late-stage inflation that survives termination alignment.
ModalitytextTaskinference

When EOS Tokens Disagree: Understanding Length Inflation in On-Policy Distillation

Primary source — what this article is built on

undefined2026-09-17→undefined2026-09-25same month

When EOS Tokens Disagree: Understanding Length Inflation in On-Policy DistillationYuxiao Yang, Tianrun Yu, Shangzhe Li et al. · 2026-09-17 · v1arXiv:2609.20511Paper page·PDF
undefined

We study length inflation in on-policy distillation (OPD), where student responses can become excessively long and even exhaust the generation budget. We identify \emph{termination-token mismatch} between base students and post-trained teachers as an important source of this behavior. Across Qwen3, Llama, and Gemma, the two models can place their stopping probability on different EOS tokens, even when their declared stopping sets are identical. This mismatch can suppress the student's preferred termination action without reliably transferring the teacher-preferred alternative. We show that aligning the decoding stopping set alone is insufficient, while treating functionally equivalent EOS tokens as a shared semantic stopping action substantially mitigates mismatch-induced length inflation across all three model families. To further understand how termination behavior evolves over training, we study OPD across different K2-Horizon training stages. This stage-wise analysis shows that termination preferences can shift substantially during training, while also revealing a distinct length inflation late in the OPD run that persists beyond termination alignment. Together, these results identify termination mismatch as an important, but not exhaustive, source of OPD length dynamics. We release an implementation incorporating the proposed termination-handling corrections.


The student who got the answer right and kept talking

A model solving a math problem writes the correct answer at token 1,094. Then it doesn't stop. It repeats itself for another 7,098 tokens until it hits the generation budget — 86.6% of the response is dead weight. That's not a made-up example; it's a real training rollout from the paper's appendix (Appendix F.1).

The paper is "When EOS Tokens Disagree: Understanding Length Inflation in On-Policy Distillation" (arXiv:2609.20511, posted 2026-09-17).

Here's what the abstract claims. In on-policy distillation (OPD), student responses can become excessively long, sometimes exhausting the generation budget. The authors identify a key source: a termination-token mismatch between a pretrained (base) student and a post-trained teacher. Across Qwen3, Llama, and Gemma, the two models can put their stopping probability on different EOS tokens — even when their declared stopping sets are identical. The mismatch suppresses the student's own way of stopping without reliably teaching it the teacher's. Aligning the decoding stop set alone doesn't help, but treating functionally equivalent EOS tokens as one shared semantic "stop" action substantially reduces mismatch-induced inflation in all three families. A stage-wise study on K2-Horizon also reveals a separate, late-stage inflation that survives termination alignment. The bottom line: termination mismatch is an important source of OPD length dynamics, but not the only one.

Background: what on-policy distillation is

Think of a tutor. Classic distillation is "copy the teacher's model answer." On-policy distillation (OPD) is "you write your own answer, and the teacher marks it up token by token." The student gets corrected on exactly the kind of answer it would actually produce (§1).

Section 2 of the paper turns the red pen into a formula. Call the student πθ\pi_\theta, the teacher πE\pi^E, the prompt plus the partial answer so far sts_t, and the token the student just wrote yty_t.

At=log⁡πE(yt∣st)−log⁡πθ(yt∣st)A_t=\log\pi^{E}(y_t\mid s_t)-\log\pi_{\theta}(y_t\mid s_t)
(1)

In words: how likely the teacher thinks this exact token is, minus how likely the student thought it was. Positive means "write more of this"; negative means "write less of this."

The crucial detail: the teacher only grades tokens the student actually sampled. The paper calls this sampled-token OPD, and every experiment uses it (§2). A token the student never writes almost never gets graded.

Intuition: two ways to say "I'm done"

An LLM ends its response by emitting a special token — an EOS (end-of-sequence) token. The catch is that several tokens can mean "done." Per the paper's Table 1, the Qwen3 base model declares only <|endoftext|>, while post-trained Qwen3 also stops on the chat terminator <|im_end|>. Llama 3.2 follows the same pattern. Gemma 3's PT and IT checkpoints declare the same pair, <eos> and <end_of_turn> (§2).

Picture the next-token distribution as a bar chart that sums to 1. If there are several EOS bars, the model's urge to stop can be split across them.

FIG 1The next-token distribution is a bar chart summing to 1 — the urge to stop can be spread across several EOS bars

The student stacks its "done" on the `<|endoftext|>` bar; the teacher stacks it on `<|im_end|>`. Same decision, different bar. That is the termination-token mismatch.…

What's behind this

§

Members-only from here

449 walkthroughs, 42 textbook chapters, 48 student units and 6 close readings — all included for $4.99/mo, with about three new explainers a day on average. Cancel any time; access runs to the end of the period.

Already a member? Sign in to keep reading

References

  1. Yuxiao Yang, Tianrun Yu, Shangzhe Li, Kaixiang Zhao et al.. (2026-09-17) When EOS Tokens Disagree: Understanding Length Inflation in On-Policy Distillation. arXiv:2609.20511Paper page·PDF

This article is written from the source paper above. Where they differ, the original is authoritative.

Published by TechAthletes · Editorial policy · How we cite · Corrections

Comments

Sign in to comment