-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Fix Qwen2.5-Omni get_chunked_index chunking functionality #37631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Qwen2.5-Omni get_chunked_index chunking functionality #37631
Conversation
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the |
Thank you, I will look at this tomorrow. |
LGTM, can be merged after the test cases are passed. |
I think my change on the |
f9aeef6
to
ad926cc
Compare
The failed tests have been fixed and pass now. |
@zucchini-nlp Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
…e#37631) * fix: qwen2.5 omni modular get_rope_index * test: add test for qwen2.5 omni rope index (video with audio input) * style * expected_position_ids readability * fix: use spatial_merge_size = 1 in unit test
What does this PR do?
This PR fixes the incorrect mrope position chunking function
get_chunked_index
inmodular_qwen2_5_omni
.It takes a constant value
3
(comes fromlen(token_indices)
) in the loop condition to iterate thetoken_indices
input (instead of the correct valuetoken_indices.shape[1]
). This will make it always produce only a single chunk. (Line 1160 vs Line 1166)transformers/src/transformers/models/qwen2_5_omni/modular_qwen2_5_omni.py
Lines 1157 to 1168 in 27a25be
Another similar but correct impl lies in
processing_qwen2_5_omni
and we can take it as a reference. (Line 303 vs Line 309)transformers/src/transformers/models/qwen2_5_omni/processing_qwen2_5_omni.py
Lines 300 to 311 in 27a25be
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@BakerBunker can you take a look about this bugfix please?