Skip to content

Qwen3.6-35B-A3B on CUDA: draft NVIDIA's NVFP4 checkpoint with a DFlash2 model - #1674

Merged
ashhart merged 1 commit into
ashhart:mainfrom
laudney:pr-q36-dflash2
Oct 31, 2026
Merged

ashhart merged 1 commit into
ashhart:mainfrom
laudney:pr-q36-dflash2

Conversation

@laudney

@laudney laudney commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1656 (2 of 3). #1662 has landed in 1.2.0, so this is now one commit on main: feat(qwen3_5): let the MoE target draft with a DFlash2 model. Rebased onto main after 1.2.0; the only conflict was the changelog line.

Why

SGLang's DFlash recipe for this model pairs NVIDIA's nvidia/Qwen3.6-35B-A3B-NVFP4 with incoai/Qwen3.6-35B-A3B-DFlash2. Serving the same published target weights with the same published draft is what makes a comparison like for like, and it lets people who already run that recipe try TensorFold with the two checkpoints they have downloaded, with no conversion step.

What

On CUDA the Qwen3.6 MoE target wired --drafter to its MTP layer alone, though the engine's DFlash2 drafter already reads incoai/Qwen3.6-35B-A3B-DFlash2. One openDrafter now serves both: a directory whose config.json has dflash_config opens DFlash2 (as every directory does under a dense target), any other opens the target's MTP layer, so --drafter nvidia/Qwen3.6-35B-A3B-NVFP4 keeps drafting with MTP. Both openers return one Opened struct whose prepare is optional, which cuda_drafted.zig now accepts. The draft (eight target layers read) is quantized to affine-4 at load. Recipe section and changelog entry included.

hf download incoai/Qwen3.6-35B-A3B-DFlash2 --revision 51ef7b6923ad6c14cb1bb41c37a9041446496ab6
tensorfold serve nvidia/Qwen3.6-35B-A3B-NVFP4 --drafter incoai/Qwen3.6-35B-A3B-DFlash2

Gate (one DGX Spark: GB10, sm_121, CUDA 13.0; target 1355db6a, draft 51ef7b69)

  • Served with DFlash2: drafted replies equal their "draft": false runs (6 of 6: prose and code, greedy and two seeded temperatures); concurrent replies equal solo at one and four streams, greedy and sampled (8 of 8 cells).
  • Host: zig build test and zig build test-cuda-host (89/89) pass; zig fmt --check and git diff --check are clean; lean_check.py reports 426 problems, the same as main.

Numbers

bench.py of spark-sglang-docker, 4.2K-token prompt, 512 tokens, one build, the same target with either drafter (MTP batched, as #1562 made it):

Users MTP DFlash2
1 (decode) 98.6 130.3 +32%
2 (aggregate) 124.7 131.3 +5%
4 (aggregate) 170.6 161.4 −5%
8 (aggregate) 208.4 198.0 −5%

DFlash2 proposes more rows a round and keeps fewer of them, so it leads at one and two streams and MTP keeps the lead under load; which drafter to name is a deployment choice, and both stay one flag away.

git merge-tree against main after 1.2.0: clean.

@laudney

laudney commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@ashhart #1674 and #1675 are rebased onto main after 1.2.0 (fdd8b6d): #1662's commits are gone, #1674 is now a single commit, and #1675 is #1674 plus its nine. Both merge cleanly; only changelog and adjacent-line conflicts, no code changes. Thanks!

On CUDA the Qwen3.6 MoE target wired --drafter to its MTP layer
alone, though the engine's DFlash2 drafter already reads the
SGLang recipe's incoai/Qwen3.6-35B-A3B-DFlash2. One openDrafter
now serves both families: a directory whose config.json has
dflash_config opens DFlash2, as every directory does under a dense
target, and any other opens the MoE target's MTP layer. Both
openers return one Opened struct whose prepare is optional, which
cuda_drafted.zig now accepts. On a GB10 one build drafts with
either; every drafted reply equals its plain run, and DFlash2
decodes 130.3 tok/s at one stream on a 4.2K-token prompt against
MTP's 98.6.
@ashhart
ashhart merged commit 40d54f6 into ashhart:main Oct 31, 2026
8 of 9 checks passed
@ashhart

ashhart commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Thank you @laudney. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants