[shared] layout: check_one requires the indexer.* rows only with an indexer

Qwen3.6's attention is dense: the file and the pack have no indexer.q_proj / k_proj / q_norm / k_norm, and
qsa_layer and the verify window ask for them only under g.has_indexer() (step3-attn.md); the shape check demanded
them of every attention layer at hc = 1 (idx_q_heads 0: a 2048 x 0 tensor by name) and would have refused every
Qwen3.6 pack.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
This commit is contained in:
Robert KarlandClaude Fable 5.1 committed 2026-10-11 13:55:23 -07:00
1 parent 27cc370939
commit a2e615b79f
1 file changed
+4
+4
View File
@@ -85,6 +85,9 @@ bool check_one(const WeightTable& t, const ModelGeometry& g, int64_t layer, std:
// hc = 1 (Qwen3.6): no hyper-connections, so no `hc_*` tensors - the plain block reads `attn_norm` and
// `post_attention_norm` instead (the 1-D set below; docs/QWEN36-35B-A3B.md section 3.5)
if (g.hc == 1 && std::strncmp(w.suffix, "hc_", 3) == 0) continue;
// dense attention (Qwen3.6): no sparse indexer, so no `indexer.*` tensors in the file or the pack; `qsa_layer`
// and the verify window ask for them only with `g.has_indexer()` (step3-attn.md), and so does this check
if (!g.has_indexer() && std::strncmp(w.suffix, "indexer.", 8) == 0) continue;
const WeightRef* r = v.get(w.suffix);
if (!r) {
err = "layer " + std::to_string(layer) + ": missing " + v.name(w.suffix);
@@ -120,6 +123,7 @@ bool check_one(const WeightTable& t, const ModelGeometry& g, int64_t layer, std:
const bool plain_norm = std::strcmp(w.suffix, "attn_norm.weight") == 0 ||
std::strcmp(w.suffix, "post_attention_norm.weight") == 0;
if (g.hc == 1 ? hc_tensor : plain_norm) continue;
if (!g.has_indexer() && std::strncmp(w.suffix, "indexer.", 8) == 0) continue;
const WeightRef* r = v.get(w.suffix);
if (!r) {
err = "layer " + std::to_string(layer) + ": missing " + v.name(w.suffix);