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. 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.
Figures & tables
Figure 1: Accepted length τ and decoding speedup on DS-V4.1-Flash, GLM-5.3-Flash and Hy4 flash, greedy at a concurrency of one. Chips give DFly2’s gain over the better of DFlash † and DSpark.
Route
Context enters as
Drafter’s own context KV
Input conditioning (MTP, EAGLE)
target hidden states at the input
every position
KV injection (DFlash, DSpark)
Hctx in every layer’s K/V
every position
Reading the target’s cache (GliDe)
the target’s stored K/V, read in place
none
Table 1: How a drafter receives the target’s context. Only reading the target’s cache leaves the drafter without a context KV of its own.
Target
Target KV
Drafter’s own cache
Increase
DS-V4.1-Flash
4.4 KiB
3.4 KiB
1.76 ×
GLM-5.3-Flash
11.7 KiB
3.0 KiB
1.26 ×
Hy4 flash
17.2 KiB
3.4 KiB
1.20 ×
Table 2: A drafter’s own cache costs most where the target has saved most. Per-token KV of all caches that grow with the context, from model configurations (bf16), for a three-layer drafter.
Figure 2: What a drafter’s own cache costs at decode. (a) Concurrency at 32K tokens, with a full own cache as 1 × , estimated from model configurations including fixed per-request state. (b) DS-V4.1-Flash, timed per step by the server, with the band measured as a window.
Drafter’s own cache
Full
Window w
KV sharing
Drafter needed at prefill
yes, for all positions
yes, for the last w
no
Target’s prefix-cache hits
fewer and shorter
can be cut short †
unaffected
Decode concurrency at 32K
1.00 ×
1.71–1.73 ×
1.73 ×
Reach at 32K
whole context
last w (0.4–1.6%)
whole context
Table 3: KV sharing removes the drafter’s own cache without limiting its reach. DS-V4.1-Flash, w=128 or 512, concurrency estimated as in Figure 2 a. † Except at w=128 .
Figure 3: Top- k mass coverage on DS-V4.1-Flash. (a) Mean over slots and layers. Bands span context lengths. (b) Budget 512, own scale. The window stays at 0.13–0.17. (c) Budget 512, averaged as in (a).
Figure 4: Overview of DFly2. Each of its three draft layers is paired with one of the target’s DSA layers and reads the KV that layer cached, at the positions its indexer selected.
Figure 5: (a) DFlash and DSpark build their own KV, while DFly2 reads the target’s KV at its top- k positions. (b) Only the latent KV and the selection pass at run time, so the drafter needs no indexer.
Figure 6: Intra-block correction across the block (left) and inside slot k (right). Slot k is corrected from its hidden state and the token drafted at slot k−1 .
Target
Paired layers L
Top- k
Near window
Positions per step
DS-V4.1-Flash
[28,32,36]
512
128
646
GLM-5.3-Flash
[35,39,43]
512 pools of four
–
2,054
Hy4 flash
[33,37,41]
2,048
–
2,054
Table 4: What each target settles. Positions per step is the top- k , the near window and the block’s six rows. A dash marks a window the top- k already covers.
Data type
Mix
Samples
Tokens
Median len.
Think
Math (advanced)
19.2%
190,000
2.90B
13,982
98.6%
Code (competitive)
11.1%
110,000
1.96B
18,175
94.7%
Code (engineering)
9.6%
95,479
0.56B
4,064
46.9%
Knowledge & STEM
15.2%
150,000
0.48B
2,075
51.3%
Instruction following
7.1%
70,000
0.47B
5,751
85.7%
Code (function-level)
11.1%
110,000
0.41B
686
37.9%
Table 5: DFly-SFT data mix. Mix is the share of samples. Token counts and lengths use the GLM-5.3-Flash tokenizer, and Think is the fraction of samples whose assistant turns carry an explicit reasoning trace.
Math
Code
Chat
Overall
Target
Drafter
GSM8K
MATH
AIME25
MBPP
HumanEval
LCB
MT-Bench
Avg.
DS-V4.1-Flash
DFlash
3.95/3.64
3.93/3.42
3.54/2.97
3.82/3.63
4.25/3.99
3.34/2.80
2.70/2.51
3.65/3.28
DFlash †
3.94/3.59
3.91/3.40
3.51/2.94
3.81/3.58
4.08/3.82
3.26/2.77
2.68/2.53
3.60/3.23
DSpark
4.24 / 4.00
4.18 / 3.74
3.69 / 3.24
4.00 / 3.83
4.27 / 4.07
3.44 / 3.04
2.82 / 2.67
3.81 / 3.51
[3pt][3pt]
DFly2
4.62 / 4.45
4.43 / 4.10
4.01 / 3.60
4.28 / 4.17
4.70 / 4.56
3.76 / 3.38
3.03 / 2.91
4.12 / 3.88
GLM-5.3-Flash
DFlash
3.93/3.65
3.73/3.29
3.25/2.77
3.76/3.38
3.84/3.44
2.91/2.64
2.58/2.34
3.43/3.07
Table 6: Mean accepted length τ on general-purpose benchmarks, each cell at temperature 0/1 (0.9 on Hy4 flash). Bold and underline mark the best and second best per target and temperature.
Long context
Agentic
Group average
Target
Drafter
LongSpec 32K
CodeSpan 64K
LSWE 128K
ALB
MemAgent
BFCL-v3
SWE 64K
Long
Agen.
DS-V4.1-Flash
DFlash
2.98 / 2.55
3.81 / 3.13
3.42 /2.96
4.38 / 4.13
2.84/2.60
3.40 / 3.11
3.58 / 3.14
3.40 / 2.88
3.55 / 3.25
DFlash †
2.74/2.40
3.43/2.86
3.15/2.77
3.78/3.62
2.80/2.52
3.21/2.98
3.19/2.80
3.11/2.68
3.24/2.98
DSpark
2.82/2.48
3.58/2.92
3.29/ 2.98
3.87/3.59
2.85 / 2.65
3.33/3.09
3.35/2.99
3.23/2.79
3.35/3.08
[3pt][3pt]
DFly2
3.12 / 2.81
4.14 / 3.59
3.97 / 3.55
5.10 / 4.72
3.36 / 3.13
3.77 / 3.55
4.02 / 3.60
3.74 / 3.32
4.06 / 3.75
GLM-5.3-Flash
DFlash
2.55/2.17
3.12/2.48
2.92/2.64
3.12/1.92
2.79 /2.50
2.99/2.75
2.91/2.60
2.86/2.43
2.95/2.44
Table 7: Mean accepted length τ on long-context and agentic benchmarks, formatted as in Table 6 . Long and Agen. average the three long-context and four agentic sets.
Math
Code
Chat
Overall
Target
Drafter
GSM8K
MATH
AIME25
MBPP
HumanEval
LCB
MT-Bench
Avg.
DS-V4.1-Flash
DFlash
3.23/2.87
3.26 / 3.14
2.86 /2.73
3.11 / 3.04
3.41 / 3.29
2.67 / 2.54
2.21 / 2.16
2.96 / 2.82
DFlash †
3.21/2.83
3.19/3.06
2.75/2.71
3.09/3.02
3.28/3.17
2.62/2.49
2.19/2.14
2.91/2.77
DSpark
3.30 / 2.91
3.24/3.11
2.80/ 2.76
3.09/3.02
3.31/3.18
2.63/2.52
2.15/2.11
2.93/2.80
[3pt][3pt]
DFly2
3.56 / 3.09
3.42 / 3.27
3.03 / 2.98
3.28 / 3.20
3.57 / 3.36
2.87 / 2.74
2.27 / 2.15
3.14 / 2.97
GLM-5.3-Flash
DFlash
2.69/2.31
2.54/2.42
2.20/2.17
2.57/2.44
2.59/2.50
1.98/1.89
1.79/1.77
2.34/2.21
Table 8: Speedup over the target alone on general-purpose benchmarks, greedy, at a concurrency of one. Each cell gives decoding / end-to-end speedup in × over the target alone, the latter including prefill. Bold and underline mark the best and second best per target and speedup.
Long context
Agentic
Group average
Target
Drafter
LongSpec 32K
CodeSpan 64K
LSWE 128K
ALB
MemAgent
BFCL-v3
SWE 64K
Long
Agen.
DS-V4.1-Flash
DFlash
2.46 /1.75
3.05 /1.67
2.59 /1.16
3.46 /0.69
2.22/0.63
2.67 /0.78
2.79 /1.49
2.70 /1.52
2.78 /0.90
DFlash †
2.32/1.70
2.70/1.55
2.52/1.13
3.09/0.83
2.25/0.69
2.63/0.84
2.55/1.47
2.51/1.46
2.63/0.96
DSpark
2.28/ 1.99
2.63/ 2.06
2.49/ 1.68
2.95/ 1.21
2.37 / 1.27
2.58/ 1.37
2.54/ 1.89
2.47/ 1.91
2.61/ 1.44
[3pt][3pt]
DFly2
2.44 / 2.10
3.23 / 2.37
2.94 / 1.86
3.82 / 1.25
2.60 / 1.24
2.97 / 1.36
3.00 / 2.13
2.87 / 2.11
3.10 / 1.50
GLM-5.3-Flash
DFlash
1.70/1.47
2.03/1.46
1.89/1.28
2.15/ 1.09
1.83/ 1.01
2.02/ 1.16
1.88/1.36
1.87/1.40
1.97/1.15
Table 9: Speedup on long-context and agentic benchmarks, measured and formatted as in Table 8 . DFlash † reads a window at decode but still builds a full cache at prefill.
Figure 7: Throughput against per-user decode speed on DS-V4.1-Flash, greedy, one point per concurrency level. Labels give the concurrency and, in parentheses, the requests decoding. Dashed guides compare DFly2 with DSpark at equal per-user speed and at equal throughput. Throughput counts the whole deployment.
DS-V4.1-Flash
GLM-5.3-Flash
Hy4 flash
What the drafter reads
Gen.
Long
Agen.
Gen.
Long
Agen.
Gen.
Long
Agen.
[3pt][3pt] Full (DFly2)
3.57
3.62
3.75
3.56
3.67
3.91
3.36
3.46
3.76
w/o near window N
3.45
3.50
3.63
3.57
3.68
3.86
3.36
3.45
3.77
w/o the target’s top- k
3.14
2.76
2.95
3.42
3.10
3.34
3.31
3.12
3.13
w/o sharing (own cache)
3.46
3.34
3.37
3.46
3.18
3.43
3.32
3.14
3.17
Table 10: Mean accepted length τ with one part of what DFly2 reads removed, averaged over each family’s sets and four sampling settings. Bold marks the best per column.
Figure 8: Top- k mass recall on DS-V4.1-Flash, the index-score share of each slot’s own top-512 that a read includes. Lines average slots 1–5 and three context lengths, with bands spanning the lengths.
Parallel block drafting accelerates speculative decoding by predicting multiple future positions in a single backbone pass, but on-device deployment constrains both drafter capacity and context storage. Under tight memory budgets, drafters must model long-range dependencies and fine-grained draft-position interactions without the growing KV-cache overhead of full-context attention. We propose HyFlash, a compact parallel drafter that introduces a prefix-memory prior to separate long-range context modeling from fine-grained draft-position interactions with limited capacity. Local attention captures recent context and draft-position interactions, while recurrent memory compresses historical target features into fixed-size states. This inductive bias enables effective local and long-range modeling with bounded draft-side memory. Experiments show that HyFlash achieves higher acceptance than full-context attention with substantially less KV storage and with larger gains for shallow drafters and long contexts.
Speculative decoding accelerates autoregressive inference by verifying multiple draft tokens in a single target forward pass. However, as the context grows, existing state-of-the-art drafters become increasingly expensive, eroding the very efficiency advantage they are designed to provide. We argue that this scaling is unnecessary. A standalone language model must grow with its prefix because it is solely responsible for every token it produces. A drafter, by contrast, only proposes candidates; the target catches and corrects every error before any token is committed. The drafter's decoding cost can therefore be made entirely independent of the prefix length. We introduce LongSpark, a block-diffusion drafter that achieves this by extracting fixed-size, multiscale views from the target's verification pass, thereby eliminating the need for a growing persistent state. Extensive evaluations demonstrate that LongSpark achieves state-of-the-art end-to-end efficiency across multiple model scales and realistic serving conditions. Notably, it delivers the lowest time-per-output-token on long-context tasks while reducing the drafter's context state by several orders of magnitude.
Speculative decoding pairs a cheap drafter with parallel verification against the target. At ultra-long context it stops paying, because a drafter that attends over the full prefix inherits the target's context-dependent cost, so the speedup it was meant to provide first erodes and then reverses. The standard response is to build a long-context drafter, by training or fine-tuning one, or by using a multi-token-prediction head shipped inside the target checkpoint. We argue this is unnecessary, because the drafters in use are target-conditioned, reading hidden states the target computed over the entire prefix, so distant context already reaches them without their own attention, and verification corrects what they miss. We therefore freeze released short-context drafters and run them far past their training length under two inference-time mechanisms, one bounding the attention cache they see, which fixes their cost, and one re-basing their rotary position indices into the trained range. No weight is touched and the only tunable saturates early, so one vLLM-side configuration spans 4k to two million tokens, costing at most 0.16x of speedup at short length. We prove when a common index shift leaves the drafter's computation exactly unchanged, and decompose acceptance into two measurable gaps with sharp bounds. Whatever speedup a frozen drafter delivers at short context, it retains out to two million tokens, across three target-drafter pairs and five corpora. The claim concerns the flatness rather than the multiple, and removing either mechanism eliminates it. The gain is conditional on the speculative cost per emitted token staying below the matched target-only cost.
Aref Jafari, Vansh Bhatia, Matt Qin +5
Advanced Micro Devices Inc. (AMD) · University of Waterloo