Archived
The layer-count cap made the walk safe; the arithmetic was still open. The rebuild multiplies container-supplied widths in int64 -- heads * (nope + rope) rows for the q_b split, heads * 256 * latent for the fused kv -- and hands the products to sized allocations and a comparison. A wrapped q_b product that coincidentally equalled the tensor's rows would run the split at a wrong per-head boundary (the bytes stayed the file's own, but the weights went to the wrong names); on the 32-bit tier, an overflowed element count truncates through size_t to a small allocation the copy then overruns. The family gate now caps what these products are built from -- heads and the MLA rank at 4096, rope at 256 dimensions, the full query width at 65536, the layer group within the stack; the shipped geometry is 128/64/512 with tens of heads -- and the q_b row product is computed with overflow checks instead of trusted. checkpoint_test pins the wide heads and rank against the honest small stack. Found by the 2.1.0 review pass (axis: hostile model files); widened past the reported site to the fused-kv product the same axes cleared only as file-bounded.