Skip to content

Commit 1a8c5cc

Browse files
Yatimaibrian-dellabettaHDCharles
authored andcommitted
Add AWQ mapping for GlmMoeDsaForCausalLM (GLM-5) (vllm-project#2418)
Closes vllm-project#2412 (part of vllm-project#1442) GLM-5 (`GlmMoeDsaForCausalLM`) uses Multi-head Latent Attention identical to DeepSeek V3 — same projection layer names (`q_a_proj`, `kv_a_proj_with_mqa`, etc.) and same MoE structure. Reuses `_deepseek_mappings`. Also moves `Glm4MoeForCausalLM` to its correct alphabetical position in the registry. SUMMARY: Add GLM-5 (GlmMoeDsaForCausalLM) to AWQ_MAPPING_REGISTRY using _deepseek_mappings. GLM-5's MLA layer names are identical to DeepSeek V3. Also fixes alphabetical ordering of Glm4MoeForCausalLM. TEST PLAN: Registry-only change (no logic modified). Verified that GLM-5 layer names (q_a_proj, kv_a_proj_with_mqa, kv_a_layernorm, kv_b_proj, o_proj) match the patterns in _deepseek_mappings by inspecting the GlmMoeDsaForCausalLM source in transformers. Signed-off-by: gillesturpin <turpingilles@orange.fr> Co-authored-by: Brian Dellabetta <brian-dellabetta@users.noreply.github.com> Co-authored-by: HDCharles <39544797+HDCharles@users.noreply.github.com> Signed-off-by: yiliu30 <yi4.liu@intel.com>
1 parent bbb634a commit 1a8c5cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/llmcompressor/modifiers/awq/mappings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ class AWQMapping:
251251
"Gemma2ForCausalLM": _gemma_mappings,
252252
"Gemma3ForCausalLM": _gemma_mappings,
253253
"Gemma3ForConditionalGeneration": _gemma_mappings,
254+
"Glm4MoeForCausalLM": _default_mappings,
255+
"GlmMoeDsaForCausalLM": _deepseek_mappings,
254256
"LlamaForCausalLM": _default_mappings,
255257
"Llama4ForConditionalGeneration": _default_mappings,
256258
"Mistral3ForConditionalGeneration": _default_mappings,
@@ -264,7 +266,6 @@ class AWQMapping:
264266
"Qwen3ForCausalLM": _default_mappings,
265267
"Qwen3MoeForCausalLM": _moe_default_mappings,
266268
"Qwen3NextForCausalLM": _qwen3_next_moe_mappings,
267-
"Glm4MoeForCausalLM": _default_mappings,
268269
"SeedOssForCausalLM": _default_mappings,
269270
"Ernie4_5_MoeForCausalLM": _default_mappings,
270271
}

0 commit comments

Comments
 (0)