Repository navigation
hip flashnext: take the MTP head's root from the index - #1613
Conversation
|
Thanks — this is a tidy change and reuses the existing index helpers well. Could you add a short description, and either a small test or a load log showing a checkpoint with top-level |
|
Thanks. Pushed The description already covers both layouts on a real checkpoint: the same oQ4e quantization served with the head under The index of that copy lists 76 top-level |
219ed81 to
e692326
Compare
oMLX writes the Flash Next MTP head at the top level (mtp.*). The HIP loader named it from fixed language_model.mtp.* constants, so oMLX checkpoints failed with a missing language_model.mtp tensor. The loader now takes the root from index.mtpRoot, as the n-gram shard spelling already does; names for language_model.mtp checkpoints are unchanged. Fixes ashhart#1598
…ads only those The loader now builds the MTP head's six names once, through one join, from index.mtpRoot; the test formats them over both spellings a checkpoint's weight map can list the head under and checks every string, so a hard-coded root fails.
e692326 to
1f2ae50
Compare
|
Thank you @gilby. 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. |
|
Thanks @gilby! This is in TensorFold 1.2.2, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.2 |
What this changes
The HIP Flash Next loader takes the MTP head's root from
index.mtpRootinstead of fixedlanguage_model.mtp.*names, so oMLX checkpoints (head at top-levelmtp.*) load with MTP drafts. Fixes #1598.Receipt
7c068895plus this change,tensorfold-native 1.1.8built withzig build native-hip -Dhip-arch=gfx1151, Ubuntu archive HIP 7.1 (clang 21), AMD Ryzen AI MAX+ 395 with Radeon 8060Sgfx1151(128 GB unified memory). Checkpoint: an oMLX oQ4e quantization of Qwen3.8-Flash-Next (group 32 base, one width per fused stack), served once with the head underlanguage_model.mtp.*and once with the same tensors renamed to top-levelmtp.*(the oMLX spelling).--parallel 1 --context 131072 --prompt-cache-gib 0.tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0 --levels 1,4 --alone --serial: every cellalone3/3 (1 stream) and 12/12 (4 streams) equal,serialequal, 0 failed, for stock withlanguage_model.mtp.*, this change withlanguage_model.mtp.*, and this change withmtp.*. Thetoken_sha256sets ofbench_openai,bench_concurrentandbench_cacheare identical across the three runs. Stock refuses themtp.*spelling withcheckpoint has no tensor language_model.mtp.pre_fc_norm_embedding.weight; this change loads it withmtp drafts 3 under 0.3.tools/bench_openai.py --tokens 256 --reps 3 --temperatures 0(median tok/s, code / chat): stock 41.9 / 36.1; this change withlanguage_model.mtp.*40.3 / 33.8; withmtp.*41.6 / 35.8. The change cannot reach the decode path; the spread is load from compilation on the same machine during these runs, and I can repeat alternated runs on an idle machine if wanted.zig build test -Dhip=true --summary all466/466 steps, 0 failed (exit 0, same on the base);zig build hip-kernel-test103/103 kernel tests passed;python3 tools/zig/lean_check.py425 problems on both the base and this change (inherited, no new findings);git diff --checkclean.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.SUMMARYline is in the receipt. (No kernel change.)language_model.mtpspelling; the served receipt covers both spellings.)