Views
No views yet
Qwen/Qwen3-8B, released alongside the paper:DFlare: Scaling Up Draft Capacity for Block Diffusion Speculative Decoding
| Target model | Qwen/Qwen3-8B |
| Draft architecture | DFlare (7 layers, hidden_size=4096, attention_heads=32, GQA kv_heads=8) |
| Parameters | ~1.4 B |
| Block size | 16 |
| Target layers used for fusion | [1, 5, 9, 13, 17, 21, 25, 29, 33] (out of 36) |
| Precision | bfloat16 |
| RoPE | rope_theta = 1,000,000 (no scaling) |
| Vocab size | 151,936 |
block_size tokens in parallel, conditioned on (i) target hidden states extracted from the listed target layers and (ii) noise embeddings of the previous block. The target model verifies the block in a single forward pass and accepts the longest matching prefix.QwenDFlareDraftModel class.1git clone https://github.com/Tencent/AngelSlim.git
2cd AngelSlim
3pip install -e .--draft-arch:1# Single-GPU
2python tools/dflash_benchmark.py \
3 --model-name-or-path Qwen/Qwen3-8B \
4 --draft-name-or-path dflare/qwen3-8b-dflare \
5 --draft-arch dflare \
6 --dataset gsm8k \
7 --max-samples 128 \
8 --max-new-tokens 2048 \
9 --temperature 0.01# 8-GPU (workload sharded across ranks, results gathered to rank 0)
2torchrun --nproc_per_node=8 --master_port=29600 \
3 tools/dflash_benchmark.py \
4 --model-name-or-path Qwen/Qwen3-8B \
5 --draft-name-or-path dflare/qwen3-8b-dflare \
6 --draft-arch dflare \
7 --dataset gsm8k \
8 --max-samples 128 \
9 --max-new-tokens 2048 \
10 --temperature 0.0⚠️ Do not pass--block-size— the benchmark readsblock_size=16from this checkpoint'sconfig.jsonand overriding it will break the train/test alignment.
gsm8k, math500, aime24, aime25, alpaca, mt-bench, humaneval, mbpp, lbpp, swe-bench, livecodebench.1import torch
2from angelslim.compressor.speculative.train.models.draft.qwen_dflare import (
3 QwenDFlareDraftModel,
4)
5
6draft = QwenDFlareDraftModel.from_pretrained(
7 "dflare/qwen3-8b-dflare",
8 dtype=torch.bfloat16,
9 attn_implementation="flash_attention_2",
10).cuda().eval()
11
12print(draft.target_layer_ids) # [1, 5, 9, 13, 17, 21, 25, 29, 33]
13print(draft.block_size) # 16
14print(draft.mask_token_id) # 1516691@article{DFlare2026,
2 title={DFlare: Scaling Up Draft Capacity for Block Diffusion Speculative Decoding},
3 author={Jiebin Zhang and Zhenghan Yu and Song Liu and Eugene J. Yu and Zheng Li and Dawei Zhu and Jiangshan Duo and Weimin Xiong and Yifan Song and Guanghua Yu and Jianchen Zhu and Sujian Li},
4 journal={arXiv preprint arXiv},
5 year={2026}
6}Qwen/Qwen3-8B retains its own license; consult the target model card before deployment.