跳到正文
arXiv cs.AI· Xiaolin Lin, Kai-Chiang Wu, Freddy Gabbay, Shaoyi Huang, Bing Li, Grace Li Zhang·· 3 天前AI 评分47

远而不只是长:是什么限制了长上下文投机解码

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

AI 导读

一项 arXiv 研究发现,投机解码 drafter 在长输入上接受率骤降的主因是“距离”:所需文本超出 drafter 训练中见过的最远有效范围后接受率大跌,输入变长本身影响较小,该规律在 EAGLE-3、DFlash、DSpark 上均成立。

正文 · 原文

View PDF HTML (experimental)

Abstract: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.
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI)
Cite as: arXiv:2612.03576 [cs.CL]
  (or arXiv:2612.03576v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2612.03576

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Grace Li Zhang [view email]
[v1] Wed, 2 Dec 2026 10:35:12 UTC (333 KB)

来源:arXiv cs.AI · arxiv.org