summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKawrakow <iwankawrakow@gmail.com>2025-03-21 13:23:01 +0100
committerGitHub <noreply@github.com>2025-03-21 13:23:01 +0100
commit3d6e25c82db5510df483185b8a20f0ce01136dd7 (patch)
tree76d4512a875d82c7bd397355edbdbb3d81239fbf
parent022660f7aba973c149e011eac5c4b3dfea02618d (diff)
Fix bug: missing parentheses in logical expression (#275)
This results in GGGGGGGGGGGGG when generating with mla = 3, fa = 0. Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
-rw-r--r--src/llama.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llama.cpp b/src/llama.cpp
index dfe445b8..186cb5a5 100644
--- a/src/llama.cpp
+++ b/src/llama.cpp
@@ -13869,7 +13869,7 @@ struct llm_build_context {
ggml_tensor * q = ggml_concat(ctx0, q_nope2, ggml_permute(ctx0, q_rope, 0, 2, 1, 3), 0);
cb(q, "q", il);
- if (lctx.cparams.flash_attn && lctx.cparams.mla_attn == 1 || lctx.cparams.mla_attn == 3) {
+ if (lctx.cparams.flash_attn && (lctx.cparams.mla_attn == 1 || lctx.cparams.mla_attn == 3)) {
ggml_tensor * kv_cache_lora = ggml_view_2d(ctx0, kv_self.kv_l[il],
kv_lora_rank, n_kv,
ggml_row_size(kv_self.kv_l[il]->type, kv_lora_rank + n_embd_head_qk_rope), 0);