DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity

Hong Liu, Rui Cen, Junhan Shi, Lin Niu, Runzhi Fan +8 more
11/25/2026
cs.CL

No confident code implementation found for this paper.

Abstract

To avoid the quadratic cost of dense attention over long contexts, models such as DeepSeek-V4 and Hy4 have turned natively sparse, and speculative decoding, which matters most where decoding is slowest, increasingly runs on them. Their drafters, however, still keep a context cache of their own, over the whole prompt or a sliding window.

Show full abstract

Beyond memory, such a cache costs prefill time, prefix-cache hits and decode concurrency. Drafters that read the target's cache avoid one of their own, but settle only which cache, not which positions, and still read everything or a recent window. Neither rule is made for the query at hand, and computing a selection per query in the drafter would cost more as the context grows. Yet a natively sparse target already picks positions for each query, over a cache it keeps anyway. Both of the drafter's choices are therefore already made, and paid for, by the target: its cache and its selection. We measure how far one selection carries: made a step early, it still covers close to nine tenths of what each later token selects on DS-V4.1-Flash. We present DFly2, a block-parallel drafter that shares the target's sparsity. Each draft layer reads the KV its paired target layer cached (KV sharing), at the positions that layer's indexer selected, a fixed number anywhere in the context (Index sharing). DFly2 thus runs no scoring pass and keeps no cache of its own. On DS-V4.1-Flash, GLM-5.3-Flash and Hy4~flash, whose sparse attention and architecture differ, it accepts more tokens per step than DFlash and DSpark trained on the same recipe, over general, long-context and agentic benchmarks. Its margin over the stronger baseline widens from 3.9%-10.5% on general workloads to 10.0%-31.5% on long-context and agentic ones. At high concurrency on DS-V4.1-Flash, at matched per-user decode speed, its throughput is 62% and 81% higher on two 64K sets.

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{liu2026dfly,
  title  = {DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity},
  author = {Hong Liu and Rui Cen and Junhan Shi and Lin Niu and Runzhi Fan and Zhaojing Zhou and Haodi Lei and Jiebin Zhang and Saiyong Yang and Junqiang Zheng and Zhenghai Xue and Guanghua Yu and Jianchen Zhu},
  year   = {2026},
  eprint = {2611.34776},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.34776v1}
}

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/2611.34776.svg)](https://codeofpaper.com/paper/2611.34776)

Discussion