Skip to content

Commit

Permalink
llama : fix hard-coded number of experts
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Dec 11, 2023
1 parent b002981 commit 8cbaed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3079,7 +3079,7 @@ static void llm_load_tensors(
GGML_ASSERT(hparams.n_expert_used > 0);

// MoE branch
for (int x = 0; x < 8; ++x) {
for (uint32_t x = 0; x < hparams.n_expert; ++x) {
layer.ffn_gate_exp[x] = ml.create_tensor(ctx, tn(LLM_TENSOR_FFN_GATE_EXP, "weight", i, x), {n_embd, n_ff}, backend_split);
layer.ffn_down_exp[x] = ml.create_tensor(ctx, tn(LLM_TENSOR_FFN_DOWN_EXP, "weight", i, x), { n_ff, n_embd}, backend_split);
layer.ffn_up_exp[x] = ml.create_tensor(ctx, tn(LLM_TENSOR_FFN_UP_EXP, "weight", i, x), {n_embd, n_ff}, backend_split);
Expand Down

0 comments on commit 8cbaed1

Please sign in to comment.