From a2e615b79f207a2ac125436ee8db6f9d8e016e30 Mon Sep 17 00:00:00 2001 From: Robert Karl Date: Sun, 11 Oct 2026 13:45:56 -0700 Subject: [PATCH] [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 Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr --- src/core/layout.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/layout.cpp b/src/core/layout.cpp index b45cfd6..02fd93f 100644 --- a/src/core/layout.cpp +++ b/src/core/layout.cpp @@ -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);