Repository navigation
Conversation
…he CUDA engine's 4-bit/64 rule check() refused every checkpoint but MLX 4-bit in groups of 64 on every host. On a Mac the family decodes through the dense family's row decoder, which reads per-module affine widths and groups, so oQ-style mixed checkpoints were refused although they load and decode exactly. On a Mac the check is now the row decoder's own refusal; CUDA keeps its 4-bit/64 rule.
A ModelOpt export such as nvidia/Qwen3.6-35B-A3B-NVFP4 now serves on the CUDA engine: - FP8 attention and DeltaNet projections load through the 27B's NVFP4 loader, which gains an MLP hook; - routed and shared experts (weight-only NVFP4) run on the grouped NVFP4 kernel, the shared expert last; - layers ModelOpt declares W4A16 keep bf16 activations under checkpoint math; - the bf16 MTP layer (ModelOpt leaves mtp* unquantized) drafts in W4A16 NVFP4, its draft head the lm_head's rows of the draft ids as stored. Admission sizes the prompt staging from the widest MoE projection.
Owner
|
Thank you, @gilby. Serving NVIDIA's ModelOpt export, with its W4A16 layers in checkpoint math and the bf16 MTP layer drafting, is solid work, and the receipt covers v0.6.5 too. The Python engine is frozen (#286) and new work goes into the Zig engine, so this won't merge. The Zig engine has no Qwen3.6 MoE family or NVFP4 reader yet, and Zig CUDA runs only Nemotron so far. When Qwen3.6 MoE comes to the Zig engine on Zig CUDA, the reader's rules carry over with your credit: which layers keep bf16 activations, the shared expert last in the table, admission from the checkpoint's own tensor sizes, and the MTP layer drafting through the head's rows as stored. |
This was referenced Oct 30, 2026
Qwen3.6-35B-A3B on CUDA: serve nvidia/Qwen3.6-35B-A3B-NVFP4 (ModelOpt NVFP4 MoE) as downloaded
#1656
Closed
laudney
added a commit
to laudney/TensorFold
that referenced
this pull request
Oct 30, 2026
The recipe, the README's support table and the changelog now name NVIDIA's NVFP4 checkpoint on the native CUDA engine: how to serve it with its own MTP drafter, what runs in which precision, the drafter-only exception, credit to ashhart#345, and the GB10 receipts for decode, concurrency, exactness and cold prefill.
ashhart
pushed a commit
to laudney/TensorFold
that referenced
this pull request
Oct 31, 2026
nvidia/Qwen3.6-35B-A3B-NVFP4 was refused because the routed experts read only MLX tables. Admission now checks every expert projection's effective ModelOpt recipe and keeps the router bf16; the loader packs each projection of all 257 experts on the GPU into Nvfp4Experts' tables with the shared expert last; decode rows run the decode kernel and prompt tiles its decode-sum form, so a pair has the same bits in any window. Rules ported from ashhart#345 by gilby.
ashhart
pushed a commit
to laudney/TensorFold
that referenced
this pull request
Oct 31, 2026
The recipe, the README's support table and the changelog now name NVIDIA's NVFP4 checkpoint on the native CUDA engine: how to serve it with its own MTP drafter, what runs in which precision, the drafter-only exception, credit to ashhart#345, and the GB10 receipts for decode, concurrency, exactness and cold prefill.
ashhart
pushed a commit
that referenced
this pull request
Oct 31, 2026
nvidia/Qwen3.6-35B-A3B-NVFP4 was refused because the routed experts read only MLX tables. Admission now checks every expert projection's effective ModelOpt recipe and keeps the router bf16; the loader packs each projection of all 257 experts on the GPU into Nvfp4Experts' tables with the shared expert last; decode rows run the decode kernel and prompt tiles its decode-sum form, so a pair has the same bits in any window. Rules ported from #345 by gilby.
ashhart
pushed a commit
that referenced
this pull request
Oct 31, 2026
The recipe, the README's support table and the changelog now name NVIDIA's NVFP4 checkpoint on the native CUDA engine: how to serve it with its own MTP drafter, what runs in which precision, the drafter-only exception, credit to #345, and the GB10 receipts for decode, concurrency, exactness and cold prefill.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Stacked on #344: the earlier commits here are that stack's; this pull request is the last commit. A ModelOpt export such as
nvidia/Qwen3.6-35B-A3B-NVFP4now serves on the Qwen3.6 MoECUDA engine, which refused it by quantization:
as in the MLX table;
mtp*unquantized) drafts in W4A16 NVFP4, its draft head thelm_head's rowsof the draft ids as stored.
Admission counts the checkpoint's own tensor sizes and sizes the prompt staging from the widest MoE projection.
Nothing changes for MLX checkpoints.
Receipt
Measured on this change applied to 0.6.3 (the branch before its rebase onto 0.6.4; the rebase was clean and changed
no file this PR touches).
change on 0.6.3 + fix(qwen3.6): a Mac checks the row decoder's quantization rule, not the CUDA engine's 4-bit/64 rule #344 (branch now on 0.6.5 (609ca41) as 526cced, rebased cleanly;
Mac tests pass there; the CUDA receipt is from 0.6.3); PyTorch 2.13.0a0 (NGC 26.07 container, CUDA 13.3), Triton 3.7.1; one DGX Spark (GB10,
sm_121);
nvidia/Qwen3.6-35B-A3B-NVFP4@ 6c7f09d, drafting with its own MTP layer. Server:tensorfold serve <checkpoint> --backend cuda --name m --port 8095 --parallel 4(default--precision checkpoint;startup estimate 74.63 GiB, 262,144-token window, 4 streams).
tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false:--levels 2,4 --alone --serial(256 tokens, 3 reps, code and chat, temperature 1.0 and 0): every concurrent replyequals its alone run (6/6 at N=2, 12/12 at N=4 in all 8 cells), and every alone run equals
"draft": false(0unequal). One chat request twice, the second with
"draft": false:token_sha006f69232d31 both. Resumed == fresh, on v0.6.5 (one DGX Spark): the same 2,640-token prompt three times on one server at temperature 0: fresh, resumed (2,635 tokens from the prompt cache) and resumed with"draft": false, alltoken_sha3e1a19f350f5.tools/bench_openai.py: before is a refusal at startup ("Qwen3.6 MoE on NVIDIAGPUs (CUDA) does not read this checkpoint's weights (modelopt MIXED_PRECISION) ..."). After (
--tokens 256 --reps 5,median tok/s): fibonacci-raw greedy 177.2, sampled 162.8; gpu-chat-no-think greedy 136.4, sampled 125.1. The same
server with
--mtp-drafts 0: 73.9 / 73.0 / 73.6 / 73.2. MTP drafts accepted 17,641 of 26,233. Concurrent aggregate(
bench_concurrent, greedy): code N=2 261.3, N=4 377.2; chat N=2 207.0, N=4 306.3 tok/s.tools/prefill_cold.py: after, 3 reps, median: 2k 6,031 tok/s, 8k 5,709,16k 5,420, 32k 4,865, 64k 4,078 (TTFT 0.34 / 1.44 / 3.02 / 6.74 / 16.07 s). No before (refused).
test_glm5_prompt_kernels::test_fused_index_scores_are_the_three_ops, fails on v0.6.5 too. CUDA on v0.6.5 (one DGX Spark, GB10):pytest tests/cuda tests/test_cuda_build.py -k "qwen27 or qwen36 or nvfp4 or b16 or qmm or moe or build or distributed or dflash or dspark or exl3 or graph": 679 passed, 0 failed, 81 skipped.test_glm5_prompt_kernels::test_fused_index_scores_are_the_three_ops, fails on 0.6.4 too). On the DGX Spark,pytest tests/test_qwen36_moe_check.py tests/test_qwen36_family.py tests/cuda -k "qwen36 or nvfp4 or moe or experts":291 passed, 0 failed, 58 skipped (base: 290 passed, 58 skipped). The new
test_cuda_reads_a_modelopt_checkpointfails on the base tree (the CUDA rule refuses modelopt) and passes here.
tools/prefill_cold.py(2k / 8k / 16k, 3 reps, median tok/s; runs v0.6.5, this, this, v0.6.5, each side the mean of its two) onVontra/Qwen3.6-35B-A3B-MLX-4bit-MTPat--parallel 4, a checkpoint v0.6.5 serves: v0.6.5 → this 6,485 → 6,460 / 7,277 → 7,258 / 6,810 → 6,831.run; Metal: only the
check()change touches the Mac path, covered by the host suite.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.Vontra/Qwen3.6-35B-A3B-MLX-4bit-MTP, which v0.6.5 serves, one DGX Spark: −0.4 to +0.3%; see the v0.6.5 check.)