File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -8349,7 +8349,7 @@ struct llm_build_phi2 : public llm_graph_context {
83498349
83508350 ggml_build_forward_expand(gf, cur);
83518351 }
8352- };
8352+ };
83538353
83548354template<bool iswa>
83558355struct llm_build_phi3 : public llm_graph_context {
@@ -15470,8 +15470,7 @@ struct llm_build_ernie4_5_moe : public llm_graph_context {
1547015470 cb(ffn_inp, "ffn_inp", il);
1547115471
1547215472 // feed-forward network
15473- bool is_moe_layer = arch == LLM_ARCH_ERNIE4_5_MOE && hparams.n_moe_layer_step > 0
15474- && static_cast<uint32_t>(il) >= hparams.n_layer_dense_lead;
15473+ bool is_moe_layer = static_cast<uint32_t>(il) >= hparams.n_layer_dense_lead && (il + 1) % hparams.n_moe_layer_step == 0;
1547515474
1547615475 if (!is_moe_layer) {
1547715476 cur = build_norm(ffn_inp,
You can’t perform that action at this time.
0 commit comments