Skip to content

Commit dbe9f10

Browse files
committed
add glm4_moe tensor mapping
1 parent 2c6e198 commit dbe9f10

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/llama-arch.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,31 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
13911391
{ LLM_TENSOR_FFN_POST_NORM, "blk.%d.post_ffw_norm" },
13921392
},
13931393
},
1394+
{
1395+
LLM_ARCH_GLM4_MOE,
1396+
{
1397+
{ LLM_TENSOR_TOKEN_EMBD, "token_embd" },
1398+
{ LLM_TENSOR_ATTN_NORM, "blk.%d.attn_norm" },
1399+
{ LLM_TENSOR_ATTN_Q, "blk.%d.attn_q" },
1400+
{ LLM_TENSOR_ATTN_K, "blk.%d.attn_k" },
1401+
{ LLM_TENSOR_ATTN_V, "blk.%d.attn_v" },
1402+
{ LLM_TENSOR_ATTN_OUT, "blk.%d.attn_output" },
1403+
{ LLM_TENSOR_FFN_NORM, "blk.%d.ffn_norm" },
1404+
{ LLM_TENSOR_FFN_GATE, "blk.%d.ffn_gate" },
1405+
{ LLM_TENSOR_FFN_DOWN, "blk.%d.ffn_down" },
1406+
{ LLM_TENSOR_FFN_UP, "blk.%d.ffn_up" },
1407+
{ LLM_TENSOR_FFN_EXP_PROBS_B, "blk.%d.exp_probs_b" },
1408+
{ LLM_TENSOR_FFN_GATE_INP, "blk.%d.ffn_gate_inp" },
1409+
{ LLM_TENSOR_FFN_GATE_EXPS, "blk.%d.ffn_gate_exps" },
1410+
{ LLM_TENSOR_FFN_GATE_SHEXP, "blk.%d.ffn_gate_shexp" },
1411+
{ LLM_TENSOR_FFN_UP_EXPS, "blk.%d.ffn_up_exps" },
1412+
{ LLM_TENSOR_FFN_UP_SHEXP, "blk.%d.ffn_up_shexp" },
1413+
{ LLM_TENSOR_FFN_DOWN_EXPS, "blk.%d.ffn_down_exps" },
1414+
{ LLM_TENSOR_FFN_DOWN_SHEXP, "blk.%d.ffn_down_shexp" },
1415+
{ LLM_TENSOR_OUTPUT_NORM, "output_norm" },
1416+
{ LLM_TENSOR_OUTPUT, "output" },
1417+
},
1418+
},
13941419
{
13951420
LLM_ARCH_BITNET,
13961421
{

0 commit comments

Comments
 (0)