Repository navigation
npu-pack: a 1.8 hybrid pack's [0] MatMulNBits placeholders are not weights; refuse by name and point at model.bin (Refs #1503) - #2179
Conversation
…ights; refuse by name and point at model.bin (Refs #1503) The walker knew only the 1.9 spelling (<w>.empty beside <w>.packed). The 1.8 hybrid line names <w> itself as the [0] placeholder beside an empty <w>.packed, so the node was kept as a real weight: info reported every projection importable (2 norm gaps only) and import died on ...MatMulNBits.bias: no data. Measured on Llama-3.2-1B-Instruct and SmolLM2-135M rai_1.8.0_hybrid. Now both refuse up front, naming model.bin. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ready for review at aaeccca |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at aaecccc: READY
It merges cleanly onto main, and CI build at aaecccc is a success.
Checked at this head (review build at the head):
npu_pack_import_test: rc 0. Arm 4 prints the refusal by name:rai18_qweight (its rai18_qweight.packed sibling carries no data either) ....- Mutant: I put main's
.empty-only rule back in the walker (else { kept.push_back(mm); continue; }). The test fails with rc 1 and 2 FAIL lines, so the arm guards the fix. After restoring the file the tree is clean. npu-pack info, comparing the PR build with that mutant build (same tree, only this line differs), on the packs on this box:smollm2-135m-1.8: mutant rc 0, PR rc 1, with the refusal naming the placeholder plus themodel.binsentence. This is the claimed change.smollm2-135m,phi3mini-1.7.1,qwen2.5-0.5b-1.7.1,qwen3-1.7b-awq-onnx: rc 0 and byte-identical output (cmp).
- The Llama-3.2-1B 1.8 hybrid snapshot is no longer on disk (only
refs/is left), so I did not re-run that row.
Code: real weights are still kept before the new branch (w && !no_bytes(*w)), and a node with no <w>.packed sibling is still kept as it was. So the new spelling only reaches weightless nodes, and on a pack without an .fconst the refusal still comes from #1687's rule in plan().
Non-blocking: the change also opens one path that no test covers. A weightless <w> whose <w>.packed sibling has data is now retargeted to the sibling (packed_siblings++). On main it was kept naming <w> and failed later. That is probably the right reading, but no pack or arm here exercises it.
…ack to use instead (Fixes #1503) (#2206) The 1.8 hybrid packs keep every projection in model.bin, a compiled container; the graph's MatMulNBits initializers are [0] placeholders (162/162 on Llama-3.2-1B-Instruct). #2179 refuses them by name. Decoding model.bin is not something this engine does, so the line is recorded as unsupported, with the earlier generation of each model to import instead and what was measured on it. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Refs #1503. This PR does not import the 1.8 hybrid packs. It stops
npu-packfrom claiming that it can.The defect, measured
On
Llama-3.2-1B-Instruct_rai_1.8.0_hybrid, every.MatMulNBits.*initializer is a[0]placeholder with no data: 162 of 162qweight,scales,qzerosandbiastensors, plus their.packedsiblings, alldims [0], with no location and no raw bytes. The weights are in the pack's 1.3 GBmodel.bin. Main's walker only knew the 1.9 spelling of a placeholder (<w>.emptybeside<w>.packed). It kept the 1.8 node, which names<w>itself, as a real weight.npu-pack info: rc 0, every projectionrefusal: "", 2 gaps (layer 0's norms)npu-pack import: died mid-way onmodel.layers.0.attn.qkv_proj.MatMulNBits.bias: no datainfo, and nothing writtenThe refusal is the existing #1687 rule, now also reached by this spelling. When the pack has a
model.bin, one sentence is added saying where the weights are:SmolLM2-135Mrai_1.8.0 hybrid had the same wrong picture on main (rc 0, 2 norm gaps), and gets the same refusal here.Regression check
I ran
npu-pack infowith a main-only build and with this PR on every pack on disk (12). On 11 packs the output is byte-identical (cmp), and so is the exit code: the 1.7.1 hybrids (phi3-mini, Phi-3.5, qwen2.5-0.5b), smollm2-135m, qwen3-1.7b-awq, phi-4 1.9, Qwen2.5-0.5B 1.9, gpt-oss-20b 1.9, Qwen3-VL-4B 1.9, and the two golden directories. The only one that changed issmollm2-135m-1.8, as described above.Test
npu_pack_import_test, arm 4 (the 1.8 spelling): a[0]<w>beside an empty<w>.packed. With amodel.binbeside them,plan()refuses, naming both tensors andmodel.bin. Without amodel.bin, the refusal does not claim one. A mutant that restores main's.empty-only rule fails both arms (rc 1). The whole test passes (rc 0).What still has to happen for #1503 (not in this PR)
A reader for the 1.8
model.bin(withmodel.pb.bin, which names theGQO,SSMLPandMatMulNBitsnodes). That decision is logged as an ORCH line in my lane's state file.🤖 Generated with Claude Code