FOLD: Position-Free Far Memory with Local Order for Long-Context Speculative Decoding
Shuxuan Li, Jialiang Kang, Yanghao Zhou, Ziye Zhu, Zhilin Zhao, Xiao Yang
Abstract
Speculative decoding accelerates LLM generation through lightweight drafting and parallel verification. It is particularly promising for long inputs, where KV-cache access costs can be amortized over multiple accepted tokens. Yet most drafters are trained on short sequences and degrade on long inputs, while long-context training is costly. Existing training-free approaches restrict the context window, rescale positions, or augment recent context with retrieved distant entries. Drafters, however, read target hidden states that already encode contextual and positional information, and their lightweight architecture makes full-history attention affordable. We propose FOLD, a training-free method that preserves exact local positions and treats all distant entries as far memory at a shared position. To counter attention dilution as the memory grows, we sharpen attention within it to emphasize relevant entries while separately controlling its total weight relative to the local window. Across six target-drafter pairs and diverse benchmarks of up to 256K tokens, FOLD predominantly delivers the highest speedup, with the best case more than doubling the speedup over autoregressive decoding, from 2.08 to 4.22.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
Related papers
MemDuet: Learning Dual-Process Memory for Long-Context Reasoning
Shared title terminologycs.CLJiangcheng Song, Haodong Jing, Yulin Mu et al.
Beyond Context Length: Characterising the Difficulty of Long-Context Reasoning
Shared title terminologycs.CLShiwen Qin, Cameron Barker, Henry Gouk et al.
From Long Context to Selective Memory:A Survey of Memory-Centric Compression for Large Language Models
Shared title terminologycs.CLChaogui Gou
Look Back, Draft Ahead: Corrective Prefix Attention for Parallel Speculative Decoding
Shared title terminologycs.CLMohammad Mahdi Moradi, Ali Pourranjbar, Zongzuo Wang et al.
LimeTree: Linear-Memory Graph Neural Networks over Tree-Graphs for Resource-Efficient Language Modeling and Context Extrapolation
Shared title terminologycs.CLElisabeth Fink
MERIT: Experience-Guided Memory for Long-Horizon Persona-Specific Persuasive Dialogue
Shared title terminologycs.CLRohan Kirti, Akash Ghosh, Pratik Amrit et al.