Skip to content

Commit 05cba31

Browse files
authored
GLM DSA: reduce indexer cache size (#2093)
1 parent ba62eaf commit 05cba31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ static bool llama_kv_cache_init(
10301030
cache.k_l.push_back(kv);
10311031
// DSA lightning-indexer key cache (MQA, single head). Store the Hadamard-rotated
10321032
// indexer keys in F16 so a decoded token can score against ALL past keys.
1033-
if (has_dsa_indexer && model.layers[i].indexer_attn_k && !is_mtp_tail_layer) {
1033+
if (has_dsa_indexer && model.layers[i].indexer_attn_k && hparams.indexer_is_full[i] && !is_mtp_tail_layer) {
10341034
ggml_tensor * kr = ggml_new_tensor_2d(ctx, idx_type_k, hparams.indexer_head_size, kv_size);
10351035
ggml_format_name(kr, "cache_kr_l%d", i);
10361036
cache.kr_l[i] = kr;

0 commit comments

Comments
 (0)