当EOS Token意见不合:理解在线策略蒸馏中的长度膨胀

·

研究论文 · 2026/09/18

本文研究在线策略蒸馏(OPD)中的长度膨胀问题,即学生模型的回复可能变得过长甚至耗尽生成预算。作者发现基础学生模型与后训练教师模型之间的终止标记不匹配是导致该行为的一个重要原因。在Qwen3、Llama和Gemma上,即使声明的停止集相同,两个模型也可能将停止概率放在不同的EOS标记上。这种不匹配会抑制学生偏好的终止动作,同时无法可靠地传递教师偏好的替代方案。作者表明,仅对齐解码停止集是不够的,而将功能等价的EOS标记视为共享的语义停止动作,可以显著缓解所有三个模型家族中由不匹配引发的长度膨胀。为了进一步理解终止行为在训练中如何演变,作者研究了不同K2-Horizon训练阶段的OPD。这种分阶段分析表明,终止偏好可能在训练过程中发生显著变化,同时揭示了在OPD运行后期出现的一种独特的长度膨胀,这种膨胀在终止对齐后仍然存在。总之,这些结果将终止不匹配确定为OPD长度动态的一个重要但非全部来源。作者发布了包含所提出的终止处理修正的实现。

该研究深入分析了在线策略蒸馏中一个具体且实际的问题——长度膨胀,并提出了有效的缓解方法,对模型蒸馏和生成控制领域具有重要参考价值。

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.

阅读原文

参与讨论