Skip to content

Commit 01c8262

Browse files
committed
allow-group-dynamic-quantization
Signed-off-by: Kyle Sayers <[email protected]>
1 parent 141cbba commit 01c8262

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/compressed_tensors/quantization/quant_scheme.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,18 @@ 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 != True
72+
):
73+
raise NotImplementedError(
74+
"Static and local group-wise quantization is not supported"
75+
)
76+
77+
raise NotImplementedError(
6978
f"Using {inputs.strategy} strategy is not supported for "
7079
"activation quantization"
7180
)

0 commit comments

Comments
 (0)