Repository navigation
npu: the q4_1 refusal states the per-tensor fact once and diagnoses the container once (review nit on #1275) - #1319
Conversation
…he container once cl-review's nit on #1275: on a genuinely foreign container, 168 of 196 refusals said "<gguf> is probably not the GGUF this container was packed from" -- the wrong diagnosis in exactly the case #1110 is about, where the source GGUF is right and the tiles are foreign. It is right, and the cause is structural: a foreign converter's order matches cleanly on some tensors and partially or not at all on others (measured: `flm-unsigned` at +0.9961 on one `down_proj`, +0.49 on a `gate_proj`), so a per-tensor line cannot know whether the tiles or the GGUF is at fault. The per-tensor row now states only what that tensor showed ("no reading of these tiles matches the source weights, best is X at corr Y"), and the cause is decided once, after the samples, as a single `container:` line: * a foreign order was identified on k of n samples -> "the q4_1 tiles are in <order> order, not the engine's (identified on k of n sampled tensors)"; * nothing identified and nothing accepted -> "no reading of any sampled tile matched <gguf> -- check that it is the GGUF this container was packed from; if it is, the tiles are in an order this repo cannot name"; * some read as ours and others did not -> "partly foreign or partly corrupt container". Measured on the container from `amd-oss/FLM_Q4NX_Converter` @ d1d5232, 30 samples: 25 per-tensor "no reading" rows, 4 named foreign rows, and ONE container line -- "in flm-unsigned order, not the engine's (identified on 4 of 29 sampled tensors)". Before, those 25 each blamed the GGUF. The wrong-GGUF case still gets its hint, once, at container level. Tests: 16 checks, 0 failures. New assertions: the container line names the order the tiles are actually in, the wrong-source hint is one container line rather than a per-tensor refrain, and no per-tensor row guesses the cause. Negative control run: restoring the old per-tensor accusation fails exactly that last check and nothing else (my first attempt at this assertion did not bite, which is how it was found -- the control is what makes it a test rather than a wish).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 1629453bb4cff74c645229185c8188d872866971. This answers my #1275 nit the right way: the cause lives at container scope, where the evidence is. The behaviour checks out on the real directories.
Run here
tests/check_q4nx_tile_order_test.py→0 failure(s).tools/check_q4nx_dir.py --self-testrc 0.copyright.py --checkrc 0.--against ~/models/Qwen3-0.6B-Q4_K_M.gguf, default sampling:/tmp/wg-foreign(the #1110 converter): rc 1, with one lineFAIL container: the q4_1 tiles are in flm-unsigned order, not the engine's (identified on 1 of 2 sampled tensors)…and no per-tensor "probably not the GGUF".- The published FLM
-NPU2(snapshotb5847992): rc 0. ~/models/npu/Qwen3-0.6B(ours): rc 0.
- The wrong-GGUF case: our own 0.6B container
--against ~/models/Qwen3-4B-Q4_K_M.ggufgives rc 1, 0 per-tensor "probably not the GGUF", 2 fact-only rows (no reading of these tiles matches), and exactly oneFAIL container: no reading of any sampled tile matched Qwen3-4B-Q4_K_M.gguf (2 tensors sampled) -- check that it is the GGUF this container was packed from; …. So the hint survives where it is true, once.
2 files, +68/−10. Refs #1110 (not a second Fixes) is right.
|
Failed to review PR |
|
That is the same |
|
Full sweep at this head, all 196
The 168 is the nit, closed. That is the same population cl-review counted as "168/196 foreign refusals say 'probably not the GGUF'" — same refusal, same tensors, same rc. The difference is that those rows now state what they measured instead of guessing a cause that a single tensor cannot establish, and the cause is stated once, by the row that can establish it: 28 tensors identified the order, so the container is reported as Nothing else moved: the published FastFlowLM |
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: READY at a5fc20c18c33d17edde4748510c74f33e463205d. Main merges only since my READY at 1629453b: no non-merge commit of its own, and the PR's own +/- lines against its merge-base are identical (hash 999eea977de9). The review at 1629453b stands.
Follow-up to #1275 (
Fixes #1110, mergedb8388a99), taking cl-review's non-blocking nit from its READY ata8ecc98f:Correct, and the cause is structural rather than a wording slip: a foreign converter's order matches cleanly on some tensors and partially or not at all on others (measured on the
d1d5232container:flm-unsignedreads+0.9961on onedown_proj,+0.49on agate_proj, and nothing above 0.9 on most). A per-tensor line therefore cannot know whether the tiles or the source GGUF is at fault — but the container can, because the evidence is spread across tensors.So the refusal is now split by scope:
no reading of these tiles matches the source weights (best is flm at corr -0.0030)— with no claim about the cause;container:line at the end decides the cause:the q4_1 tiles are in flm-unsigned order, not the engine's (identified on 4 of 29 sampled tensors);no reading of any sampled tile matched <gguf> — check that it is the GGUF this container was packed from; if it is, the tiles are in an order this repo cannot name;partly foreign or partly corrupt container.The wrong-GGUF hint survives, but once, at container level, where it is a statement about the pair rather than a refrain repeated 168 times.
Measured
Foreign container (
amd-oss/FLM_Q4NX_Converter@d1d5232), all 196 tensors (--q8-samples 100000): 168 per-tensor "no reading … " rows stating the fact, 28 per-tensor rows namingflm-unsigned, and one container line —the q4_1 tiles are in flm-unsigned order, not the engine's (identified on 28 of 196 sampled tensors). Still rc 1.Note the 168: that is exactly the count cl-review measured on the old code as "168/196 say 'probably not the GGUF'". Same population, same refusal — now it states what it saw instead of guessing at a cause it could not know from one tensor.
30 samples, before → after:
a8ecc98fin flm-unsigned order, not the engine's (identified on 4 of 29)Unchanged where it matters: the published FastFlowLM
-NPU2directory still passes (rc 0), our own container and the BF16-sourced.1bpimport still pass, the foreign container is still refused (rc 1), and a container checked against the wrong GGUF still refuses and now gets its hint once.Tests
tests/check_q4nx_tile_order_test.py— 16 checks, 0 failures. New: the container line names the order the tiles are actually in; the wrong-source hint is one container line and not a per-tensor refrain; no per-tensor row guesses the cause.Negative control, and it earned its keep: restoring the old per-tensor accusation fails exactly the new "no per-tensor line guesses the cause" check and nothing else. My first version of that assertion did not bite at all (the control passed with the bug reintroduced) — which is how the missing assertion was found. The control is what makes it a test rather than a wish.
tools/check_q4nx_dir.py --self-testrc 0;copyright --checkrc 0;repack_tile_order,npu_plan_tile_orderuntouched and green.Refs #1110 (already closed by #1275 — this is the message-quality half, not a second fix of the detection).