Skip to content

Commit d54b4eb

Browse files
committed
Reuse LLM_FFN_SWIGLU_OAI_MOE
1 parent 25199fa commit d54b4eb

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/llama-graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ ggml_tensor * llm_graph_context::build_ffn(
14081408
cur = ggml_swiglu(ctx0, cur);
14091409
cb(cur, "ffn_swiglu", il);
14101410
} break;
1411-
case LLM_FFN_SWIGLU_OAI:
1411+
case LLM_FFN_SWIGLU_OAI_MOE:
14121412
if (gate && type_gate == LLM_FFN_PAR) {
14131413
//Same constants as LLM_FFN_SWIGLU_OAI_MOE
14141414
const float alpha = 1.702f;

src/llama-graph.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ enum llm_ffn_op_type : int {
4545
LLM_FFN_SWIGLU,
4646
LLM_FFN_GEGLU,
4747
LLM_FFN_REGLU,
48-
LLM_FFN_SWIGLU_OAI,
4948
LLM_FFN_SWIGLU_OAI_MOE,
5049
};
5150

src/models/minimax-m3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ llama_model_minimax_m3::graph::graph(const llama_model & model, const llm_graph_
570570
model.layers[il].ffn_gate, NULL, NULL,
571571
model.layers[il].ffn_down, NULL, NULL,
572572
NULL,
573-
LLM_FFN_SWIGLU_OAI, LLM_FFN_PAR, il);
573+
LLM_FFN_SWIGLU_OAI_MOE, LLM_FFN_PAR, il);
574574
cb(cur, "ffn_out", il);
575575
} else {
576576
// routed experts (swigluoai MoE)
@@ -593,7 +593,7 @@ llama_model_minimax_m3::graph::graph(const llama_model & model, const llm_graph_
593593
model.layers[il].ffn_gate_shexp, NULL, NULL,
594594
model.layers[il].ffn_down_shexp, NULL, NULL,
595595
NULL,
596-
LLM_FFN_SWIGLU_OAI, LLM_FFN_PAR, il);
596+
LLM_FFN_SWIGLU_OAI_MOE, LLM_FFN_PAR, il);
597597
cb(ffn_shexp, "ffn_shexp", il);
598598

599599
cur = ggml_add(ctx0, moe_out, ffn_shexp);

0 commit comments

Comments
 (0)