TL;DR
Modern long-context LLMs save massive amounts of compute and memory by turning "natively sparse"—meaning they selectively read only the most relevant bits of a massive prompt. Yet the lightweight "drafter" models used to accelerate them via speculative decoding are stuck in the past, either hoarding their own bloated memory caches or peering through tiny, myopic sliding windows. DFly2 fixes this by letting the drafter piggyback directly on the main model’s compressed memory and its exact token selections, delivering a massive, lossless speedup on 100K+ token workloads with zero extra memory overhead.
What Problem Does This Paper Address?
To generate text faster without losing quality, speculative decoding pairs a huge, slow "target" LLM with a tiny, fast "drafter" model. The drafter rapidly guesses the next few tokens in a single pass, and the target verifies them in parallel.
This speedup matters most in long-context and agentic workflows where generation slows to a crawl. Ironically, that is precisely where current drafters stumble. To survive 100K+ token prompts, modern target models (like DeepSeek-V4 and GLM-5) use native sparse attention: instead of reading every word in history, a built-in "indexer" dynamically picks a fixed budget of top-$k$ important positions per query, while heavily compressing their Key-Value (KV) memory cache.
Block-parallel drafters, however, were designed for older, dense models. If a drafter keeps its own full KV cache, its memory footprint becomes proportionally huge compared to the ultra-compressed target—eating up GPU concurrency, slowing down initial prompt processing (prefill), and ruining prefix-cache hits. If you restrict the drafter to a tiny sliding window of recent tokens to save memory, it goes blind to crucial information earlier in the prompt. And having the drafter search the whole prompt itself is too slow.
So how do you give a drafter global, query-aware vision across a massive context without paying for the memory or the search?
Methods
The authors’ answer is DFly2, a three-layer block-parallel drafter built on a deceptively simple realization: the target model has already done the hard work and paid the bill.
Instead of maintaining its own context, each DFly2 layer pairs up with a sparse attention layer in the target model and reuses four things:
- KV Sharing: Rather than projecting and storing its own keys and values, DFly2 reads the compressed KV latents already sitting in its paired target layer's cache. Zero drafter cache means zero prefill overhead and 100% preserved decode concurrency.
- Index Sharing: DFly2 doesn't run a search pass. Instead, it attends to the exact top-$k$ context positions (plus any local window) that the target’s indexer selected during the previous verification step. Because $k$ is fixed, drafting costs the exact same at 128K tokens as it does at 4K.
- Target Weight Initialization: Because the drafter is a tiny model reading indices chosen for the target's queries, DFly2 initializes its attention weights (including the shared query latent space) and a subset of MoE experts directly from its paired target layer.
- Last-Layer Injection & Intra-Block Correction: DFly2 gates in the target’s final hidden state (which isn't stored in any KV cache) and runs a lightweight sequential pass across the 5 drafted slots, letting later slots peek back at earlier drafted words and re-read the shared sparse context.
Datasets
- Training: The authors curate DFly-SFT, a 7.42B-token public instruction-tuning corpus (~990K conversations across 10 math, coding, and reasoning domains), capped at 32K tokens and heavily weighted toward explicit reasoning traces.
- Evaluation: Tested across three distinct families:
- General-purpose: 12 standard math/code/chat benchmarks from DeepSpec (including GSM8K, MATH-500, AIME25, HumanEval, LiveCodeBench, MT-Bench).
- Long-context: LongSpec (32K), CodeSpan (64K), and LongSWE-Bench (128K).
- Agentic: AgentLongBench (64K), MemoryAgentBench, multi-turn BFCL-v3, and SWE-bench issues (64K).
Key Insights and Ideas
- Stale selections age remarkably well: In block-parallel drafting, the drafter proposes 5 tokens at once using a single top-$k$ selection made one step before the block even started. You might expect the model's attention focus to shift mid-block, rendering that selection obsolete. Surprisingly, on DS-V4.1-Flash, that single early selection still captures ~88% of the probability mass that later tokens in the block would have chosen—compared to under 18% for an equally sized sliding window!
- Why focus drifts instead of jumping: When the authors dug into why the selection holds across slots, they found that rotary position embeddings (RoPE) in index queries concentrate energy in low-frequency components. Shifting a few token positions forward barely nudges the math; attention only shifts gradually as new semantic content accumulates one word at a time.
- Free length generalization: Because DFly2 only ever sees a fixed-size top-$k$ bundle of tokens regardless of whether the prompt is 4K or 128K long, it never suffers out-of-distribution collapse when prompts exceed its 32K training limit.
Key Results
Evaluated across three architecturally distinct sparse targets (DS-V4.1-Flash, GLM-5.3-Flash, and Hy4 flash), DFly2 outperforms both full-cache (DFlash) and sliding-window (DSpark) baselines trained on the exact same recipe:
- Higher Acceptance: Accepts 3.9%–10.5% more tokens per step on general benchmarks, widening to 10.0%–31.5% on long-context and agentic tasks up to 128K. While DSpark drops 11%–21% of its accepted length on long agentic prompts (and full-cache DFlash collapses to ~1.1 tokens on Hy4 flash past 32K), DFly2 stays within 4% of its short-text performance.
- End-to-End Speed & Concurrency: Removing the drafter's cache lets DS-V4.1-Flash hold 1.73× as many concurrent requests at 32K. In high-concurrency serving at matched per-user speeds, DFly2 delivers 28% higher total throughput on short text, and 62% and 81% higher throughput on 64K CodeSpan and SWE-bench workloads.
Limitations and Future Work
- Target-Specific Dependency: By design, DFly2 relies on the target model being natively sparse with accessible KV latents and indexers; it does not apply to traditional dense LLMs where no pre-computed selection exists.
- Sequential Intra-Block Step & Transfer: While the main 3-layer draft pass is parallel, the intra-block correction runs sequentially slot-by-slot (costing <1% of a decode step), and disaggregated serving requires transferring one extra hidden-state vector from prefill to decode.
- Wider Index Sharing: On architectures with a single shared KV cache across layers (like YOCO-style DS-V4.1-Flash), the authors show preliminary explorations into taking the union of selections across multiple layers and earlier history rows—recovering up to 91% top-$k$ recall and squeezing out an extra ~2.5% acceptance on long contexts for a tiny fraction of a percent in decode time.
Summary updated