Papers
arxiv:2609.20511

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

Published on Sep 17
· Submitted by
Kaixiang Zhao
on Sep 18
#3 Paper of the day
Authors:
,
,
,
,
,

Abstract

We study length inflation in on-policy distillation (OPD), where student responses can become excessively long and even exhaust the generation budget. We identify 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.

Community

Paper author Paper submitter

🚨 Your OPD Run May Be Penalizing the Model for Stopping

In one Qwen3 rollout, the student reaches the correct answer after 1,094 tokens, then generates 7,098 redundant tokens. We investigate how on-policy distillation (OPD) can produce this failure.

🔍 The mechanism: base students and post-trained teachers can favor different EOS tokens, even within the same declared stopping set. Sampled-token OPD can then suppress the student’s preferred EOS without reliably transferring the teacher’s alternative.

💡 The correction: aggregate probabilities over functionally equivalent EOS tokens and supervise them as one semantic stopping action. Matching the decoding stopping sets alone is insufficient.

📉 The evidence: this correction substantially reduces response length and truncation in our Qwen3, Llama, and Gemma experiments on mathematical reasoning.

🧩 Beyond EOS mismatch: with a pretrained K2-Horizon student, length inflation reappears later in training even after the correction, leaving additional dynamics to explain.

💬 Have you observed similar termination failures in your OPD experiments? We welcome comparisons and discussion!

🔗 Project page · 💻 Code

Wait — so the length inflation I've been chasing in my distilled agents might be a token ID mismatch, not reward hacking? That would explain a lot of the weird behavior I've seen where the student just keeps generating past where it should stop. The question I'd want answered: does aligning the student's and teacher's EOS token IDs actually kill the inflation, or does it just move the problem somewhere else? If it's really that simple, a bunch of us have been debugging the wrong thing entirely. I'm going to check my own training runs for this before I blame the reward signal again.

·

Thank you for your interest! We find that EOS mismatch can be an important contributor to length inflation. In our experiments with Qwen3, Llama 3.2, and Gemma 3, aligning termination semantics rather than just the decoding stop-token IDs substantially reduces inflation. However, we still observe late-stage length growth after correction in our K2-Horizon stage-wise experiments, which we plan to investigate further in future work.

Our current experiments focus on single-turn mathematical reasoning, but the same diagnostic may still be useful more broadly. If you check your runs, one useful diagnostic is to inspect the teacher's EOS distribution at the positions where the student terminates. In particular, check whether the teacher assigns low probability to the student's stopping token while preferring a different, semantically equivalent EOS token.

This is an automated message from the ResearchStudio team.

We created an interactive ResearchStudio Reel for this paper. It includes a visual poster, a video, and a blog, all available for download in editable formats.

Visual poster for this paper

Open the ResearchStudio Reel →

Download all files from Hugging Face

Please give this comment a thumbs up if you find the Reel helpful!

Want to explore or create Reels for more papers? Visit the ResearchStudio demo.

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2609.20511
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2609.20511 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2609.20511 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2609.20511 in a Space README.md to link it from this page.

Collections including this paper 1