Commit ed6dcaf
committed
glm-dsa : fix missing indexer tensors on sparse-indexer blocks
GLM-5.2 only has DSA lightning indexer tensors on a subset of blocks:
the 3 dense-lead blocks (0-2) and every 4th MoE block (6, 10, 14, ..., 78).
The remaining MoE blocks have no indexer tensors at all.
glm-dsa.cpp required them on every block, so loading failed with:
"missing tensor 'blk.3.indexer.k_norm.weight'"
Two changes:
- glm-dsa.cpp: mark all 5 indexer tensor creates as TENSOR_NOT_REQUIRED
- deepseek32.cpp: guard the lightning indexer block with a null check on
indexer_attn_q_b; when absent, top_k stays nullptr and build_attn_mla
falls back to full attention for that layer
Regressed in ggml-org#23346 (2026-05-29) which wired the DSA lightning indexer
into the shared deepseek2 graph used by GLM_DSA. Before that PR the
indexer tensors were loaded but never accessed in the graph.
Assisted-by: Claude Sonnet1 parent 22ea8d8 commit ed6dcaf
2 files changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
0 commit comments