Skip to content

Commit dddc2f8

Browse files
bloom mappings (#1685)
SUMMARY: bloom mappings #1442 --------- Co-authored-by: Brian Dellabetta <[email protected]>
1 parent 329252c commit dddc2f8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/llmcompressor/modifiers/awq/mappings.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,28 @@ class AWQMapping:
132132
AWQMapping("re:.*up_proj$", ["re:.*down_proj$"]),
133133
]
134134

135+
_bloom_mappings = [
136+
AWQMapping(
137+
"re:.*input_layernorm$",
138+
["re:.*query_key_value$"]
139+
),
140+
AWQMapping(
141+
"re:.*post_attention_layernorm$",
142+
["re:.*dense_h_to_4h$"]
143+
),
144+
AWQMapping(
145+
"re:.*gelu_impl$",
146+
["re:.*dense_4h_to_h$"]
147+
),
148+
# Note: AutoAWQ excludes this mapping, based on researcher's post in
149+
# https://github.com/mit-han-lab/llm-awq/issues/2#issuecomment-1606297469
150+
# AWQMapping(
151+
# "re:.*query_key_value$",
152+
# ["re:.*dense$"]
153+
# ),
154+
]
135155
AWQ_MAPPING_REGISTRY: Dict[str, list[AWQMapping]] = {
156+
"BloomForCausalLM": _bloom_mappings,
136157
"CohereForCausalLM": _cohere_mappings,
137158
"Cohere2ForCausalLM": _cohere_mappings,
138159
"DeepseekV3ForCausalLM": _deepseek_mappings,

0 commit comments

Comments
 (0)