From: Xuan-Son Nguyen Date: Tue, 6 May 2025 12:25:40 +0000 (+0200) Subject: llama : fix build_ffn without gate (#13336) X-Git-Tag: upstream/0.0.5318~26 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2f54e348ad2999c4e31b8777592247622b20420f;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : fix build_ffn without gate (#13336) * llama : fix build_ffn without gate * fix build on windows * Revert "fix build on windows" This reverts commit fc420d3c7eef3481d3d2f313fef2757cb33a7c56. --- diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp index 0da4e7d2..0b004a8b 100644 --- a/src/llama-graph.cpp +++ b/src/llama-graph.cpp @@ -782,7 +782,7 @@ ggml_tensor * llm_graph_context::build_ffn( } break; } - if (type_gate == LLM_FFN_PAR) { + if (gate && type_gate == LLM_FFN_PAR) { cur = ggml_mul(ctx0, cur, tmp); cb(cur, "ffn_gate_par", il); }