Far, Not Just Long: What Limits Long-Context Speculative Decoding
Xiaolin Lin, Kai-Chiang Wu, Freddy Gabbay, Shaoyi Huang, Bing Li, Grace Li Zhang
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.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
Related papers
A Knowledge-Base-Grounded Framework for Task-Agnostic Semantic Communication via In-Context LLM Decoding
Shared title terminologycs.CLShumin Yao, Aini Li, Jiaqiong Zhou et al.
Prompt-Based Speculative Decoding for Grammatical Error Correction
Shared title terminologycs.CLRyszard Staruch, Filip Graliński
Architectural Limits on Working Memory Make LLMs More Human-Like
Shared title terminologycs.CLSamuel Joseph Amouyal, Aya Meltzer-Asscher, Jonathan Berant
LEAN: Lightweight Evidence Extraction for Advanced Context Compression through Goal-aligned Training
Shared title terminologycs.CLSeungyoon Lee, Seongtae Hong, Sungbin Han et al.
Schema-Mem: Structured and Evolving Memory for Long-term Conversational Knowledge
Shared title terminologycs.CLJiajun Zhu, Kai Zhang, Meikai Bao et al.
Coupled Activation Flow and Submodular Path Selection for Context-Bounded Knowledge Graph Question Answering
Shared title terminologycs.CLYang Gao, Zuoxu Zhao, Jianshu Zhang et al.