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

Shuxuan Li, Jialiang Kang, Yanghao Zhou, Ziye Zhu, Xiao Yang
10/14/2026
cs.CLcs.LG

No confident code implementation found for this paper.

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$.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026fold,
  title  = {FOLD: Position-Free Far Memory with Local Order for Long-Context Speculative Decoding},
  author = {Shuxuan Li and Jialiang Kang and Yanghao Zhou and Ziye Zhu and Xiao Yang},
  year   = {2026},
  eprint = {2610.20392},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.20392v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.20392.svg)](https://codeofpaper.com/paper/2610.20392)

Discussion