Skip to content

Commit 8cbaed1

Browse files
committed
llama : fix hard-coded number of experts
1 parent b002981 commit 8cbaed1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: llama.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3079,7 +3079,7 @@ static void llm_load_tensors(
30793079
GGML_ASSERT(hparams.n_expert_used > 0);
30803080

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

0 commit comments

Comments
 (0)