Skip to content

Commit d2871f8

Browse files
author
Bodhi Hu
committed
remove MoE expert_weights_scale from llama.cpp
1 parent edc1630 commit d2871f8

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/llama-model.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ void llama_model::load_hparams(llama_model_loader & ml) {
412412
ml.get_key(LLM_KV_BLOCK_COUNT, hparams.n_layer);
413413
ml.get_key(LLM_KV_EXPERT_COUNT, hparams.n_expert, false);
414414
ml.get_key(LLM_KV_EXPERT_USED_COUNT, hparams.n_expert_used, false);
415-
ml.get_key(LLM_KV_EXPERT_WEIGHTS_SCALE, hparams.expert_weights_scale, false);
416415

417416
if (arch == LLM_ARCH_WAVTOKENIZER_DEC) {
418417
ml.get_key(LLM_KV_FEATURES_LENGTH, hparams.n_embd_features);
@@ -3702,10 +3701,6 @@ void llama_model::print_info() const {
37023701
LLAMA_LOG_INFO("%s: f_attention_scale = %f\n", __func__, hparams.f_attention_scale);
37033702
}
37043703

3705-
if (arch == LLM_ARCH_LLAMA) {
3706-
LLAMA_LOG_INFO("%s: expert_weights_scale = %.1f\n", __func__, hparams.expert_weights_scale);
3707-
}
3708-
37093704
vocab.print_info();
37103705
}
37113706

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ struct llm_build_context {
15961596
nullptr,
15971597
n_expert, n_expert_used,
15981598
LLM_FFN_SILU, true,
1599-
hparams.expert_weights_scale > 0, hparams.expert_weights_scale,
1599+
false, 0.0,
16001600
LLAMA_EXPERT_GATING_FUNC_TYPE_SOFTMAX,
16011601
cb, il);
16021602
cb(cur, "ffn_moe_out", il);

0 commit comments

Comments
 (0)