Repository navigation
Description
The NPU row for the supreme scoreboard is blocked on two ELF sets, on the one model we hold in both formats
Context: ~/briefs/TSUPREME.md names NPU and HRX+NPU hybrid rows as the differentiation nobody else in the Strix Halo
container field can match, and asks for them as measured cells. This lane (pi-mosaic, the NPU split lane) went to see
whether such a row is measurable today, and the answer is "yes, after two kernel sets" — not after a device, a model
download, or a decision.
What we hold
Qwen3-Coder-30B-A3B is in the scoreboard's common model set, and it is the only model we hold in both formats:
| format | path | bytes |
|---|---|---|
GGUF Q4_K_M (the file the container engines are measured on) |
~/models/Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf |
— |
.q4nx (our NPU container) |
~/models/npu/qwen3-coder-30b-a3b-moe/model.q4nx |
19 528 322 120 |
hidden 2048, 48 layers, 128 experts, qwen3moe.
What the plan says, and what the kernel set has
tools/npu_plan.py <model dir> --kernels ~/1bit-MONSTER-iso-build/engine/npu/xclbins generates a valid plan
(format 1bit-npu-plan/1, 48 layers, layout rm, prefill.M 128, decode.M 16). Per-role shapes against that kernel
directory:
| role | K×N the plan asks for | artifact | present |
|---|---|---|---|
| qkv (fused) | 2048 × 5120 | full_i8_QKV_K2048_N5120.elf |
no (we have K1536_N5120, K2048_N3072) |
| down (MoE expert) | 768 × 2048 | full_i8_D_K768_N2048.elf |
no |
| gate / up / o | 2048 × 1536 | full_i8_{G,U,O}_K2048_N1536.elf |
yes |
| MoE expert gate/up | 2048 × 8192 | full_i8_{G,U}_K2048_N8192.elf |
yes |
So: two M=128 sets (QKV K2048 N5120, D K768 N2048), and their _m16 twins if the decode twin path is wanted —
the same artifact-shaped gap as the 0.6B _m16 row this lane already declared unrun, and the reason it is worth saying
out loud is that it silently decides whether the NPU has a scoreboard row at all.
Why it matters more than the shape list suggests
- Every container engine in the field (llama.cpp, ds4, ROCm FPX, gufo, Halogen) is iGPU-only. An NPU cell is the only
structurally different row available to us, and the scoreboard's addendum asks for it together with power (tok/J),
which is the axis an NPU can plausibly win even where it loses tok/s. - This lane's own measurements say what to expect on tok/s: our NPU prefill GEMM runs at 1.5 TFLOP/s against the
iGPU's 29-41 on the same shapes, and an M-split between them is worth +1.3 % on a healthy GPU and +10-13 % on a
throttled one (engine#754,docs/hetero-prefill.md). So the row is likely to lose prefill and to be interesting only
on power and on decode-side offload — which is exactly why it should be measured rather than assumed.
Acceptance bar for the two sets (so this is not "build it and see")
forward-serveloads the container with the two new sets plus the existing ones and answers/v1/chat/completions.- The same identity gate this lane uses on engine#808: greedy output byte-identical and content logprobs bit-identical
against the host-GEMM arm on the same container (~/p4-gate/logprob.sh+logprob-compare.py), and the per-launch
taps identical on the folded route. A fast wrong engine does not count. - Then the scoreboard rows: pp512 / pp4096 / tg128@d0 / tg128@8k / TTFT-2k, plus board power and tok/J, under an
npu-holdticket.
Whoever builds them: the family is full_i8_* (i8 activations, one kernel per role) as used by --kernels today; this
lane has the harness and the gate and will run step 2-3 as soon as the sets exist. No numbers are published anywhere
(blog rule); this issue carries shapes only.
Activity
bong-water-water-bong commentedon Nov 5, 2026
Device-free inventory for whoever picks this up, measured on this box 2026-11-05 (not a claim on the issue — it stays
unowned): a sweep of 9,753
*.elfunder/home/bcloudfinds no*_K2048_N5120*and no*_K768_N2048*, i.e. bothsets this issue names really are absent, including their
_m16,_b8andpb16ivariants.The nearest neighbours that do exist, in case one of them is a near-miss rather than a different shape:
full_i8_QA_K2048_N768,full_i8_QB_K768_N5120full_i8_QKV_K2048_N3072(_b8, _b8_m16)full_i8_D_K10240_N2560,full_i8_O_K2048_N2048(_m16)So the container side of the row exists (48 layers, 128 experts, top-8, expert_ffn 768, no shared expert, 19,528,322,120 B,
__metadata__.moewith 144 expert stacks x 128 offsets —docs/npu.md), and the two ELF families are the whole blocker:host-side this lane's reference, gate artifact and expert-chunk tooling already run over that container.
bong-water-water-bong commentedon Nov 5, 2026
Second device-free data point, and it turns the ask from a reading of the model into the plan's own output: on
origin/main6211c2fe,tools/npu_plan.py ~/models/npu/qwen3-coder-30b-a3b-moe --print(qwen3moe, hidden 2,048, 48 layers, containerlayout: rm,chunk_kind: mode0,pb16i: false, decodeM: 16) emits these per-layer shapes:qkv(fused)gate_up(fused)downSo both families this issue names are what the plan asks for at every one of the 48 layers, and
downis the sameK768 -> N2048shape the routed experts need, i.e. one family serves both the layer and the expert stack.moe.batched_expert_guprints
enabled: false, K: 0, N: 0as generated, so the expert gate/up is not yet a plan entry either.Against the box's ELF inventory, the exact names are absent in every variant (
_m16,_b8,pb16i), while the nearestneighbours are
full_i8_G_K2048_N1536.elf/full_i8_U_K2048_N1536.elf(the unfused gate and up at 1,536) andfull_i8_QB_K768_N5120.elf(the transposed attention pair). Nothing here changes the issue's scope; it just confirms thetwo names are the plan's, not a guess, so an arena build can be scoped from the plan alone.
bong-water-water-bong commentedon Nov 6, 2026
Disposition: parked on the private NPU kernel-set program — every other piece of this row is in place.
The issue's own tables already establish this:
tools/npu_plan.py <dir> --kernels <kernel-dir>generates a valid plan for the 30B-A3B MoE (48 layers,layout rm, prefill M=128, decode M=16), and the per-role shape check against the kernel directory shows exactly two missing artifact families:full_i8_QKV_K2048_N5120.elfK1536_N5120,K2048_N3072)full_i8_D_K768_N2048.elffull_i8_{G,U,O}_K2048_N1536.elffull_i8_{G,U}_K2048_N8192.elfplus the
_m16twins if the decode-twin path is wanted. Those sets are authored in the private NPU-kernels repository (the same outside-this-repo split as #812's driver patches and #796's ELF set), not generated by anything in the engine repo's CI surface; no engine-side change can produce them, and the issue itself says the row is blocked "only on the two kernel sets", not on a device, a model download or a decision.Unpark: the private NPU kernel lane generates
QKV K2048 N5120andD K768 N2048(and the m16 twins),tools/npu_plan.py --kernels <dir>shows every role present, then the row is measured on the model we hold in both formats (~/models/npu/qwen3-coder-30b-a3b-moe, 19.5 GB) against the GGUF Q4_K_M baseline.bong-water-water-bong commentedon Nov 6, 2026
The two missing kernel sets are built — this unparks the row. Compile-only, no device was opened, on the box's pinned NPU toolchain.
Built
In ~/models/npu/qwen3-coder-elfs/ (compile logs beside them), with the prefill family at M=128 (v26, 32x64x128) and the _m16 decode twins at M=16 (v27 -r 1, 16x64x128) — the same recipe that built the d3-lite set (engine#796 rung 2).
Toolchain, per ~/wt/npu-arena/TOOLCHAIN.lock: aiecc from the wheel venv ~/amd-oss/iron-upstream-venv (mlir-aie 1.4.4.dev53+gd53582d), Peano/llvm-aie 22.0.0.2026091701+773413fb, --get-full-elf (required by this aiecc: --full-elf-name alone exits 0 and writes nothing). Generators: ~/1bit-MONSTER-iso-build/engine/npu/generators/ (n1_core_i8_v26.py / v27.py, mm_kernel_reference.cc). Geometry from the plan's own output in this issue: qkv K2048 N5120, down K768 N2048, 48 layers, layout rm.
What this changes
The row is no longer blocked on kernel authoring: with this set plus the artifacts already present for gate/up (K2048 N1536) and MoE expert gate/up (K2048 N8192), every role the plan asks for has a full ELF. The remaining work is the measurement itself — stage the kernels dir (xclbins artifacts + these four), run the 30B-A3B pack through forward-serve on the NPU under an npu-hold ticket, and record the row against the GGUF Q4_K_M baseline. That is a device run, not a build.
bong-water-water-bong commentedon Nov 6, 2026
Progress after building the missing sets: the NPU row now initialises on the device — and the next blocker is a container-metadata disagreement, not kernels.
Built (all in ~/models/npu/qwen3-coder-kernels, M=128 + _m16 decode twins)
(plus the QKV K2048 N5120 and D K768 N2048 from the previous comment). The plan derived four designs from the model's own config: QKV H=2048 -> 5120, O NH*HD=4096 -> H=2048, GU IM=768 -> 1536 (fused, cols 6), D 768 -> 2048.
Device run (npu-hold ticket 01793977592491894553.1035-row2, 0 s wait, die 37 C)
npu-hold->forward-serve -m qwen3-coder-30b-a3b-moe/model.q4nx --kernels ~/models/npu/qwen3-coder-kernels;[forward] decode family: 4 role(s) at M=16), server ready(full ELF);forward step failed: MLP dequant : data_size 0 at geometry 768x2048 = 192 tiles (chunk 0 B is not a kind, and no padded grid fits): the container and config.json disagree.What that means
The kernel-set gap this issue was about is closed — every design the plan asks for exists and loads on the array. The remaining blocker is the
model.q4nxcontainer's down-projection metadata: its chunk/layout information does not describe the 768x2048 geometry the config declares, so the dequant path sees no chunk kind (same family as #1110's foreign tile-order containers). That is converter/container work on the model file, not kernel authoring, so this issue can move from "blocked on kernel sets" to "needs the 30B container re-converted/normalised"; the row is one container fix away.bong-water-water-bong commentedon Nov 6, 2026
Root cause of the
MLP dequant : data_size 0 … chunk 0 B is not a kindfailure: the container's expert tensors are stored in a different chunked shape than the engine's derived designs expect — this is a converter/container mismatch, not the kernel sets.Container header (model.q4nx, 302,144-byte JSON header)
model.layers.0.mlp.experts.gate_proj.weight[3072, 8, 5120]model.layers.0.mlp.experts.down_proj.weight[8192, 3, 5120]model.layers.0.self_attn.q_proj.weight(dense)config.json says
hidden 2048, intermediate 768, 128 experts, 8 active; the plan derivesgate_up K2048 N1536 (fused, 32 folds), down 768x2048 (192 tiles). The engine's MoE dequant reads a chunk-kind byte and finds none it recognises at the expert geometries, so it reportsdata_size 0 … the container and config.json disagree.The container was made by
tools/gguf_to_q4nx.pyfromQwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf(per its own config.jsonq4nx_source). The dense/attention tensors load and the four NPU designs init fine (health ok, device fds 1, 4 roles at M=16); only the MoE expert dequant path is mismatched.Next step
Re-convert the GGUF with the current engine converter (matching the engine's expected expert chunk kind/grid —
mode0,layout rm,pb16i false, and the expert tensors' 2-D geometry rather than the[8192,3,5120]blocked form), then re-run:forward-serve -m model.q4nx --kernels ~/models/npu/qwen3-coder-kernels, which now loads every design the plan asks for.Kernel-set status in this issue is done: QKV K2048 N5120, O K4096 N2048, GU K2048 N1536, D K768 N2048 all exist in M=128 + M=16 families and initialise on the array. The row is one container re-conversion away.
bong-water-water-bong commentedon Nov 6, 2026
The container now loads and answers on the device — row measured, next blocker named. Fix: PR #1266.
Root cause of the
MLP dequant : data_size 0 at geometry 768x2048.tools/gguf_to_q4nx.pywrites the engine's own MoE convention:num_experts/num_experts_per_tokin config.json, routermlp.gate.weight, stacksmlp.experts.{gate,up,down}_proj.weightwith a plain[N][K]per-expert tile grid. The forward read the FastFlowLM-style convention (n_expert/top_k,moe_router.weight,*_exps_projnames,[K][N]slice grid), son_expert_was 0 and layer 0 took the dense path looking for amlp.gate_proj.weightthe container does not carry. The grid would have been the next silent failure: converter slice vs GGUF correlates 0.99999 on[N][K], 0.00855 on[K][N](expert 0). PR #1266 teaches the forward both conventions (detected from layer 0), falls back on the config keys, decodes with the right geometry, accepts a fused-GU plan's batched GB/UB designs (it required split G/U before), and keepsmoe_mlp's failure reason. CI testnpu_moe_containeris a known-answer decode.Device row (strixhalo, one npu-hold ticket: queued 11:16:45, held 196 s, released 11:20:01,
amdxdnaerrors 0; current main a6c9bf5 + PR #1266): 48 layers, 6 designs, 4 M=16 roles,device fds: 1, every request HTTP 200.coder30b-hrx-solo-20261030= 84.33 tok/s; CPU llama.cpp on the same GGUF/box, same prompt = 29.2 tok/s decode / 49.4 tok/s prefill.Next blocker (throughput, named). 7.3 s/token is the host-side per-token dequant of the top-8 experts: ~1.1 GB of q4_1 tiles per token (8/128 x 3 projections x 48 layers) decoded and packed per layer. The device-resident/streamed expert path (the chunk-list dispatch direction in
docs/npu.md, "Routed expert stacks") is what a competitive row needs; this PR only makes the container readable by the existing per-token path.Fidelity note. On the same prompt the short completion differs from llama.cpp's, but the container is a requantisation of that GGUF and the docs already measured that 32/48 layers route a different top-8 for a 0.5 % hidden-state difference; single-token comparisons are not the gate. The next fidelity measurement is aggregate KLD/perplexity against the container's own host reference (
tools/moe_q4nx_ref.py).npu forward: read the engine converter's MoE container -- names, conf…
bong-water-water-bong commentedon Nov 6, 2026
Resolved: the NPU row for Qwen3-Coder-30B-A3B is now measurable and measured. The issue's ask — two kernel sets before the row could be measured — is done, and the row exposed the next (already-named) blocker.
Kernel sets (the ask)
Built and loading on the array (~/models/npu/qwen3-coder-kernels, M=128 prefill +
_m16decode twins):Toolchain per ~/wt/npu-arena/TOOLCHAIN.lock (mlir-aie 1.4.4.dev53+gd53582d, Peano 22.0.0.2026091701,
--get-full-elf).The container mismatch, and the fix
The first run then failed in
MLP dequant(data_size 0 at geometry 768x2048 … chunk 0 B is not a kind). Root cause measured, not inferred:tools/gguf_to_q4nx.pywrites the engine's own MoE convention (HFnum_experts/num_experts_per_tok,mlp.gate.weight,mlp.experts.*_proj.weighton a[N][K]per-expert tile grid), while the forward read the FastFlowLM convention (n_expert/top_k,moe_router.weight,*_exps_proj,[K][N]grid) — son_expert_stayed 0 and layer 0 took the dense path. The grid half would have been the next silent failure: converter slice vs GGUF corr 0.99999 on [N][K], 0.00855 on [K][N]. A second blocker fell out: the fused-GU plan's batched GB/UB designs were rejected by the split-G/U requirement.Fixed in PR #1266:
npu/forward/include/moe_container.h(both conventions in one table), detection from layer 0, config-key fallbacks, convention-awaremla_expertgeometry, batched GB/UB accepted,moe_mlpfailure reason preserved; CI testnpu_moe_containeris a known-answer decode through the shippedq4nx_dequant.c(both spellings/keys/geometry), 8/8 ctest subset on current main, copyright clean.The row (strixhalo, npu-hold ticket: queued 11:16:45, held 196 s, released 11:20:01, amdxdna errors 0)
Next blocker (named, out of this issue's scope)
7.3 s/token is the host-side per-token dequant of the top-8 experts — ~1.1 GB of q4_1 tiles per token (8/128 x 3 projections x 48 layers) decoded and packed per layer. A competitive row needs the device-resident/streamed expert path (chunk-list dispatch, docs/npu.md "Routed expert stacks"); this fix only makes the existing per-token path able to read the container. Fidelity caveat: the short completion differs from llama.cpp, but per the docs' own measurement 32/48 layers route a different top-8 for a 0.5% hidden difference, so single-token text is not the gate — aggregate KLD/perplexity against
tools/moe_q4nx_ref.pyon this container is the next fidelity measurement.Closing: the two sets exist, the container is read correctly under a test, and the NPU row is a measured number with its next lever identified.