Quellcode durchsuchen

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.
Xuan-Son Nguyen vor 8 Monaten
Ursprung
Commit
2f54e348ad
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/llama-graph.cpp

+ 1 - 1
src/llama-graph.cpp

@@ -782,7 +782,7 @@ ggml_tensor * llm_graph_context::build_ffn(
             } break;
             } break;
     }
     }
 
 
-    if (type_gate == LLM_FFN_PAR) {
+    if (gate && type_gate == LLM_FFN_PAR) {
         cur = ggml_mul(ctx0, cur, tmp);
         cur = ggml_mul(ctx0, cur, tmp);
         cb(cur, "ffn_gate_par", il);
         cb(cur, "ffn_gate_par", il);
     }
     }