Skip to content

Commit 8e6758f

Browse files
committed
convert: update comment of MOE tensors mapping
1 parent 03bdc36 commit 8e6758f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

convert-hf-to-gguf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,9 @@ def write_tensors(self):
14701470
# But llama.cpp moe graph works differently
14711471
# AND the dimensions in ggml are typically in the reverse order of the pytorch dimensions
14721472
# so (n_expert, n_ff, n_embd) in pytorch is {n_embd, n_ff, n_expert} in ggml_tensor
1473-
exp_tensor_names = {"ffn.experts.mlp.v1": None, # LLM_TENSOR_FFN_GATE_EXPS ggml_tensor->ne{n_embd, n_ff, n_expert}
1473+
exp_tensor_names = {"ffn.experts.mlp.w1": None, # LLM_TENSOR_FFN_GATE_EXPS ggml_tensor->ne{n_embd, n_ff, n_expert}
14741474
"ffn.experts.mlp.w2": (0, 2, 1), # LLM_TENSOR_FFN_DOWN_EXPS ggml_tensor->ne{n_ff, n_embd, n_expert}
1475-
"ffn.experts.mlp.w1": None} # LLM_TENSOR_FFN_UP_EXPS ggml_tensor->ne{n_embd, n_ff, n_expert}
1475+
"ffn.experts.mlp.v1": None} # LLM_TENSOR_FFN_UP_EXPS ggml_tensor->ne{n_embd, n_ff, n_expert}
14761476
experts = False
14771477
for exp_tensor_name in exp_tensor_names.keys():
14781478
if name.find(exp_tensor_name) != -1 and name.find(".weight") == -1:

0 commit comments

Comments
 (0)