Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4d0a522

Browse files
committedJan 29, 2025·
properly fix quantization
1 parent 5fda99f commit 4d0a522

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
 

‎optimum/intel/openvino/modeling_visual_language.py

+2
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,8 @@ def get_multimodal_embeddings(
17381738
vision_embeds = None
17391739
IGNORE_INDEX = -100
17401740
IMAGE_TOKEN_INDEX = -200
1741+
if pixel_values is None and "images" in kwargs:
1742+
pixel_values = kwargs["images"]
17411743
if pixel_values is not None:
17421744
vision_embeds = self.get_vision_embeddings(pixel_values, input_ids=input_ids, **kwargs)
17431745
if vision_embeds is None:

‎tests/openvino/test_exporters_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class OVCLIExportTestCase(unittest.TestCase):
197197
"image-text-to-text",
198198
"nanollava",
199199
"int4 --group-size 8 --ratio 0.8 --trust-remote-code",
200-
[{"int8": 14, "int4": 16}, {"int8": 15}, {"int8": 1}],
200+
[{"int8": 16, "int4": 14}, {"int8": 15}, {"int8": 1}],
201201
),
202202
(
203203
"image-text-to-text",

‎tests/openvino/test_quantization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ class OVWeightCompressionTest(unittest.TestCase):
466466
tokenizer=MODEL_NAMES["nanollava"],
467467
trust_remote_code=True,
468468
),
469-
[{"int8": 14, "int4": 16}, {"int8": 15}, {"int8": 1}],
469+
[{"int8": 16, "int4": 14}, {"int8": 15}, {"int8": 1}],
470470
),
471471
]
472472
)

0 commit comments

Comments
 (0)
Please sign in to comment.