arXiv:2510.03680cs.AI2025-10被引 10

解决扩散语言模型生成过早结束的问题

Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs

  • 用轮换的填充符替代重复的结束符,打破结束符主导局面
  • 仅需7个填充符即可避免过早终止,显著提升生成长度与质量
  • 可轻松集成到现有模型,微调一周期限即见效

扩散大语言模型(dLLMs)作为自回归模型的有力替代,具备灵活生成顺序和复杂推理强性能的优势。然而,指令微调后的dLLMs存在一种关键缺陷,称为<eos>溢出:随着序列长度增加,响应反而变短,导致提前终止或退化为连续<eos>令牌流。我们发现其根源在于<eos>同时承担终止与填充双重角色,使后期概率集中于<eos>,并向后传播引发提前终止。为此,我们提出彩虹填充(Rainbow Padding),将重复的<eos>占位符替换为循环使用的不同填充令牌,分散概率分布,打破<eos>主导。实验表明,该方法显著提升长度鲁棒性与输出质量,仅需7个填充令牌即可有效防止提前终止。此外,该方法可高效融入现有指令微调模型:在少量数据上进行单轮LoRA微调即可获得显著提升,极具实用性。代码已开源:https://github.com/quasar529/rainbow-padding。

原文摘要 · Abstract (English)

Diffusion large language models (dLLMs) have emerged as a promising alternative to autoregressive models, offering flexible generation orders and strong performance on complex reasoning tasks. However, instruction-tuned dLLMs exhibit a critical vulnerability we term \texttt{<eos>} overflow: as allocated sequence length increases, responses paradoxically become shorter, collapsing into early termination or degenerating into streams of \texttt{<eos>} tokens. Although noticed in practice, this issue has not been systematically analyzed. We trace its root cause to the dual role of \texttt{<eos>} as both termination and padding, which concentrates probability mass on \texttt{<eos>} at later positions and propagates backward to trigger early termination. To address this, we introduce Rainbow Padding, a simple remedy that replaces repeated \texttt{<eos>} placeholders with a repeating cycle of distinct padding tokens, distributing probability mass and breaking \texttt{<eos>} dominance. Experiments show that Rainbow Padding substantially improves length robustness and output quality, with as few as seven padding tokens sufficient to prevent early termination. Moreover, the method integrates efficiently into existing instruction-tuned models: LoRA fine-tuning for a single epoch on minimal data yields significant improvements, making this solution highly practical. The code is publicly available at https://github.com/quasar529/rainbow-padding.

扩散模型语言模型生成优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。