From a84d90a4b8303bfee7b266582a9f1e41770bbcc5 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Thu, 26 Mar 2026 06:04:51 +0100 Subject: [PATCH] Fix bug introduced in #1506 (#1515) --- src/llama.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama.cpp b/src/llama.cpp index f73a2bda..5e04b776 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -966,9 +966,9 @@ static bool llama_kv_cache_init( k->extra = (void *)&split_k_l.ggml; v->extra = (void *)&split_v_l.ggml; } + cache.k_l.push_back(k); + cache.v_l.push_back(v); } - cache.k_l.push_back(k); - cache.v_l.push_back(v); } if (is_mla_attn && cparams.mla_attn && n_mla < n_layer && n_mla > 0) { LLAMA_LOG_ERROR("%s: unexpected situation with %d out of %d layers having MLA enabled\n", __func__, n_mla, int(n_layer));