[OpenVINO] Support jina-vlm with task image-text-to-text - #1909
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
@popovaan can you please review this PR |
|
@Mohamed-Ashraf273 Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @ma0358412, I received this review request. A read-only response will be prepared first; source changes, if needed and permitted, will enter the sequential work queue. |
|
❌ Review request Retry with |
|
@Mohamed-Ashraf273 Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @ma0358412, I received this review request. A read-only response will be prepared first; source changes, if needed and permitted, will enter the sequential work queue. |
|
❌ Review request Retry with |
|
@Mohamed-Ashraf273 Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @ma0358412, review request received. |
|
❌ Review request Retry with |
|
@popovaan Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @Mohamed-Ashraf273, review request received. |
|
👀 @popovaan, review request received. |
Validation summaryBased on the PR description and diff, the validation for jina-vlm ( Functional / export validation
Accuracy validation (WWB — who-what-benchmark similarity)
Automated tests (added/registered for
Notes / caveats (not blocking, just observations)
No files were modified and no tests were run (read-only triage). |
|
👀 @Mohamed-Ashraf273, review request received. |
|
❌ Review request Retry with |
Validation summary for PR #1909 (jina-vlm,
|
|
@popovaan Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @Mohamed-Ashraf273, review request received. |
Validation summary — PR #1909 (jina-vlm,
|
|
@popovaan Please summarize the validation performed in this PR. Do not modify any files. |
|
👀 @Mohamed-Ashraf273, review request received. |
Validation summary — PR #1909 (jina-vlm,
|
|
|
||
|
|
||
| def jina_vlm_vision_embed_forward(self, image_patches, image_masks=None): | ||
| # Runs the JinaVLM vision tower + vision-language connector and returns the flattened image |
There was a problem hiding this comment.
@popovaan add a comment with the link to the original pytorch code of this method.
|
👀 @Mohamed-Ashraf273, review request received. |
|
🛠️ This request needs source changes and has been added to the sequential modification queue. |
|
Addressed the review comment at
The links are pinned to the commit Pushed commit Tests:
|
|
|
||
|
|
||
| def jina_vlm_language_model_forward( | ||
| self, |
There was a problem hiding this comment.
@popovaan add a comment with the link to the original pytorch code of this method.
There was a problem hiding this comment.
👀 @Mohamed-Ashraf273, review request received.
There was a problem hiding this comment.
This request needs source changes and has been added to the sequential modification queue.
There was a problem hiding this comment.
Addressed the review comment on jina_vlm_language_model_forward (optimum/exporters/openvino/model_patcher.py:3140). Added a link to the original PyTorch remote code that this method mirrors:
JinaVLMForConditionalGeneration.forward: https://huggingface.co/jinaai/jina-vlm/blob/ddfa80b180f87f59873fd1cea352dec51183ab88/modeling_jvlm.py#L749
The link is pinned to commit ddfa80b1 of jinaai/jina-vlm for stability, matching the existing links already present on jina_vlm_vision_embed_forward (_encode_images L525, JinaVLMVisionModel.forward L223). The line number (L749) was verified by downloading modeling_jvlm.py at that pinned commit, not guessed. This is a comment-only change.
Validation:
python -m py_compile optimum/exporters/openvino/model_patcher.py: passed
Pushed commit b151e705813f.
Tests:
- python -m py_compile optimum/exporters/openvino/model_patcher.py: passed
Description
Added native OpenVINO export + inference support for model_type 'jvlm' (JinaVLMForConditionalGeneration) in optimum-intel. Registered a VLM export config with custom vision-embeddings, language, and text-embeddings behaviors plus OV-traceable patchers/dummy generators; added the _OVJinaVLMForCausalLM runtime class with index-based image-feature merge. optimum-cli export produces 5 IR submodels and OpenVINO greedy generation exactly matches HF token IDs on a real image+text prompt. Added a cached _create_tiny_jvlm_model() fixture and registered jvlm across test_export/test_seq2seq/test_exporters_cli/utils_tests; all targeted tests pass. Docs updated.
Conversion
optimum-cli export openvino --model jinaai/jina-vlm output_dir --task image-text-to-text --trust-remote-codeReproduce generation
Validation
/home/openvino_bot/.local/share/openvino-model-agent/requests/issue-40/repository/workspace/tiny_jina_vlm)Final real-model validation
jinaai/jina-vlm)Related model-support PRs
Before submitting