You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npu-pack: the 1.7 -onnx-ryzenai-npu Token .fconst has no norm envelopes and a reordered layout (160 gaps on Llama-3.2-1B-Instruct) #2634
npu-pack info on amd/Llama-3.2-1B-Instruct-onnx-ryzenai-npu (the Ryzen AI 1.7 -onnx-ryzenai-npu line, about 33 packs) reports 160 gaps, every one of them:
layer blocks not located: fewer than 6 RMSNorm epsilon headers in the first GiB
Measured (CPU only, against the same model's 1.8 pack, which imports and is OOB)
The 1.7 Token file is dd_metastate_Llm_Token_MatMulNBits_2_0.fconst, 686,511,104 B. The 1.8 npu_4K twin's is 686,518,336 B, 7,232 B larger. The pack's config.json has no model fields.
The 1.7 file has no epsilon headers: 0 hits for bf16 1e-5 (either rounding) followed by 62 zeros. The 1.8 file opens with one (2837 then zeros); the 1.7 file opens with zeros.
The same bytes, reordered. 64-byte chunks of the 1.8 file appear in the 1.7 file at other offsets: 1.8 @100,000 is at 1.7 @2,463,328, @1,000,000 at @403,968, and @20,000,000 at @19,995,776. Chunks at 300 MB and 600 MB were not found, so either the later sections differ, or that part of the order does too.
So this line is a different Token layout: no norm envelopes, and sections in another order. It is not the 1.8 block read at another stride. A reader needs the section map, measured the same way as #2594/#2604 (field by field against the 1.8 twin, then rebuild one file from the other byte for byte), and a forward check before any row.
Found in the TAMDCOL 1.7 sweep (cl-npuperf). The -onnx-ryzenai-1.7-hybrid packs are a different genre and read with 0 gaps (AMD-OLMo-1B checked).
The layout is now fully mapped (Llama-3.2-1B-Instruct-onnx-ryzenai-npu against its 1.8 npu_4K twin), and a rebuild confirms it:
part
1.7 -onnx-ryzenai-npu
1.8 npu_4K
layer block
q, k, v, o tiles (q first), then post_attention gain bf16[H] (no header), then MLP gate/up + down (no 64-B separator), then the next layer's input_layernorm gain bf16[H] (after the last layer: the final norm). Stride 33,640,448
header + input gain, k, q, v, o, header + post gain, MLP with a 64-B separator. Stride 33,640,640
layer 0's input_layernorm
not in the Token file. It is in fusion.onnx's If branches as fp16 model.layers.0.input_layernorm.weight (fusion.onnx.data @525,336,576)
the first header's gain
tail
the head's tiles only (148,263,936 B)
header + final norm, then the same head tiles
Checks:
Every norm the 1.7 Token file carries equals bf16(the graph's fp16 initializer) exactly, max error 0, and so does 1.8's layer-0 input gain. So the graph is an independent reference for every norm.
The final norm is equal to the 1.8 one (max error 0).
Rebuilding the 1.8 file from the 1.7 bytes with this map gives the same size (686,518,336 B). The differences are confined to code bytes:
In layers 5 and 15, every attention tile, gate/up unit and down group is at least 96.4% byte-equal at its mapped position (medians 98.4-99.8%).
The one-unit-misplaced control scores 8.5%.
The remaining 1-3% is re-quantization: the head differs in 0.19% of its bytes, all of them 4-bit codes.
Next: a reader for this form (no-header geometry from the arithmetic, q-first payload, MLP without the separator, norms shifted one block, layer 0's input norm from the graph), then a forward check.
Activity
bong-water-water-bong commentedon Nov 16, 2026
The layout is now fully mapped (Llama-3.2-1B-Instruct-onnx-ryzenai-npu against its 1.8 npu_4K twin), and a rebuild confirms it:
-onnx-ryzenai-npunpu_4Kfusion.onnx'sIfbranches as fp16model.layers.0.input_layernorm.weight(fusion.onnx.data @525,336,576)Checks:
Next: a reader for this form (no-header geometry from the arithmetic, q-first payload, MLP without the separator, norms shifted one block, layer 0's input norm from the graph), then a forward check.
npu-pack: a graph whose RMSNorm nodes disagree on eps gets a WARNING,…