Skip to main content
Back

Z Lab's DFlash Hits 4.3x Faster LLM Inference With Parallel Diffusion Drafting

DFlash's block-diffusion draft model hits 4.3x throughput on Qwen 3.5 397B, now the default speculative decoding engine in SGLang

Pro

  • 4.3x throughput on Qwen 3.5 397B-A17B: DFlash + SGLang's new Spec V2 engine beats baseline and native MTP speculation on every benchmark tested.
  • Block diffusion drafting: DFlash proposes an entire block of tokens in a single forward pass, unlike autoregressive drafters that generate tokens one at a time.
  • KV injection: Target model hidden states are injected into every draft layer's KV cache, keeping acceptance rates high even with deep draft models.
  • Now SGLang's default: Spec V2 with overlap scheduling (33%+ speedup alone) is now the default speculative decoding engine in SGLang.
  • Production-proven: The same DFlash recipe powers Xiaomi MiMo at over 1,000 tokens/second in production.
  • Free and open: Weights are on Hugging Face under Apache 2.0; training code is in the DFlash GitHub repo.

Speculative decoding has long been the go-to trick for squeezing more tokens per second out of large language models without touching model quality. The idea is simple: a small, fast "draft" model proposes several tokens at once, and the big target model verifies them all in a single parallel pass. If the drafts are good, you get a free speedup. If not, you fall back gracefully. The catch has always been that most draft models are themselves autoregressive -- they still generate tokens one at a time, which caps how much you can actually gain.

DFlash, from Z Lab, breaks that ceiling. DFlash is a speculative decoding framework that employs a lightweight block diffusion model for parallel drafting, generating draft tokens in a single forward pass. Now, in a joint release between Z Lab, Modal, and the SGLang team, DFlash and Spec V2 hit more than 4.3x baseline throughput for LLM inference and are now the default speculative decoding engine in SGLang. The team has also released a new DFlash draft model specifically trained for Qwen 3.5 397B-A17B, available now on Hugging Face under the Apache 2.0 license.

The bottleneck that everyone ignored

Autoregressive LLMs require inherently sequential decoding, leading to high inference latency and poor GPU utilization. Speculative decoding mitigates this bottleneck, but existing methods still rely on autoregressive drafting, which remains sequential and limits practical speedups. Methods like EAGLE and the native multi-token prediction (MTP) modules built into models like DeepSeek-V4 still generate draft tokens one by one inside the draft model -- a poor fit for the massively parallel hardware we run inference on.

Diffusion LLMs offer a promising alternative by enabling parallel generation, but current diffusion models typically underperform compared with autoregressive models. DFlash threads this needle by using diffusion only where it helps -- in the draft stage -- while letting the verified autoregressive target model guarantee output quality.

Two ideas, one big speedup

DFlash's architecture rests on two complementary innovations that each independently improve performance, and compound when combined.

Block diffusion drafting: DFlash uses a small diffusion-LLM draft model to predict an entire block of tokens in a single forward pass, conditioned on hidden states from the target model. Unlike autoregressive drafters that scale linearly in cost with draft length, a 5-layer DFlash drafter generating 4, 8, or even 16 tokens has much lower drafting latency than a comparable EAGLE-style drafter producing just 4 tokens.

KV injection: Large autoregressive LLMs' hidden features implicitly contain information about multiple future tokens. Instead of asking a tiny diffusion model to reason from scratch, DFlash conditions the draft model on context features extracted from the target model, fusing the target's deep reasoning with the drafter's parallel speed. Critically, these features are injected directly into the KV cache of every draft layer -- not just the input -- so the conditioning signal stays strong even in deeper draft models.

The ablation results make the contribution of each component clear. At similar acceptance lengths to a 5-layer EAGLE-3 drafter on Qwen 3-4B, DFlash with diffusion-only drafting already delivers higher end-to-end speedup (3.3x vs 2.1x on GSM8K). Adding KV injection pushes acceptance lengths even higher. Experiments show that DFlash achieves over 6x lossless acceleration across a range of models and tasks, delivering up to 2.5x higher speedup than the state-of-the-art speculative decoding method EAGLE-3.

Spec V2: killing the hidden bottleneck

Even with a fast draft model, inference engines can bleed performance through CPU-GPU synchronization overhead -- the host processor constantly interrupting the GPU to check on things like stop tokens and memory allocation. SGLang's new Spec V2 engine addresses this directly with an overlap scheduler.

The overlap scheduler identifies two key opportunities to hide host work behind GPU compute:

  • Cleanup after batch N-1 (stop token detection, request metadata updates) overlaps with GPU work on batch N
  • KV cache memory allocation for batch N overlaps with GPU execution of batch N-1

The result: using DFlash speculative decoding models with SGLang's newly default Spec V2 engine, you can achieve state-of-the-art latencies for LLM inference serving. The Spec V2 overlap scheduling alone improved throughput by over 33%, from roughly 11.4k tok/s to 15.3k tok/s on Qwen 3-8B at concurrency 32 on a single B200.

The numbers on Qwen 3.5 397B

The jointly-released DFlash model for Qwen 3.5 397B-A17B achieves higher throughput than both the baseline model and native MTP speculation in all benchmarked settings. At concurrency 1 on HumanEval, it achieves more than 4.3x the throughput of baseline and 1.5x the throughput of MTP. The benchmarks were run on 8x NVIDIA B200 GPUs with tensor parallelism 8, in bfloat16, across GSM8K, MATH500, HumanEval, MBPP, and MT-Bench.

A few highlights from the full benchmark sweep:

  • HumanEval, concurrency 1: 874.6 tok/s with DFlash block=16 vs 202.9 tok/s baseline (4.31x)
  • MATH500, concurrency 1: 831.9 tok/s vs 204.4 tok/s baseline (4.07x)
  • HumanEval, concurrency 32: 6,783.7 tok/s vs 2,452.7 tok/s baseline (2.77x)
  • MT-Bench is the hardest case: more conversational, less predictable -- DFlash still wins at 2.69x (concurrency 1), but the gap over MTP narrows

The block size is a tunable knob: block=8 is the recommended default for higher-concurrency serving, while block=16 gives longer accept lengths and the best single-request throughput on most workloads.

Real-world validation

The same recipe already powers Xiaomi MiMo at more than 1k tok/s. That's a production deployment, not a benchmark, which gives these numbers more weight than a typical research result.

The community reaction has been strong. Commenters called DFlash "a beautiful design" and "a paradigm shift for spec decoding," with excitement to adopt it for both inference and RL.

Getting started

The model is available now on Hugging Face and works with SGLang out of the box. You'll need a recent SGLang build (commit ec36dde or later) for DFlash v2 overlap scheduling and FlashInfer integration. For production, the team recommends a CUDA image with Blackwell support such as lmsysorg/sglang:v0.5.13-cu130.

Launch a DFlash-accelerated server with:

export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1
python -m sglang.launch_server \
  --model-path Qwen/Qwen3.5-397B-A17B \
  --trust-remote-code \
  --speculative-algorithm DFLASH \
  --speculative-draft-model-path z-lab/Qwen3.5-397B-A17B-DFlash \
  --speculative-dflash-block-size 8 \
  --speculative-draft-attention-backend fa4 \
  --attention-backend trtllm_mha \
  --tp-size 8 \
  --host 0.0.0.0 \
  --port 30000

Or load the draft model directly via Transformers for experimentation:

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained(
    "z-lab/Qwen3.5-397B-A17B-DFlash", trust_remote_code=True
)
model = AutoModel.from_pretrained(
    "z-lab/Qwen3.5-397B-A17B-DFlash", trust_remote_code=True
)

The model is free to use under Apache 2.0. Z Lab also notes that DFlash suggests a new development paradigm for diffusion LLMs: rather than competing with autoregressive models in end-to-end generation quality, diffusion models can serve as lightweight, specialized drafters optimized for fast and accurate block prediction. The team is actively expanding the DFlash collection to more target models -- if you want a drafter for your own model or dataset, Z Lab and Modal are both open to collaboration. The DFlash GitHub repo includes training code, so you can build your own drafter using the same block diffusion plus KV injection recipe.