arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.17535cs.CLcs.AI
收藏

OPSDL:针对长上下文语言模型的在线自蒸馏

OPSDL: On-Policy Self-Distillation for Long-Context Language Models

Baidu Inc(百度公司)

Xinsen Zhang, Zhenkai Ding, Tianjun Pan, Run Yang, Chun Kang, Xue Xiong, Jingnan Gu

AI总结:

OPSDL通过在线自蒸馏方法提升长上下文能力,利用模型自身短上下文能力作为自教师,通过点-wise KL散度提供每token监督信号,有效减少幻觉并提升样本效率,优于传统后训练方法。

摘要:

扩展大型语言模型(LLMs)的有效上下文长度仍是现实应用中的核心挑战。尽管近期的后训练方法在长上下文扩展方面取得进展,但它们要么依赖高质量监督数据,要么依赖稀疏序列级奖励,导致优化不稳定且效率低下。我们提出OPSDL,一种在线自蒸馏方法,用于增强LLMs的长上下文能力。与其它近期自蒸馏方法不同,OPSDL利用模型自身内在强大的短上下文能力作为自教师,监督其在长上下文场景中的生成。模型首先基于完整的长上下文生成响应,然后自教师通过点-wise KL散度在相关提取的短上下文中提供每token监督信号。这种密集的token级信号鼓励忠实使用相关证据,并减轻无关上下文引起的幻觉。我们在多种从7B到32B参数的模型上评估了OPSDL在长上下文基准上的表现。结果表明,在各种上下文长度下均取得一致且显著的提升,优于标准后训练方法如SFT和DPO,具有更高的样本效率。值得注意的是,这些收益是在不损害一般短上下文性能的情况下实现的。这些发现突显了OPSDL作为可扩展且稳定的长上下文学习方法的有效性。

英文摘要:

Extending the effective context length of large language models (LLMs) remains a central challenge for real-world applications. While recent post-training methods have made progress in long-context scaling, they either rely on high-quality supervision data or sparse sequence-level rewards, leading to unstable and inefficient optimization. We propose OPSDL, an On-Policy Self-Distillation method for enhancing the Long-context capabilities of LLMs. Unlike other recent self-distillation methods that inject privileged information and rely on the model's in-context learning ability to act as a teacher, OPSDL leverages the model's own inherently strong short-context capability as a self-teacher to supervise its own generation in long-context scenarios. The model first generates responses conditioned on the full long-context, then the self-teacher provides per-token supervision signals via point-wise reverse KL divergence under the relevant extracted short-context. This dense token-level signal encourages faithful use of relevant evidence and mitigates hallucinations induced by irrelevant context. We evaluate OPSDL on long-context benchmarks across a range of models from 7B to 32B parameters. Results show consistent and substantial improvements across varying context lengths, outperforming standard post-training approaches such as SFT and DPO with higher sample efficiency. Notably, these gains are achieved without degrading general short-context performance. These findings highlight the effectiveness of OPSDL as a scalable and stable approach for long-context learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑