Skip to content

Commit

Permalink
Fix default num samples (#1129)
Browse files Browse the repository at this point in the history
* Fix default num samples

* Added test with null samples

* Update test_exporters_cli.py
  • Loading branch information
KodiaqQ authored Jan 27, 2025
1 parent 5b990b4 commit 3ef8ae2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion optimum/intel/openvino/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,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,
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/test_exporters_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class OVCLIExportTestCase(unittest.TestCase):
"text-generation",
"llama",
"f8e4m3",
"--dataset wikitext2 --num-samples 1 --smooth-quant-alpha 0.9 --trust-remote-code",
"--dataset wikitext2 --smooth-quant-alpha 0.9 --trust-remote-code",
(13,),
(16,),
),
Expand Down

0 comments on commit 3ef8ae2

Please sign in to comment.