-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
[Model] Use merge_by_field_config for MM models (D-F)
#26076
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
[Model] Use merge_by_field_config for MM models (D-F)
#26076
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
6fbc76e to
cf7c22d
Compare
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.
Code Review
This pull request refactors several multimodal models to use the new merge_by_field_config feature. This simplifies the input processing logic by removing manual tensor flattening code, such as flatten_bn and other custom reshaping functions. The changes are applied consistently across multiple models including Aria, Aya-Vision, Blip2, Chameleon, Cohere2-Vision, Deepseek-VL2, and Dots-OCR. The refactoring improves code clarity and maintainability by centralizing the input batching logic. The changes appear correct and well-executed.
DarkLight1337
left a comment
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.
/gemini review
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
merge_by_field_config for MM models (D)merge_by_field_config for MM models (D-F)
|
Updated Ernie4.5-VL and Fuyu as well |
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: yewentao256 <zhyanwentao@126.com>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
…#26076) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Purpose
Part of #26149
Test Plan
Model and tensor schema tests should pass. I have also run the example script on all four models.
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.