Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to address dynamic-shape handling around KV-cache tensors for the image-text-to-text task, and adds a way to override the ONNX opset used by the Qwen2.5-VL export script.
Changes:
- Adjust dynamic shape specifications for
past_key_valuesinimage_text_to_textinputs. - Gate the
GenerationMixin.prepare_inputs_for_generationpatch by an additional transformers version upper bound and update related unit test skip logic. - Add an optional
opsetparameter to the Qwen2.5-VL export entrypoint and update the CI export unit test to pass a specific opset.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py |
Adds an upper-bound version condition for when prepare_inputs_for_generation is patched. |
onnx_diagnostic/tasks/image_text_to_text.py |
Updates dynamic-shape metadata for past_key_values (KV cache) to include a dynamic sequence/cache dimension. |
onnx_diagnostic/ci_models/export_qwen25_vl.py |
Adds an optional opset argument and uses it to select target_opset. |
_unittests/ut_torch_export_patches/test_patch_transformers.py |
Skips a subtest for transformers versions at/above the new boundary. |
_unittests/ut_ci_models/test_ci_export.py |
Passes opset=24 into the Qwen2.5-VL export main() in the unit test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_attention.py
Show resolved
Hide resolved
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_qwen3.py
Show resolved
Hide resolved
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.