Skip to content

Commit 61fdf4c

Browse files
Fix phimoe quantization error with LazyTurtle (#2754)
Signed-off-by: ZX-ModelCloud <zx@modelcloud.ai>
1 parent 37c14f6 commit 61fdf4c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • gptqmodel/models/definitions

gptqmodel/models/definitions/phi3.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ class PhiMoEGPTQForCausalLM(BaseQModel):
2929
"input_layernorm": ("input_layernorm:!",),
3030
"self_attn": ("q_proj:0", "k_proj:0", "v_proj:0", "o_proj:1"),
3131
"post_attention_layernorm": ("post_attention_layernorm:!",),
32-
"mlp:moe:?": {
32+
"mlp|block_sparse_moe:moe:?": {
33+
"router": ("router:!",), # PhimoeTopKRouter.forward() returns two values, skipping its quantization.
3334
"experts": {
34-
"#": ("gate_proj:0", "up_proj:0", "down_proj:1"),
35+
"#": ("gate_proj|w1:0", "up_proj|w3:0", "down_proj|w2:1"),
3536
},
3637
},
3738
}

0 commit comments

Comments
 (0)