[Multimodal] Simplify MM input definitions#33331
Merged
Isotr0py merged 5 commits intovllm-project:mainfrom Jan 29, 2026
Merged
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the multimodal input definitions to simplify them by removing redundant fields from MultiModalFieldElem. The changes are consistently applied across the codebase, including tests and serialization logic. The new design is cleaner and more maintainable. I found one critical bug in a test file where a tuple was constructed in the wrong order, which would lead to a runtime error. Otherwise, the changes look good.
Contributor
|
Hi @DarkLight1337, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
Isotr0py
approved these changes
Jan 29, 2026
5 tasks
apd10
pushed a commit
to apd10/vllm
that referenced
this pull request
Jan 31, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
PiratePai
pushed a commit
to PiratePai/epd_shm
that referenced
this pull request
Feb 3, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: PiratePai <416932041@qq.com> Signed-off-by: Pai <416932041@qq.com>
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.
Purpose
Remove unnecessary fields in
MultiModalFieldElem; instead, always pass dictionaries to constructMultiModalKwargsItemandMultiModalKwargsItemsto make their roles clearer. Asgroup_mm_kwargs_by_modalitystill requires modality information, it has been updated to receive a list of(modality, MultiModalKwargsItem)instead of just a list ofMultiModalKwargsItem.Also, improve related docstrings.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.