论文

研究揭示投机解码在长上下文失效的根源并提出 FreeLong 修复方法

Far, Not Just Long: What Limits Long-Context Speculative Decoding

精选理由

做长文本推理优化的开发者应该看看这篇。它把 drafter 掉速的原因定位成距离问题而非长度问题,还给出免训练方案 FreeLong,在 SGLang 里实测能比单独推理快最多 6.6 倍,不用重训 drafter 就能吃到长上下文加速。

一篇 arXiv 论文指出,投机解码的 drafter 在长输入上接受率骤降,主因不是输入长度本身,而是距离效应:当 drafter 需要参考的文本超出其有效范围(训练中遇到的最远距离或注意力窗口),接受率就会大幅下降。这一规律在 EAGLE-3、DFlash、DSpark 三类 drafter 上均被观察到,无论范围来自训练还是注意力窗口限制。

正文

论文据此提出 FreeLong,一种免训练、无损的方法:由目标模型用自身注意力挑选需要的句子,drafter 只读这些句子加最近的 token,组成 2K token 的工作集,把关键文本拉回有效范围内。

在 32K 和 128K 输入上测试十种 drafter,FreeLong 将接受率提升到原来的 1.8-2.6 倍(RULER)和 1.2-2.6 倍(AgentLongBench)。在 SGLang 中解码速度比目标模型单独推理快 1.6-6.6 倍,比原 drafter 快 1.2-2.3 倍。

原文 · arXiv cs.AI

Far, Not Just Long: What Limits Long-Context Speculative Decoding

Speculative decoding speeds up large language models: a small drafter proposes several tokens, and the target model verifies them in one step. However, the acceptance of widely used drafters drops sharply on long inputs that the target handles well. We find that this drop comes mainly from distance: a drafter keeps its acceptance while the text it needs lies well within its effective range, the farthest distance it met in training and can attend to, and loses much of it once this text lies farther back. A longer input also lowers acceptance, but less. We observe this proximity law in EAGLE-3, DFlash and DSpark drafters of several targets, whether training or an attention window sets the range. It leads to a placement principle: a method restores much of the lost acceptance when it places the needed text within the effective range. As one way to apply this principle, we propose FreeLong, a training-free and lossless method that moves the needed text into the drafter's effective range. The target picks the needed sentences with its own attention, and the drafter reads only these sentences and the most recent tokens, in a 2K token working set. Across ten released drafters at 32K and 128K tokens, FreeLong raises acceptance to 1.8-2.6 times that of the original drafters on RULER and 1.2-2.6 times on AgentLongBench. In SGLang, it decodes 1.6-6.6 times faster than the target alone and 1.2-2.3 times faster than the original drafters.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:投机解码、EAGLE-3、SGLang、长上下文,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Xiaolin Lin, Kai-Chiang Wu, Freddy Gabbay, Shaoyi Huang, Bing Li, Grace Li Zhang),经 AITOP 多维评分管线结构化提炼。

发现摘要或翻译有误? 告诉我们