Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix quantization config #694

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions optimum/intel/openvino/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class OVWeightQuantizationConfig(OVQuantizationConfigBase):
using the [`~PreTrainedTokenizer.save_pretrained`] method, e.g., `./my_model_directory/`.
dataset (`str or List[str]`, *optional*):
The dataset used for data-aware compression or quantization with NNCF. You can provide your own dataset
in a list of strings or just use the one from the list ['wikitext','c4','c4-new','ptb','ptb-new'] for LLLMs
in a list of strings or just use the one from the list ['wikitext2','c4','c4-new','ptb','ptb-new'] for LLLMs
or ['conceptual_captions','laion/220k-GPT4Vision-captions-from-LIVIS','laion/filtered-wit'] for diffusion models.
Alternatively, you can provide data objects via `calibration_dataset` argument
of `OVQuantizer.quantize()` method.
Expand Down Expand Up @@ -194,7 +194,7 @@ def post_init(self):
f"If you wish to provide a custom dataset, please use the `OVQuantizer` instead."
)
if self.dataset is not None and isinstance(self.dataset, str):
llm_datasets = ["wikitext", "c4", "c4-new", "ptb", "ptb-new"]
llm_datasets = ["wikitext2", "c4", "c4-new", "ptb", "ptb-new"]
stable_diffusion_datasets = [
"conceptual_captions",
"laion/220k-GPT4Vision-captions-from-LIVIS",
Expand Down
8 changes: 4 additions & 4 deletions tests/openvino/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ class OVQuantizationConfigTest(unittest.TestCase):
(OVWeightQuantizationConfig(bits=8, sym=True),),
(
OVWeightQuantizationConfig(
dataset="wikitext",
dataset="wikitext2",
bits=4,
ignored_scope={"names": ["op_name"]},
sym=False,
Expand Down Expand Up @@ -747,7 +747,7 @@ class OVQuantizationConfigTest(unittest.TestCase):
(dict(bits=8, sym=True), OVWeightQuantizationConfig, None),
(
dict(
dataset="wikitext",
dataset="wikitext2",
bits=4,
ignored_scope={"names": ["op_name"]},
sym=False,
Expand All @@ -771,7 +771,7 @@ class OVQuantizationConfigTest(unittest.TestCase):
(dict(num_samples=100), OVWeightQuantizationConfig, "Can't determine type of OV quantization config"),
(dict(abc="def"), OVWeightQuantizationConfig, "Can't determine type of OV quantization config"),
(
dict(bits=8, fast_bias_correction=True, dataset="wikitext"),
dict(bits=8, fast_bias_correction=True, dataset="wikitext2"),
OVWeightQuantizationConfig,
"Can't determine type of OV quantization config",
),
Expand All @@ -793,7 +793,7 @@ class OVQuantizationConfigTest(unittest.TestCase):
(dict(abc="def", weight_only=False), OVQuantizationConfig, None),
(dict(abc="def", weight_only=True), OVWeightQuantizationConfig, None),
(
dict(bits=8, fast_bias_correction=True, dataset="wikitext", weight_only=True),
dict(bits=8, fast_bias_correction=True, dataset="wikitext2", weight_only=True),
OVWeightQuantizationConfig,
None,
),
Expand Down
Loading