From 05cba319e0435477223e71c8ffd0a1cecea8045e Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Tue, 7 Jul 2026 09:35:42 +0200 Subject: [PATCH] GLM DSA: reduce indexer cache size (#2093) --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index 63702d3cf..c99b86874 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -1030,7 +1030,7 @@ static bool llama_kv_cache_init( cache.k_l.push_back(kv); // DSA lightning-indexer key cache (MQA, single head). Store the Hadamard-rotated // indexer keys in F16 so a decoded token can score against ALL past keys. - if (has_dsa_indexer && model.layers[i].indexer_attn_k && !is_mtp_tail_layer) { + if (has_dsa_indexer && model.layers[i].indexer_attn_k && hparams.indexer_is_full[i] && !is_mtp_tail_layer) { ggml_tensor * kr = ggml_new_tensor_2d(ctx, idx_type_k, hparams.indexer_head_size, kv_size); ggml_format_name(kr, "cache_kr_l%d", i); cache.kr_l[i] = kr;