Skip to content

Commit 4b70b7f

Browse files
add support for minicpm4v
1 parent 3fe7559 commit 4b70b7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

optimum/exporters/openvino/model_configs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,10 +2822,10 @@ def with_behavior(
28222822
behavior = MiniCPMVConfigBehavior(behavior)
28232823

28242824
if behavior == MiniCPMVConfigBehavior.TEXT_EMBEDDINGS:
2825-
return get_vlm_text_embeddings_config("qwen2", self._orig_config, self.int_dtype, self.float_dtype)
2825+
return get_vlm_text_embeddings_config("qwen2" if self._orig_config.version == 2.6 else "llama", self._orig_config, self.int_dtype, self.float_dtype)
28262826

28272827
if behavior == MiniCPMVConfigBehavior.LANGUAGE:
2828-
return get_vlm_text_generation_config("qwen2", self._orig_config, self.int_dtype, self.float_dtype)
2828+
return get_vlm_text_generation_config("qwen2" if self._orig_config.version == 2.6 else "llama", self._orig_config, self.int_dtype, self.float_dtype)
28292829

28302830
if behavior == MiniCPMVConfigBehavior.VISION_EMBEDDINGS:
28312831
return self.__class__(

0 commit comments

Comments
 (0)