Skip to content

Commit 5776c86

Browse files
multi-apply test cleanup
Signed-off-by: Brian Dellabetta <[email protected]>
1 parent d2903a1 commit 5776c86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_quantization/lifecycle/test_apply.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,12 @@ def test_multi_apply_quantization_config():
279279
"""
280280
model = get_tinyllama_model()
281281

282-
# FP8 applied to mlp and self_attn.o_proj to validate overwriting
282+
# FP8 applied to self_attn
283283
qconfig1 = QuantizationConfig(
284284
config_groups={
285285
"group_0": QuantizationScheme(
286286
targets=[
287-
r"re:.*model\.layers\.\d+\.mlp\.(down|gate|up)_proj$",
288-
r"re:.*model\.layers\.\d+\.self_attn\.o_proj$",
287+
r"re:.*self_attn\.(k|q|o|v)_proj$",
289288
],
290289
weights=QuantizationArgs(
291290
num_bits=8,
@@ -305,12 +304,13 @@ def test_multi_apply_quantization_config():
305304
},
306305
ignore=["lm_head"],
307306
)
308-
# W4A16_ASYM applied to self_attn
307+
# W4A16_ASYM applied to mlp and self_attn.o_proj to validate overwriting
309308
qconfig2 = QuantizationConfig(
310309
config_groups={
311310
"group_0": QuantizationScheme(
312311
targets=[
313-
r"re:.*model\.layers\.\d+\.self_attn\.(k|q|o|v)_proj$",
312+
r"re:.*mlp\.(down|gate|up)_proj$",
313+
r"re:.*self_attn\.o_proj$",
314314
],
315315
weights=QuantizationArgs(
316316
num_bits=4,

0 commit comments

Comments
 (0)