20
stars
18
commits
1
repos using this model
4
linked in READMEs
Jun 19, 2026
updated
This DFlash draft model is a joint retrain from Z-Lab and Modal, trained with 40k sequence length and sliding-window attention for improved long-context performance. It is mirrored across the following Hugging Face repositories:
This repository contains a DFlash draft model for Qwen/Qwen3.5-122B-A10B. It is not a standalone language model. It is intended to be paired with the target model in a speculative decoding server.
DFlash uses a lightweight block diffusion draft model to propose multiple tokens in parallel. The target model verifies those proposals, improving serving throughput while preserving the target model's output distribution.
Install a recent SGLang build with DFlash support:
uv pip install --upgrade "sglang[all]"
For best performance on Blackwell GPUs, use an SGLang build that includes DFlash, FA4/TRT-LLM attention, and FlashInfer support.
For vLLM support, please refer to vllm-project/vllm#40898. We will update the PR to make it merge-ready soon.
This model should be used with an inference server that supports DFlash speculative decoding. An example SGLang deployment is:
export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1
python -m sglang.launch_server \
--model-path Qwen/Qwen3.5-122B-A10B \
--trust-remote-code \
--speculative-algorithm DFLASH \
--speculative-draft-model-path z-lab/Qwen3.5-122B-A10B-DFlash \
--speculative-dflash-block-size 8 \
--speculative-draft-attention-backend fa4 \
--attention-backend trtllm_mha \
--linear-attn-prefill-backend flashinfer \
--linear-attn-decode-backend flashinfer \
--mamba-scheduler-strategy extra_buffer \
--tp-size 4 \
--max-running-requests 32 \
--cuda-graph-max-bs-decode 32 \
--cuda-graph-backend-prefill tc_piecewise \
--enable-flashinfer-allreduce-fusion \
--mem-fraction-static 0.8 \
--host 0.0.0.0 \
--port 30000
Block size 8 is the recommended default for higher-concurrency serving. Block size 16 gives longer accept lengths and strong concurrency-1 throughput in most workloads.
We benchmarked DFlash against the autoregressive baseline and Qwen's built-in MTP draft path. DFlash reaches up to 4.21x speedup at concurrency 1 and 3.07x at concurrency 32. Across the benchmark suite, DFlash delivers higher throughput than MTP at every matched setting where both completed.
bfloat16trtllm_mha target attention, fa4 DFlash draft attention, flashinfer linear-attention prefill and decodecompletion_tokens / spec_verify_ct per generation turn, averaged across generation turnsEach cell is output tok/s (speedup). Bold marks the fastest speculative configuration in each row.
| Workload | Baseline | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|---|
| gsm8k | 262.6 (1.00x) | 603.5 (2.30x) | 655.3 (2.50x) | 661.8 (2.52x) | 849.5 (3.24x) | 543.5 (2.07x) | 884.4 (3.37x) |
| math500 | 264.6 (1.00x) | 614.6 (2.32x) | 681.2 (2.57x) | 721.9 (2.73x) | 937.2 (3.54x) | 614.4 (2.32x) | 1041.2 (3.94x) |
| humaneval | 258.7 (1.00x) | 594.6 (2.30x) | 673.2 (2.60x) | 672.5 (2.60x) | 948.9 (3.67x) | 597.3 (2.31x) | 1088.9 (4.21x) |
| mbpp | 260.1 (1.00x) | 591.5 (2.27x) | 675.9 (2.60x) | 646.1 (2.48x) | 908.9 (3.49x) | 517.3 (1.99x) | 982.3 (3.78x) |
| mt-bench | 262.2 (1.00x) | 550.8 (2.10x) | 584.6 (2.23x) | 553.9 (2.11x) | 690.1 (2.63x) | 416.3 (1.59x) | 671.5 (2.56x) |
| Workload | Baseline | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|---|
| gsm8k | 3413.6 (1.00x) | 6191.0 (1.81x) | 7178.3 (2.10x) | 6919.8 (2.03x) | 8822.4 (2.58x) | 5845.4 (1.71x) | 8418.9 (2.47x) |
| math500 | 3424.3 (1.00x) | 6661.0 (1.95x) | 7501.8 (2.19x) | 7816.0 (2.28x) | 9866.3 (2.88x) | 6844.9 (2.00x) | 10090.6 (2.95x) |
| humaneval | 3246.3 (1.00x) | 5278.7 (1.63x) | 7247.4 (2.23x) | 5976.2 (1.84x) | 9498.4 (2.93x) | 5399.7 (1.66x) | 9963.9 (3.07x) |
| mbpp | 3384.3 (1.00x) | 5224.0 (1.54x) | 7350.3 (2.17x) | 5617.2 (1.66x) | 9250.9 (2.73x) | 4929.8 (1.46x) | 9080.0 (2.68x) |
| mt-bench | 3293.1 (1.00x) | 5482.2 (1.66x) | 6163.2 (1.87x) | 5568.9 (1.69x) | 6865.9 (2.08x) | 4471.3 (1.36x) | 6096.5 (1.85x) |
Mean accept length at concurrency 1. Bold marks the higher value in each matched MTP/DFlash pair.
| Workload | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|
| gsm8k | 3.567 | 3.480 | 5.649 | 5.506 | 7.144 | 7.180 |
| math500 | 3.638 | 3.578 | 5.876 | 5.816 | 7.546 | 7.837 |
| humaneval | 3.624 | 3.636 | 5.872 | 6.087 | 7.678 | 8.703 |
| mbpp | 3.489 | 3.517 | 5.271 | 5.545 | 6.320 | 7.237 |
| mt-bench | 3.279 | 3.155 | 4.690 | 4.542 | 5.497 | 5.440 |
If you find DFlash useful, please cite the original paper:
@article{chen2026dflash,
title = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
journal = {arXiv preprint arXiv:2602.06036},
year = {2026}
}
17 commits
1 commits
20
stars
18
commits
1
repos using this model
4
linked in READMEs
Jun 19, 2026
updated
This DFlash draft model is a joint retrain from Z-Lab and Modal, trained with 40k sequence length and sliding-window attention for improved long-context performance. It is mirrored across the following Hugging Face repositories:
This repository contains a DFlash draft model for Qwen/Qwen3.5-122B-A10B. It is not a standalone language model. It is intended to be paired with the target model in a speculative decoding server.
DFlash uses a lightweight block diffusion draft model to propose multiple tokens in parallel. The target model verifies those proposals, improving serving throughput while preserving the target model's output distribution.
Install a recent SGLang build with DFlash support:
uv pip install --upgrade "sglang[all]"
For best performance on Blackwell GPUs, use an SGLang build that includes DFlash, FA4/TRT-LLM attention, and FlashInfer support.
For vLLM support, please refer to vllm-project/vllm#40898. We will update the PR to make it merge-ready soon.
This model should be used with an inference server that supports DFlash speculative decoding. An example SGLang deployment is:
export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1
python -m sglang.launch_server \
--model-path Qwen/Qwen3.5-122B-A10B \
--trust-remote-code \
--speculative-algorithm DFLASH \
--speculative-draft-model-path z-lab/Qwen3.5-122B-A10B-DFlash \
--speculative-dflash-block-size 8 \
--speculative-draft-attention-backend fa4 \
--attention-backend trtllm_mha \
--linear-attn-prefill-backend flashinfer \
--linear-attn-decode-backend flashinfer \
--mamba-scheduler-strategy extra_buffer \
--tp-size 4 \
--max-running-requests 32 \
--cuda-graph-max-bs-decode 32 \
--cuda-graph-backend-prefill tc_piecewise \
--enable-flashinfer-allreduce-fusion \
--mem-fraction-static 0.8 \
--host 0.0.0.0 \
--port 30000
Block size 8 is the recommended default for higher-concurrency serving. Block size 16 gives longer accept lengths and strong concurrency-1 throughput in most workloads.
We benchmarked DFlash against the autoregressive baseline and Qwen's built-in MTP draft path. DFlash reaches up to 4.21x speedup at concurrency 1 and 3.07x at concurrency 32. Across the benchmark suite, DFlash delivers higher throughput than MTP at every matched setting where both completed.
bfloat16trtllm_mha target attention, fa4 DFlash draft attention, flashinfer linear-attention prefill and decodecompletion_tokens / spec_verify_ct per generation turn, averaged across generation turnsEach cell is output tok/s (speedup). Bold marks the fastest speculative configuration in each row.
| Workload | Baseline | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|---|
| gsm8k | 262.6 (1.00x) | 603.5 (2.30x) | 655.3 (2.50x) | 661.8 (2.52x) | 849.5 (3.24x) | 543.5 (2.07x) | 884.4 (3.37x) |
| math500 | 264.6 (1.00x) | 614.6 (2.32x) | 681.2 (2.57x) | 721.9 (2.73x) | 937.2 (3.54x) | 614.4 (2.32x) | 1041.2 (3.94x) |
| humaneval | 258.7 (1.00x) | 594.6 (2.30x) | 673.2 (2.60x) | 672.5 (2.60x) | 948.9 (3.67x) | 597.3 (2.31x) | 1088.9 (4.21x) |
| mbpp | 260.1 (1.00x) | 591.5 (2.27x) | 675.9 (2.60x) | 646.1 (2.48x) | 908.9 (3.49x) | 517.3 (1.99x) | 982.3 (3.78x) |
| mt-bench | 262.2 (1.00x) | 550.8 (2.10x) | 584.6 (2.23x) | 553.9 (2.11x) | 690.1 (2.63x) | 416.3 (1.59x) | 671.5 (2.56x) |
| Workload | Baseline | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|---|
| gsm8k | 3413.6 (1.00x) | 6191.0 (1.81x) | 7178.3 (2.10x) | 6919.8 (2.03x) | 8822.4 (2.58x) | 5845.4 (1.71x) | 8418.9 (2.47x) |
| math500 | 3424.3 (1.00x) | 6661.0 (1.95x) | 7501.8 (2.19x) | 7816.0 (2.28x) | 9866.3 (2.88x) | 6844.9 (2.00x) | 10090.6 (2.95x) |
| humaneval | 3246.3 (1.00x) | 5278.7 (1.63x) | 7247.4 (2.23x) | 5976.2 (1.84x) | 9498.4 (2.93x) | 5399.7 (1.66x) | 9963.9 (3.07x) |
| mbpp | 3384.3 (1.00x) | 5224.0 (1.54x) | 7350.3 (2.17x) | 5617.2 (1.66x) | 9250.9 (2.73x) | 4929.8 (1.46x) | 9080.0 (2.68x) |
| mt-bench | 3293.1 (1.00x) | 5482.2 (1.66x) | 6163.2 (1.87x) | 5568.9 (1.69x) | 6865.9 (2.08x) | 4471.3 (1.36x) | 6096.5 (1.85x) |
Mean accept length at concurrency 1. Bold marks the higher value in each matched MTP/DFlash pair.
| Workload | MTP steps=3 | DFlash block=4 | MTP steps=7 | DFlash block=8 | MTP steps=15 | DFlash block=16 |
|---|---|---|---|---|---|---|
| gsm8k | 3.567 | 3.480 | 5.649 | 5.506 | 7.144 | 7.180 |
| math500 | 3.638 | 3.578 | 5.876 | 5.816 | 7.546 | 7.837 |
| humaneval | 3.624 | 3.636 | 5.872 | 6.087 | 7.678 | 8.703 |
| mbpp | 3.489 | 3.517 | 5.271 | 5.545 | 6.320 | 7.237 |
| mt-bench | 3.279 | 3.155 | 4.690 | 4.542 | 5.497 | 5.440 |
If you find DFlash useful, please cite the original paper:
@article{chen2026dflash,
title = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
journal = {arXiv preprint arXiv:2602.06036},
year = {2026}
}
17 commits
1 commits