Skip to content

Commit 394283e

Browse files
committed
add deepseek_v3 awq mapping
1 parent 2c41df7 commit 394283e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/llmcompressor/modifiers/awq/mappings.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ class AWQMapping:
116116
),
117117
]
118118

119+
# DeepseekV3
120+
_deepseek_mappings = [
121+
AWQMapping(
122+
"re:.*input_layernorm$",
123+
["re:.*q_a_proj$", "re:.*kv_a_proj_with_mqa$"],
124+
),
125+
AWQMapping("re:.*q_a_layernorm$", ["re:.*q_b_proj$"]),
126+
AWQMapping("re:.*kv_a_layernorm$", ["re:.*kv_b_proj$"]),
127+
AWQMapping(
128+
"re:.*post_attention_layernorm$",
129+
["re:.*gate_proj$", "re:.*up_proj$"],
130+
),
131+
AWQMapping("re:.*up_proj$", ["re:.*down_proj$"]),
132+
]
133+
119134
AWQ_MAPPING_REGISTRY: Dict[str, list[AWQMapping]] = {
120135
"CohereForCausalLM": _cohere_mappings,
121136
"Cohere2ForCausalLM": _cohere_mappings,
@@ -131,6 +146,7 @@ class AWQMapping:
131146
"Qwen2MoeForCausalLM": _moe_default_mappings,
132147
"Qwen3ForCausalLM": _default_mappings,
133148
"Qwen3MoeForCausalLM": _moe_default_mappings,
149+
"DeepseekV3ForCausalLM": _deepseek_mappings,
134150
}
135151

136152

0 commit comments

Comments
 (0)