Skip to content

Commit 70e47c8

Browse files
committed
Fixed test case for E2M1.
1 parent 566ebe7 commit 70e47c8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nncf/quantization/quantize_model.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,12 @@ def compress_weights(
585585
if backend == BackendType.OPENVINO:
586586
from nncf.openvino.quantization.quantize_model import compress_weights_impl as ov_compress_weights_impl
587587

588-
if any((scale_estimation, gptq, lora_correction)) and (dataset is None or mode == CompressWeightsMode.E2M1):
589-
msg = (
590-
"Scale estimation, GPTQ or Lora Correction algorithm is defined, "
591-
"but dataset is None or mode is E2M1."
592-
)
588+
if any((scale_estimation, gptq, lora_correction)) and dataset is None:
589+
msg = "Scale estimation, GPTQ or Lora Correction algorithm is defined, but dataset is None."
590+
raise nncf.ParameterNotSupportedError(msg)
591+
592+
if any((awq, scale_estimation, gptq, lora_correction)) and mode == CompressWeightsMode.E2M1:
593+
msg = "AWQ, Scale estimation, GPTQ or Lora Correction algorithm is defined, but mode is E2M1."
593594
raise nncf.ParameterNotSupportedError(msg)
594595

595596
if gptq and lora_correction:

tests/openvino/native/quantization/test_weights_compression.py

-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ def test_raise_error_with_unsupported_params_for_e2m1(algo):
691691
"algo",
692692
(
693693
"lora_correction",
694-
"awq",
695694
"scale_estimation",
696695
"gptq",
697696
),

0 commit comments

Comments
 (0)