Far, Not Just Long: What Limits Long-Context Speculative Decoding
Lin et al. in Inference & systems
Why can the target find text its drafter misses?
Far, Not Just Long: What Limits Long-Context Speculative Decoding
One target pass can accept several draft tokens
- 1
Propose
A small drafter proposes several next tokens from the prompt.
- 2
Verify
In greedy decoding, the target checks all proposals in one pass, accepts matches until the first mismatch, then adds its own token.
- 3
Count acceptance
Acceptance length averages accepted draft tokens plus the target's one per step; higher values can speed decoding if draft cost stays manageable.
- 4
FreeLong
It moves target-selected sentences into a compact drafter view; the target still verifies proposals against the full input.
Is the problem length, or distance?
Keep the answer-bearing needle 512 tokens from the end; increase the surrounding input from 8K to 32K.
In a 32K input, move the same needed text from 128 to 30K tokens before the end.
Across 12 drafters, distance hurt more in 30/36 pairs; six multi-doc QA pairs were exceptions.
The drafter has an effective range

R is the shorter of training length and attention window. For Qwen3-4B/EAGLE-3, R=4K; panel (a) shows acceptance falling once inserted numbers lie beyond it.
Does in-range recall track acceptance?
Beyond the effective range, attention to needed text drops; inside it, added tokens dilute attention. On AIME 2025, Qwen3-4B DFlash yields 2.43 tokens/step in 16K-32K output steps that repeat text from over 8K back.
Across eight selectors, acceptance broadly tracks recall: the share of answer steps whose working set holds the needle in range, on Qwen3-4B DFlash's 32K RULER needle and variable-tracking tasks.
Recent-2K: 0.4% in-range recall, 1.63 tokens/step; FreeLong: 97.5%, 4.35; oracle: 100.0%, 4.39.
FreeLong applies a placement principle
- 1
The general rule
Keep evidence in range; compact views limit attention dilution.
- 2
Let retrieval find it
After each verification, four target heads that retrieve evidence score input tokens in the target's strongest retrieval layer; each sentence gets its top score.
- 3
Build the roughly 2K view
Top whole sentences and two extra copies of the best three join 512 recent tokens, then move beside them in order and are renumbered.
- 4
Keep the target intact
Drafter weights stay fixed; the target verifies against its full input, preserving its output distribution.
One sentence moves from 12,814 to 535 tokens back

In a Qwen3-4B/DFlash step, a sentence 12,814 tokens back in the input lands 535 tokens back in the working set; over the whole answer, acceptance rises from 1.60 to 4.30 tokens/step.
FreeLong also beats one long-text fine-tune
Qwen3-4B DFlash; RULER 32K, greedy, k=7. Fine-tune: one 4-epoch LongAlign-10k run; paper's RULER results tables.
FreeLong also speeds SGLang decoding

The bars are speedups over the target alone. Qwen3-4B DFlash at 32K reaches 2.8× with FreeLong versus 1.3× with original DFlash in SGLang, on one H100, one request at a time.
What these tests do not settle
Model scope
Results center on drafters reading target hidden states, with Qwen3-family and Llama-3.1 targets up to 256K tokens.
Decode regimes
Most results use greedy decoding; speculative sampling is also tested on RULER, while AgentLongBench uses its official sampling.
Serving conditions
SGLang speeds use one H100, mostly one request at a time; concurrency tests go up to eight requests.
One shared configuration
One setup is used across drafters; on Qwen3-4B EAGLE-3 at 32K, adding the hot block lowers τ from 4.20 to 4.03.
Why it matters
- On these tests, distance to needed text is a stronger bottleneck than total prompt length.
- FreeLong moves target-selected sentences into a roughly 2K-token drafter view without retraining or truncating the target's context.
- How should retrieval and working-set settings be tuned for each drafter and serving condition?
11 slides, 3 min
2 days ago