Skip to content

Conversation

@DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Oct 2, 2025

Purpose

Part of #26149

Test Plan

Model and tensor schema tests should pass. I have also run the example script on all five models.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 2, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 is a great refactoring that simplifies the multimodal input processing for several models by adopting the new merge_by_field_config mechanism. The changes consistently remove manual input processing logic, such as calls to flatten_bn and type checks, and delegate this responsibility to the MultiModalFieldConfig system. This makes the code cleaner and more maintainable.

The refactoring has been applied to gemma3_mm, gemma3n_mm, glm4_1v, glm4v, and granite_speech models. Key improvements include:

  • Simplification of _parse_and_validate_*_input methods.
  • Removal of redundant helper functions like _validate_and_reshape_mm_tensor.
  • In gemma3n_mm.py, the input data classes were nicely refactored from TypedDict to TensorSchema, improving type safety and clarity.
  • In glm4v.py, a subtle but important bug was fixed by explicitly overriding get_input_embeddings to use the implementation from SupportsMultiModal, ensuring correct multimodal embedding merging.
  • In granite_speech.py, a small but effective optimization was introduced for calculating audio_embed_sizes.

The changes are well-executed and consistent across all affected models. The code is now more robust and easier to understand. I have not found any issues of high or critical severity. Great work!

@vllm-bot vllm-bot merged commit 39b643d into vllm-project:main Oct 3, 2025
53 of 56 checks passed
@DarkLight1337 DarkLight1337 deleted the merge-by-field-config-3 branch October 3, 2025 05:38
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
xuechendi added a commit to vllm-project/vllm-gaudi that referenced this pull request Oct 3, 2025
Failing is captured when vllm-project/vllm#26117
merged
And the actual update should be done according to
vllm-project/vllm#25676

Signed-off-by: Chendi Xue <Chendi.Xue@intel.com>
tomeras91 pushed a commit to tomeras91/vllm that referenced this pull request Oct 6, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
karan pushed a commit to karan/vllm that referenced this pull request Oct 6, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Karan Goel <3261985+karan@users.noreply.github.com>
southfreebird pushed a commit to southfreebird/vllm that referenced this pull request Oct 7, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
…6117)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants