跳到正文
arXiv (AI + Vision + Imaging)· Shuxuan Li, Jialiang Kang, Yanghao Zhou, Ziye Zhu, Zhilin Zhao, Xiao Yang·· 1 天前AI 评分30

FOLD:面向长上下文投机解码的无位置远记忆与局部顺序方法

FOLD: Position-Free Far Memory with Local Order for Long-Context Speculative Decoding

AI 导读

FOLD 是一种无需训练的投机解码方法,保留精确局部位置,并将所有远距离条目视为共享同一位置的远记忆。为应对记忆增长带来的注意力稀释,该方法在远记忆内部锐化注意力以突出相关条目,同时单独控制其相对局部窗口的总权重。在六组目标-草稿模型组合及最长 256K token 的基准上,FOLD 多数情况下取得最高加速比,最佳案例将相对自回归解码的加速从 2.08 倍提升至 4.22 倍。

正文 · 原文

arXiv:2610.20392v2 Announce Type: replace 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$\times$ to 4.22$\times$.

来源:arXiv (AI + Vision + Imaging) · arxiv.org