Refactor mm_utils to make it more general-purpose.#13130
Refactor mm_utils to make it more general-purpose.#13130yhyang201 wants to merge 6 commits intosgl-project:mainfrom
Conversation
Summary of ChangesHello @yhyang201, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the multimodal utility functions to enhance their generality and prepare the system for advanced performance optimizations. It achieves this by extracting model-specific Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors mm_utils.py to make it more general-purpose by moving model-specific logic, like the deepstack implementation for Qwen3-VL, into the model's own file. This is a good architectural improvement. I've found a bug in the newly introduced post_process method in qwen3_vl.py and have suggested a fix that also improves the code's clarity and efficiency.
5a3124f to
ed951ae
Compare
|
Thanks @yhyang201. This is the right direction towards piecewise CUDA graph vlm supporting. I'm working on refactor to move inputs_embedding outside model. Will have you updated ASAP. |
b615e5e to
ed951ae
Compare
ed951ae to
c7154f1
Compare
Motivation
Removed the deepstack logic from mm_utils and refactored qwen3vl.
Preparing for multimodal piecewise CUDA graph.
acc test:
main:

this pr:

speed test
main:
this pr:
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist