diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp index 0da4e7d2b0547..0b004a8ba6622 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); }