↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Loading the recording…

Drafting a whole block at once

In speculative decoding a cheap drafter proposes tokens and the large target model checks them all in one forward. Drafters such as EAGLE are autoregressive: drafts cost draft forwards, so the drafter has to stay shallow and the drafts short. DFlash drafts with a small block-diffusion model instead. It fills a block of 16 positions, the newest accepted token (the anchor) followed by 15 mask tokens, in a single forward pass, so its cost hardly grows with the number of drafts and it can afford five layers instead of one.

The page records the released DFlash drafter for Qwen3-4B answering a short maths question greedily in Qwen3's non-thinking mode, both models in float32 on the Mac's GPU. The DSpark tab runs on the same prompt, so the two compare step for step.

Reading Qwen3's features

A five-layer model guessing 15 tokens from scratch would guess badly. DFlash conditions it on what the target already computed: for every accepted token, Qwen3-4B's outputs at five of its 36 blocks (blocks 2, 10, 18, 26 and 34), concatenated and fused into one feature of Qwen3's width,

Qwen3 computes these outputs anyway while it verifies, so they cost nothing extra. The drafter never sees the context's tokens, only these features; the Qwen3's features panel shows the five block outputs for the newest token and the fused .

Features injected as keys and values

EAGLE-3 feeds the target's features into its draft layer as input. DFlash injects them into every draft layer instead: each layer turns the context features into keys and values with its own projections and keeps them in a draft KV cache, one entry per context position, never recomputed. The block's 16 positions add their own keys and values for the length of one pass, and attention over the block has no causal mask:

so slot 15 reads slot 1 and slot 1 reads slot 15. The paper finds that this conditioning, unlike input fusion, keeps improving acceptance as draft layers are added. The Draft KV cache and Draft attention panels show the cache growing step by step and one layer's attention over older context, the last 32 positions and the block.

One denoising pass

The drafter embeds the anchor and 15 copies of the mask token with Qwen3's own embedding, runs its five Qwen3-style decoder layers, and reads every mask slot through Qwen3's final norm and LM head; the argmax at each slot is its draft. A masked diffusion language model would normally unmask a block over several steps; DFlash uses a single step, which is enough when the target checks the result. The One denoising pass panel lists each slot's draft, its probability and its runners-up. Later slots are less sure: by the last few, the drafter is guessing tokens it cannot see.

The drafter has 537 M parameters of its own and shares Qwen3's embedding and LM head, frozen. The paper trains it on the target's responses with random anchors, each followed by a masked block, so that training matches decoding, and weights the cross-entropy of slot by a decaying factor , because an early mistake invalidates every later draft.

Verification

Qwen3 runs the anchor and the 15 drafts in one causal forward. The drafts kept are the longest prefix that equals Qwen3's argmax; Qwen3's argmax after the last kept draft becomes the next anchor, and the features of the anchor and the kept drafts become the next step's context. The Verify panel shows the verdict for every slot. Because only drafts equal to Qwen3's own choice are kept, the answer is exactly Qwen3's greedy answer.

That held only in float32. In a bfloat16 run the answers parted at token 66, where Qwen3's best two choices were nearly tied (p 0.497 for the top one): the 16-token verification forward and greedy's one-token forward rounded them differently. Lossless speculative decoding is exact in arithmetic, not always in low-precision kernels.

What it gains on this page

The 333-token answer takes 41 steps, 42 Qwen3 forwards with the prompt's, where plain greedy decoding takes 333: 8.10 tokens per forward. Seven steps kept all 15 drafts and four kept none; the Decoding steps strip shows every step above DSpark's. A Qwen3 forward reads 16.1 GB of weights and a draft 3.7 GB (its layers and Qwen3's LM head). Measured on this Mac, a step took 72 ms drafting and 203 ms verifying on average, against 130 ms for one greedy token: 29.06 tokens per second against 7.66, 3.79× greedy. The Mac paged 4.7 GB in while timing, which slows greedy's many forwards most. The DFlash paper reports a mean speed-up of 4.91× for Qwen3-4B at temperature 0, with 6.54 tokens accepted per cycle.

Where it came from

Masked diffusion language models (MDLM, LLaDA) generate by unmasking many positions in parallel, and block diffusion (Arriola et al., 2025) runs that process block by block, between autoregression and full diffusion; the Diffusion LM tab shows one. On their own such models still trail autoregressive models in quality. DFlash (Chen, Liang and Liu, 2026) uses one only as a drafter, conditioned on the target's features in the way EAGLE-3 introduced, and leaves quality to the target's verification. The DSpark tab adds a sequential stage on top of DFlash's backbone and decides how many drafts are worth verifying.

Papers

  1. DFlash: Block Diffusion for Flash Speculative Decoding Jian Chen, Yesheng Liang, Zhijian Liu · ICML 2026 The method on this page: a block-diffusion drafter that fills a block in one pass, conditioned on fused target features injected into every layer's keys and values.
  2. Block Diffusion: Interpolating Between Autoregressive and Diffusion Language Models Marianne Arriola, Aaron Gokaslan, Justin T. Chiu, Zhihan Yang et al. · ICLR 2025 Language models that denoise one block at a time, conditioned on the blocks before: the generation scheme DFlash's drafter uses for a single block.
  3. EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test Yuhui Li, Fangyun Wei, Chao Zhang, Hongyang Zhang · NeurIPS 2025 An autoregressive drafter reading fused low, middle and high-layer target features, the baseline DFlash is compared with.
  4. Simple and Effective Masked Diffusion Language Models Subham Sekhar Sahoo et al. · NeurIPS 2024 Masked diffusion for text: tokens are replaced by a mask and a model learns to fill them back in, as DFlash's mask slots are filled.
  5. Qwen3 Technical Report An Yang et al. · arXiv 2025 The Qwen3 family, including Qwen3-4B, the target model here, and its thinking and non-thinking modes.
  6. Fast Inference from Transformers via Speculative Decoding Yaniv Leviathan, Matan Kalman, Yossi Matias · ICML 2023 Draft cheaply, verify in one forward of the target, and keep the target's output unchanged.

See also