Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKoff88 committed Feb 7, 2024
1 parent 4707914 commit ae1da0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/openvino/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,15 @@ def test_ovmodel_4bit_weight_compression(self, model_cls, model_name, expected_i
tokenizer.pad_token = tokenizer.eos_token

quantizer = OVQuantizer.from_pretrained(transformers_model, task=task)
ov_config = OVConfig(
weight_quantization_config=OVWeightQuantizationConfig(
mode=nncf.CompressWeightsMode.INT4_SYM, ratio=0.8
)
)
quantizer.quantize(
save_directory=tmp_dir,
weights_only=True,
quantization_config=OVWeightQuantizationConfig(mode=nncf.CompressWeightsMode.INT4_SYM, ratio=0.8),
ov_config=ov_config,
)
model = model_cls.from_pretrained(tmp_dir)

Expand Down

0 comments on commit ae1da0f

Please sign in to comment.