From 855cd0734aca26c86cc23d94aefd34f934464ac9 Mon Sep 17 00:00:00 2001 From: tv1wnd <55383215+tv1wnd@users.noreply.github.com> Date: Thu, 6 Feb 2025 22:48:51 +0100 Subject: [PATCH] llama : fix old glm4 models (#11670) --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index aae3c69b5..3d5a928a8 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -7217,7 +7217,7 @@ struct llm_build_context { struct ggml_tensor * Qcur = nullptr; struct ggml_tensor * Kcur = nullptr; struct ggml_tensor * Vcur = nullptr; - if (model.type == LLM_TYPE_1_5B || model.type == LLM_TYPE_4B || model.type == LLM_TYPE_9B) { + if (model.layers[il].wqkv == nullptr) { Qcur = llm_build_lora_mm(lctx, ctx0, model.layers[il].wq, cur); if (model.layers[il].bq) { Qcur = ggml_add(ctx0, Qcur, model.layers[il].bq);