Skip to content

Commit 5718b29

Browse files
authored
[Quantization] Allow dynamic group activation quantization (#450)
* allow-group-dynamic-quantization Signed-off-by: Kyle Sayers <[email protected]> * satisfy quality checker Signed-off-by: Kyle Sayers <[email protected]> * more clear Signed-off-by: Kyle Sayers <[email protected]> --------- Signed-off-by: Kyle Sayers <[email protected]>
1 parent b8ddb63 commit 5718b29

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/compressed_tensors/quantization/quant_scheme.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,19 @@ def validate_model_after(model: "QuantizationScheme") -> "QuantizationScheme":
6363
if inputs.strategy not in (
6464
QuantizationStrategy.TOKEN,
6565
QuantizationStrategy.TENSOR,
66+
QuantizationStrategy.GROUP,
6667
QuantizationStrategy.TENSOR_GROUP,
6768
):
68-
raise ValueError(
69+
if (
70+
inputs.strategy == QuantizationStrategy.GROUP
71+
and inputs.dynamic is True
72+
):
73+
raise NotImplementedError(
74+
"Static and local group-wise activation "
75+
"quantization is not supported"
76+
)
77+
78+
raise NotImplementedError(
6979
f"Using {inputs.strategy} strategy is not supported for "
7080
"activation quantization"
7181
)

0 commit comments

Comments
 (0)