Skip to content

Commit

Permalink
Compress VLM model components to int8_sym instead of int8_asym (#1002)
Browse files Browse the repository at this point in the history
* Compress VLM model components to int8_sym instead of int8_asym

* Tweak references

* Update reference values
  • Loading branch information
nikita-savelyevv authored Nov 18, 2024
1 parent 7636733 commit c7d6227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion optimum/intel/openvino/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def _quantize_ovbasemodel(
sub_model_names = ["vision_embeddings", "text_embeddings"] + self.model.additional_parts
sub_models = [getattr(self.model, f"{name}_model") for name in sub_model_names]
for sub_model in sub_models:
_weight_only_quantization(sub_model, OVWeightQuantizationConfig(bits=8, sym=False))
_weight_only_quantization(sub_model, OVWeightQuantizationConfig(bits=8, sym=True))
self.model.clear_requests()
else:
_weight_only_quantization(self.model.model, quantization_config, calibration_dataset)
Expand Down
8 changes: 4 additions & 4 deletions tests/openvino/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@
"open-clip": (20, 28),
"stable-diffusion-3": (66, 42, 58, 30),
"flux": (56, 24, 28, 64),
"llava": (30, 18, 2),
"llava_next": (30, 18, 2),
"minicpmv": (30, 52, 2, 12),
"nanollava": (30, 30, 2),
"llava": (30, 9, 1),
"llava_next": (30, 9, 1),
"minicpmv": (30, 26, 1, 6),
"nanollava": (30, 15, 1),
}

TEST_IMAGE_URL = "http://images.cocodataset.org/val2017/000000039769.jpg"
Expand Down

0 comments on commit c7d6227

Please sign in to comment.