-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
[VLM] Avoid unnecessary dummy multimodal data during processing #16416
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
[VLM] Avoid unnecessary dummy multimodal data during processing #16416
Conversation
…ocessing Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Isotr0py
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.
Nice, LGTM!
…-project#16416) Signed-off-by: DarkLight1337 <[email protected]>
…-project#16416) Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Yang Wang <[email protected]>
…-project#16416) Signed-off-by: DarkLight1337 <[email protected]>
…-project#16416) Signed-off-by: DarkLight1337 <[email protected]>
…-project#16416) Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Mu Huai <[email protected]>
Currently with the cache enabled, in
BaseMultiModalProcessor._apply_hf_processor_mm_onlywe create both text and multimodal dummy data but the latter is unused, leading to unnecessary overhead for allocating NumPy arrays. This is especially devastating for models that support large image sizes such as Qwen2-VL series.This PR optimizes this process by splitting up the dummy data generation into text and multimodal parts, so that we can create just the dummy text in
BaseMultiModalProcessor._apply_hf_processor_mm_only.Note: Multi-modal processors will be required to implement
get_dummy_textandget_dummy_mm_datain a future release. This PR adds a warning asking the developer to do so if the processor hasn't done that yet.Benchmark (#11196):
Main branch
This branch