File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1429,6 +1429,7 @@ void llama_model::load_hparams(llama_model_loader & ml) {
14291429 ml.get_key(LLM_KV_EXPERT_USED_COUNT, hparams.n_expert_used, 0);
14301430 ml.get_key(LLM_KV_EXPERT_SHARED_COUNT, hparams.n_expert_shared, 0);
14311431 ml.get_key(LLM_KV_LEADING_DENSE_BLOCK_COUNT, hparams.n_layer_dense_lead, 0);
1432+ ml.get_key(LLM_KV_EXPERT_WEIGHTS_SCALE, hparams.expert_weights_scale);
14321433
14331434 // Expert gating function (GLM4_MOE uses sigmoid)
14341435 ml.get_key(LLM_KV_EXPERT_GATING_FUNC, hparams.expert_gating_func, false);
@@ -13587,7 +13588,7 @@ struct llm_build_glm4_moe : public llm_graph_context {
1358713588 model.layers[il].ffn_exp_probs_b,
1358813589 n_expert, n_expert_used,
1358913590 LLM_FFN_SILU, true,
13590- false, 0.0 ,
13591+ true, hparams.expert_weights_scale ,
1359113592 (llama_expert_gating_func_type) hparams.expert_gating_func,
1359213593 il);
1359313594 cb(moe_out, "ffn_moe_out", il);
You can’t perform that action at this time.
0 commit comments