Skip to content

[Bugfix] Implement multimodal_cpu_fields in model runner#5196

Merged
wangxiyuan merged 1 commit intovllm-project:mainfrom
zhangxinyuehfad:zxy_fix_cpu_tens
Dec 22, 2025
Merged

[Bugfix] Implement multimodal_cpu_fields in model runner#5196
wangxiyuan merged 1 commit intovllm-project:mainfrom
zhangxinyuehfad:zxy_fix_cpu_tens

Conversation

@zhangxinyuehfad
Copy link
Copy Markdown
Collaborator

@zhangxinyuehfad zhangxinyuehfad commented Dec 19, 2025

What this PR does / why we need it?

Related to #4084 Implement multimodal_cpu_fields in model runner

Does this PR introduce any user-facing change?

How was this patch tested?

@vllm-ascend-ci vllm-ascend-ci added ready read for review ready-for-test start test by label for PR labels Dec 19, 2025
Copy link
Copy Markdown
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 introduces a mechanism to ensure specific multimodal data fields are on the CPU before being used by the model, which is a good refactoring of model-specific logic into a more general component. My main feedback is to make the list of CPU-bound fields configurable rather than hardcoded to improve maintainability and support for future models.

Comment thread vllm_ascend/worker/model_runner_v1.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@shen-shanshan
Copy link
Copy Markdown
Collaborator

Please delete the whole file patch_qwen3_vl.py.

@shen-shanshan
Copy link
Copy Markdown
Collaborator

shen-shanshan commented Dec 19, 2025

According to vllm-project/vllm#28168, I suppose this multimodal_cpu_fields is different for every model, we should not just use one multimodal_cpu_fields for all MM models.

Besides, we should avoid letting users to manually configure this by passing an additional_config, which could lead to an awful user experience.

@shen-shanshan
Copy link
Copy Markdown
Collaborator

Currently, this multimodal_cpu_fields is only used by Qwen series VL models, and the multimodal_cpu_fields of these models are all the same. Thus, your resolution could work temporarily, but I suppose this is not a good choice to implement the function like this for long term.

Signed-off-by: hfadzxy <starmoon_zhang@163.com>
@shen-shanshan
Copy link
Copy Markdown
Collaborator

LGTM if all CI passed.

Note that we need to remove this logic after this field is deprecated in vllm.

@zhangxinyuehfad
Copy link
Copy Markdown
Collaborator Author

Please delete the whole file patch_qwen3_vl.py.

done

@zhangxinyuehfad
Copy link
Copy Markdown
Collaborator Author

According to vllm-project/vllm#28168, I suppose this multimodal_cpu_fields is different for every model, we should not just use one multimodal_cpu_fields for all MM models.

Besides, we should avoid letting users to manually configure this by passing an additional_config, which could lead to an awful user experience.

Yes, I deleted multimodal_cpu_fields from additional_config.

@shen-shanshan shen-shanshan added ready read for review ready-for-test start test by label for PR and removed ready read for review ready-for-test start test by label for PR labels Dec 22, 2025
@shen-shanshan
Copy link
Copy Markdown
Collaborator

CC @wangxiyuan All CI passed.

@wangxiyuan wangxiyuan merged commit 61efaff into vllm-project:main Dec 22, 2025
46 of 59 checks passed
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Feb 28, 2026
…t#5196)

### What this PR does / why we need it?
Related to vllm-project#4084
Implement multimodal_cpu_fields in model runner

- vLLM version: v0.12.0
- vLLM main:
vllm-project/vllm@ad32e3e

Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Mar 4, 2026
…t#5196)

### What this PR does / why we need it?
Related to vllm-project#4084
Implement multimodal_cpu_fields in model runner

- vLLM version: v0.12.0
- vLLM main:
vllm-project/vllm@ad32e3e

Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
@zhangxinyuehfad zhangxinyuehfad deleted the zxy_fix_cpu_tens branch March 19, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:core ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants