Qwen3-Omni-30B-A3B thinker DFlash draft
A DFlash draft for the thinker of Qwen3-Omni-30B-A3B-Instruct (Qwen/Qwen3-Omni-30B-A3B-Instruct), the 48-layer
mixture-of-experts language model that answers text, image, audio and video prompts. It is
z-lab/Qwen3-Coder-30B-A3B-DFlash fine-tuned on the thinker's own answers to about 170,000 text and audio prompts
from datasets that allow commercial use, plus the GSM8K train split. The layout is z-lab's: fc, hidden_norm, 8 Qwen3 layers and norm,
with no embedding or output head, since the draft uses the target's. SGLang's DFlash worker loads it as is.
Serving with sglang-omni
python -m sglang_omni.cli serve --model-path Qwen/Qwen3-Omni-30B-A3B-Instruct --text-only --port 8000 \
--thinker.engine.speculative_algorithm DFLASH \
--thinker.engine.speculative_draft_model_path wilsonzheng0327/Qwen3-Omni-30B-A3B-Instruct-thinker-dflash
The block size, 8, comes from the config. The cookbook's notes on speculative decoding for Qwen3-Omni (sampling
options, scheduling, no speech output with a draft) apply unchanged. The draft's context is 65,536 positions, the
thinker's own, so long video prompts serve with it (--thinker.factory.max_seq_len 32768 as in the Video-MME CI).
| setting | value |
|---|---|
| draft layers | 8 (hidden 2048, intermediate 6144, 32 heads / 4 KV heads, head_dim 128) |
| target layers | outputs of decoder layers 1, 12, 23, 34 and 45 of 48 (dflash_config.target_layer_ids) |
| block size | 8 (7 proposals per round), non-causal within the block |
| mask token | 151662 (<|fim_pad|>, which prompts never contain) |
| vocabulary | the target's full 152,064, through its embedding and output head |
| context | 65,536 positions |
| precision | bf16 |
Training
Prompts: 170,740, all user turns. The thinker wrote every answer.
Source Prompts License UltraChat 200k ( HuggingFaceH4/ultrachat_200k), first turns40,000 MIT OASST2 ( OpenAssistant/oasst2), English and Chinese first turns5,807 Apache-2.0 Llama-Nemotron post-training ( nvidia/Llama-Nemotron-Post-Training-Dataset): chat, math and code8,000 each CC BY 4.0 (rows checked) LibriSpeech train-clean-100 and train-clean-360 50,000 CC BY 4.0 AISHELL-1 20,000 Apache-2.0 People's Speech, clean 12,000 CC BY 4.0 VoxPopuli English 10,000 CC0 FLEURS English and Chinese 2,596 / 3,242 CC BY 4.0 YODAS2 English and Chinese, 5-30 s windows 1,262 / 1,833 CC BY 3.0 Audio prompts: 60% asked for a transcript in SpeechSpec's wording ("Transcribe the English audio into text.", or Chinese), 15% in other wordings, and 25% asked for a summary, the topic, a translation, the speaker's tone, the language, or nothing. No images or video: both would need their M-RoPE grid positions and deepstack rows in training, while text and audio keep the plain positions.
Answers: 169,681 for training (94.5M tokens) and 1,059 held out, from text-only sglang-omni servers. They are greedy, except that 1 in 4 UltraChat and OASST2 prompts was sampled at temperature 0.7 and top-p 0.9. A patched copy of the server saved each request's prompt ids, the audio embeddings it injected, and the answer ids. Training rebuilt the thinker's input from those; on AISHELL and FLEURS answers, the thinker's greedy choice on the rebuilt input matched the served token 0.982-0.983 of the time.
Trainer: speculators'
DFlashDraftModeland loss (cross-entropy with D-Pace position weights), initialised from z-lab's weights; the target ran in transformers with its experts throughgrouped_mm. AdamW, learning rate 3e-4, weight decay 0.01, 4% warmup, cosine. 5 epochs (16,220 steps), packed 16,384-token batches on each of two H100s, up to 512 anchors per batch, about 50k tokens per second: 2 h 41 min.Second stage, for GSM8K: after the first stage served GSM8K at 407 tok/s against SpeechSpec's 449, the thinker answered the GSM8K train split (
openai/gsm8k, MIT, 7,473 questions; the evaluation uses the test split) and the draft trained 2 more epochs (1,462 steps, learning rate 1e-4) on those answers twice plus 30,000 answers replayed from the first stage. This checkpoint is the end of that stage. Served GSM8K went to 449-450 tok/s; the other workloads did not change, and held-out accept moved from 3.027 to 3.018.
Results
Served through sglang-omni (main at b13b8d4ba, SGLang 0.5.23) on H100s, one GPU and a fresh text-only server per
run, greedy. The baseline is no draft. The comparison is SpeechSpec's draft from the cookbook,
yuekai/qwen3_omni_30b_a3b_instruct_dflash_block8 (5 layers, block 8). Every arm ran once on each of two GPUs; both
values are shown. c1 is one request at a time, c16 sixteen.
| Workload | No draft | SpeechSpec DFlash | This draft |
|---|---|---|---|
| LibriSpeech test-clean, 2,620 clips, SpeechSpec's prompt, c1 (clips/s) | 6.90 / 6.95 | 11.30 / 11.30 (1.63x) | 12.91 / 12.89 (1.86x) |
| LibriSpeech test-clean, c1 mean latency | 145 / 144 ms | 88 / 88 ms | 77 / 78 ms |
| LibriSpeech test-clean, c16 (clips/s) | 29.9 / 29.8 | 48.4 / 48.1 (1.62x) | 54.5 / 54.6 (1.83x) |
| MT-Bench, 80 first turns, c1 (tok/s) | 243 / 243 | 246 / 246 (1.01x) | 272 / 273 (1.12x) |
| MT-Bench, c16 (tok/s) | 1,052 / 1,052 | 1,458 / 1,465 (1.39x) | 1,619 / 1,615 (1.54x) |
| Held-out prompts, 358 from all 13 sources, c1 (tok/s) | 239 / 238 | 253 / 253 (1.06x) | 299 / 300 (1.26x) |
| GSM8K test, first 200, c1 (tok/s) | 243 / 242 | 449 / 447 (1.85x) | 449 / 450 (1.85x) |
| Video-MME CI 50, c16, 32,768-token context (req/s) | 0.345 | cannot serve (8,192-token context) | 0.351 |
Accuracy does not change:
| Check | No draft | SpeechSpec DFlash | This draft |
|---|---|---|---|
| LibriSpeech test-clean word error rate, c1 / c16 | 1.67% / 1.68% | 1.67% / 1.67-1.68% | 1.67% / 1.68-1.70% |
| GSM8K, correct of 200 | 181 / 181 | 181 / 181 | 181 / 181 |
| MMSU CI 2,000, c96, correct | 1,420 / 1,417 | 1,419 / 1,419 | 1,417 / 1,422 |
| MMMU CI 50, c16, correct | 32 / 29 | 29 / 30 | 29 / 30 |
| Video-MME CI 50, correct | 29 | - | 29 |
- Same answers. One request at a time, all 2,620 LibriSpeech transcripts are identical to the no-draft server's. Text is not bit-exact for either draft: verifying a block of 8 tokens takes other mixture-of-experts kernel paths than decoding one, so near-ties flip. Against a no-draft run, another no-draft run matches 80/80 MT-Bench, 358/358 held-out and 192/200 GSM8K answers; SpeechSpec's draft 79, 351 and 187; this draft 78, 346 and 185.
- MMSU and batching. At 96 requests at a time, any two runs differ on 22-32 of the 2,000 MMSU answers, in both directions, including two no-draft runs (23). This draft's runs sit inside that spread.
Tokens per verify round, one request at a time:
| Prompts | SpeechSpec DFlash | This draft |
|---|---|---|
| LibriSpeech test-clean | 4.76 | 6.08 |
| GSM8K | 4.77 | 4.92 |
| MT-Bench: extraction, math, coding, reasoning | 4.79, 5.24, 3.34, 2.65 | 5.76, 5.38, 4.25, 3.14 |
| MT-Bench: STEM, humanities, roleplay, writing | 2.23, 1.96, 1.96, 1.76 | 2.51, 2.18, 2.15, 1.96 |
| MT-Bench, all | 2.40 | 2.73 |
| Held-out chat: UltraChat, OASST2, Nemotron chat | 1.99 | 2.30 |
| Held-out Nemotron math and code | 3.80, 2.80 | 4.56, 3.85 |
| Held-out English audio: LibriSpeech, People's Speech, VoxPopuli, FLEURS, YODAS | 2.72, 3.30, 2.45, 2.50, 2.46 | 3.52, 3.92, 2.92, 3.19, 2.91 |
| Held-out Chinese audio: AISHELL-1, FLEURS, YODAS | 1.39, 1.54, 1.46 | 2.74, 3.13, 2.45 |
| Held-out, all | 2.50 | 3.07 |
The held-out audio prompts mix transcription with summaries, translations and the rest; on transcription prompts alone the first checkpoint (1.25 epochs) already accepted 5.8-6.0 tokens per round on English and 4.6 on Chinese (offline). Before fine-tuning, z-lab's Qwen3-Coder draft accepted 1.26 per round on Qwen3-Omni's held-out answers.
Limitations
- Open-ended chat and writing accept only 2.0-2.3 tokens per round, as for SpeechSpec's draft; the gain there is about 1.1x one request at a time.
- Short answers gain nothing. MMSU's 32-token answers at 96 at a time ran at about the same rate with either draft as without one (122-139 req/s against 134).
- Video gains nothing. Video-MME prompts average 14,077 tokens and answers 121, so time goes to prefill. A server with this draft needs
--thinker.engine.mem_fraction_static 0.90for them: at the default the draft's memory leaves 12,804 KV tokens and ~14k-token prompts are rejected. - No images or video in training, and no speech output: sglang-omni does not run the talker with a thinker draft.
- Measured on H100 only, greedy only, through sglang-omni only.
License
Apache-2.0. The draft is fine-tuned from z-lab/Qwen3-Coder-30B-A3B-DFlash, released by Z Lab under the MIT
license, whose notice is kept in LICENSE-Qwen3-Coder-30B-A3B-DFlash. The target, Qwen3-Omni-30B-A3B-Instruct, is
Apache-2.0. The prompt datasets are listed under Training with their licenses, none of them NC or ShareAlike.