Skip to content
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][Bugfix] Pass processor kwargs properly on init #13516

Merged

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Feb 19, 2025

This PR fixes an issue where multi-modal processors using custom HF processors failed to be initialized with kwargs from model_config.mm_processor_kwargs. I added the init_processor method to InputContext to help ensure that those kwargs are being forwarded correctly.

To avoid regressions, all model-specific processor tests now check that the result is the same regardless of whether the kwargs are passed during initialization or during inference (see kwargs_on_init param).

Other changes/fixes:

  • Fixed an issue where model-specific processor tests interfered with each other because of the processor cache. Now, the cache is turned off by default in build_model_context.
  • Added cached_xxx_from_config convenience methods for constructing HF tokenizers and processors from model_config.
  • Moved cached_get_xxx convenience methods to vllm.transformers_utils.tokenizer and vllm.transformers_utils.processor.
  • Added support for min_dynamic_patch for InternVL-based models.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Copy link

👋 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 fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 ready label to the PR or enable auto-merge.

🚀

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@Isotr0py Isotr0py enabled auto-merge (squash) February 19, 2025 08:35
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 19, 2025
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 removed the ready ONLY add when PR is ready to merge/full CI is needed label Feb 19, 2025
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 force-pushed the mm-processor-kwargs-init branch from fd494f6 to dbde318 Compare February 19, 2025 09:21
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 19, 2025 09:31
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 19, 2025
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 merged commit 377d10b into vllm-project:main Feb 19, 2025
48 of 49 checks passed
@DarkLight1337 DarkLight1337 deleted the mm-processor-kwargs-init branch February 19, 2025 13:17
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 20, 2025
)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
kerthcet pushed a commit to kerthcet/vllm that referenced this pull request Feb 21, 2025
)

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.

2 participants