Paper (arXiv:2611.37561) | HF Paper | Blog | GitHub | SGLang PR
A DMTP speculative draft for Qwen3.8 Next 120B, combining native MTP first-token prediction with DFlash2 parallel block drafting.
This repository contains draft weights only, not the 120B target model. The target model, its native MTP module, and the shared token embedding and language-model head must be supplied separately.
Native MTP proposes the first candidate token, T1.
DFlash2 receives [A, T1, MASK, MASK, MASK, MASK, MASK, MASK], where A is the last emitted token.
The T1 embedding and the MTP representation that predicted T1 are normalized separately, concatenated, and projected into a residual added only to the T1 input embedding:
E(T1) <- E(T1) + W [RMS(E(T1)); RMS(h_MTP)]
DFlash2 drafts the remaining candidates in parallel, and the target verifies the combined proposals.
The A embedding, six MASK embeddings, and original target-context feature path remain unchanged. Concatenation is inside the residual branch; its output is added to E(T1), rather than replacing E(T1).
This is continued fine-tuning from a public DFlash2 checkpoint, not training from scratch. The draft backbone and candidate selector are initialized from Qwen3.8-Flash-Next-DFlash2, based on the Z Lab DFlash2 implementation.
We compare DMTP at fine-tuning step 7000 with the public Qwen3.8-Flash-Next-DFlash2 checkpoint on Qwen3.8 Next 120B. Both use token-level rejection sampling (RS), temperature 1, batch size 32, up to 128K input tokens, and up to 64K output tokens.
Accepted length is reported per verification round (per-verify). First-token acceptance is the fraction of rounds in which the first draft candidate is accepted.
| Dataset | DFlash2 Accepted Length | DMTP Accepted Length | DFlash2 First-Token Acceptance | DMTP First-Token Acceptance |
|---|---|---|---|---|
| General | 2.5339 | 2.7944 | 61.80% | 67.40% |
| Reason | 2.7902 | 3.2578 | 69.46% | 77.04% |
| Agent | 3.8963 | 4.2819 | 76.82% | 82.10% |
| Long-horizon | 3.5280 | 4.0195 | 74.03% | 81.43% |
| SWE | 4.0989 | 4.4628 | 81.96% | 86.86% |
| Search | 2.9158 | 3.1454 | 63.23% | 67.62% |
Use the main branch, which includes the HC/QSA target, native MTP state, and T1 residual adapter. The dense 27B launcher and the general upstream PR are not substitutes for this architecture-specific path. See the inference guide for weight downloads, configuration, and a test request.
git clone --depth 1 --branch main \
https://github.com/Sylvan820/sglang-dmtp.git
cd sglang-dmtp
pip install -e python
bash "$(hf download Piggy12/Qwen3.8-next-120b-dmtp serve_dmtp.sh)"
The launcher uses the unquantized Qwen/Qwen3.8-Flash-Next target with native MTP, TP4, concurrency up to 32, 64K context, and eight verification slots (seven proposals). Target and draft CUDA Graphs are enabled; prompt prefill remains eager. It uses the QSA GPU-state/two-graph path with serial scheduling, not the dense FA3 page-one path.
Install GPU dependencies matching this SGLang branch. TARGET_MODEL, DRAFT_MODEL, TP_SIZE, CONTEXT_LENGTH, and PORT can be overridden through environment variables. Memory requirements depend on the GPU configuration; FP8 targets and prefix-cache reuse are not supported by this launcher.
See the Blog for the method and the GitHub repository for implementation references. With an AI coding tool, these references can help you quickly adapt DMTP to an existing inference framework.
Check hidden-state alignment, T1 conditioning, HC/QSA state, and speculative-cache commit/rollback when porting it. This checkpoint requires a DMTP-aware runtime, not a standard Transformers model loader or an unmodified DFlash worker.
Inference performance is still being optimized. Scheduling, cache management, and CUDA Graph coverage need further refinement; speedup depends on the workload and runtime implementation.
We will also release DMTP checkpoints for smaller Qwen4 models in future updates.
The DMTP draft weights in this repository are open-source under the Apache License 2.0, following the public DFlash2 checkpoint. Runtime code retains its own repository license.
The separately supplied Qwen3.8-Flash-Next target is governed by the Qwen Community License. This draft release does not relicense the target model or its native MTP weights.
If you find this work useful, please consider citing our paper:
@misc{shen2026dmtp,
author = {Shen, Yuhao and Huang, Jianuo},
title = {{DMTP}: A Better First Token for Block Drafting via MTP},
year = {2026},
eprint = {2611.37561},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2611.37561}
}