From 71b61fbcedcd1014a960411949df19d635c67e53 Mon Sep 17 00:00:00 2001 From: Nikita Malinin Date: Mon, 27 Jan 2025 15:26:05 +0100 Subject: [PATCH 1/3] Fix default num samples --- optimum/intel/openvino/quantization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/intel/openvino/quantization.py b/optimum/intel/openvino/quantization.py index f61c2b93ca..6bdd3563cb 100644 --- a/optimum/intel/openvino/quantization.py +++ b/optimum/intel/openvino/quantization.py @@ -1083,7 +1083,7 @@ def _full_quantization( quantized_model = nncf.quantize( model, calibration_dataset, - subset_size=quantization_config.num_samples, + subset_size=quantization_config.num_samples if quantization_config.num_samples else 128, ignored_scope=quantization_config.get_ignored_scope_instance(), model_type=nncf.ModelType(quantization_config.model_type), preset=nncf.QuantizationPreset.PERFORMANCE if quantization_config.sym else nncf.QuantizationPreset.MIXED, From fa2143316e37ee880ea56b93a406e3bc87055895 Mon Sep 17 00:00:00 2001 From: Nikita Malinin Date: Mon, 27 Jan 2025 15:48:23 +0100 Subject: [PATCH 2/3] Added test with null samples --- tests/openvino/test_exporters_cli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/openvino/test_exporters_cli.py b/tests/openvino/test_exporters_cli.py index 7c64d84d3d..b38dc4cc2b 100644 --- a/tests/openvino/test_exporters_cli.py +++ b/tests/openvino/test_exporters_cli.py @@ -131,6 +131,14 @@ class OVCLIExportTestCase(unittest.TestCase): (13,), (16,), ), + ( + "text-generation", + "llama", + "int8", + "--dataset wikitext2 --trust-remote-code", + (13,), + (16,), + ), ] TEST_4BIT_CONFIGURATIONS = [ From 7c4604ab9265d60bfb0fcc7e5d4f6a738978869a Mon Sep 17 00:00:00 2001 From: Nikita Malinin Date: Mon, 27 Jan 2025 17:07:02 +0100 Subject: [PATCH 3/3] Update test_exporters_cli.py --- tests/openvino/test_exporters_cli.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/openvino/test_exporters_cli.py b/tests/openvino/test_exporters_cli.py index b38dc4cc2b..6d1bf5eb5e 100644 --- a/tests/openvino/test_exporters_cli.py +++ b/tests/openvino/test_exporters_cli.py @@ -127,15 +127,7 @@ class OVCLIExportTestCase(unittest.TestCase): "text-generation", "llama", "f8e4m3", - "--dataset wikitext2 --num-samples 1 --smooth-quant-alpha 0.9 --trust-remote-code", - (13,), - (16,), - ), - ( - "text-generation", - "llama", - "int8", - "--dataset wikitext2 --trust-remote-code", + "--dataset wikitext2 --smooth-quant-alpha 0.9 --trust-remote-code", (13,), (16,), ),