Skip to content

[Renderer] Move InputPreprocessor into Renderer (2/2)#34560

Merged
vllm-bot merged 29 commits intovllm-project:mainfrom
DarkLight1337:mv-mm-processor-2
Feb 17, 2026
Merged

[Renderer] Move InputPreprocessor into Renderer (2/2)#34560
vllm-bot merged 29 commits intovllm-project:mainfrom
DarkLight1337:mv-mm-processor-2

Conversation

@DarkLight1337
Copy link
Copy Markdown
Member

@DarkLight1337 DarkLight1337 commented Feb 14, 2026

Purpose

Towards #22880

  • Transform embedding and multi-modal inputs in Renderer, removing the need for Input Preprocessor.
    • Input Preprocessor is retained for back-compatibility, but internally it just calls Renderer.
  • Update all APIs (except Score API) to pass ProcessorInputs to the LLM engine instead of raw prompts, using Renderer to process the raw prompts into ProcessorInputs where applicable.
  • Simplify beam search implementation to avoid duplicate MM processing.
  • Fix additional audio BOS/EOS tokens being added for Qwen2-Audio (discovered when checking beam search results).

Test Plan

Test Result


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>
@mergify mergify Bot added frontend multi-modality Related to multi-modality (#4194) v1 labels Feb 14, 2026
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 continues the significant refactoring of moving the input preprocessing logic from the engine into the renderer layer. The changes are extensive and affect many files, but they appear consistent and well-aligned with the goal of centralizing input processing. This refactoring improves the separation of concerns and should make the engine core cleaner.

I've identified one potential high-severity issue in vllm/beam_search.py where the logic to differentiate between token-only and multimodal prompts could be brittle. I've provided a suggestion to make it more robust by checking the prompt's type field directly.

Overall, this is a good step forward in improving the architecture of the input processing pipeline.

Comment thread vllm/beam_search.py
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 marked this pull request as ready for review February 15, 2026 07:38
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 15, 2026
@DarkLight1337
Copy link
Copy Markdown
Member Author

/gemini review

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
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 continues the significant refactoring of moving input preprocessing logic from the InputPreprocessor into the Renderer. The changes are extensive, touching many files across the entrypoints and engine components to adapt to the new ProcessorInputs data structure and the updated rendering flow. The InputPreprocessor is now a thin wrapper for backward compatibility, and the core logic for tokenization, multimodal processing, and preparing engine inputs resides within the BaseRenderer. This is a positive change for code organization and clarity.
I've found one critical issue in the handling of text-only encoder-decoder models which I've commented on. Other than that, the refactoring appears solid and consistent with the stated goals.

Comment thread vllm/inputs/data.py
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 15, 2026

Hi @DarkLight1337, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 changed the title [Renderer] Move InputPreprocessor into Renderer (2/2) [DO NOT MERE] Move InputPreprocessor into Renderer (2/2) Feb 15, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 16, 2026

Hi @DarkLight1337, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

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

mergify Bot commented Feb 16, 2026

Hi @DarkLight1337, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 17, 2026 09:59
@vllm-bot vllm-bot merged commit 574fe75 into vllm-project:main Feb 17, 2026
61 of 66 checks passed
@DarkLight1337 DarkLight1337 deleted the mv-mm-processor-2 branch February 17, 2026 13:32
@hallerite hallerite mentioned this pull request Mar 3, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend multi-modality Related to multi-modality (#4194) qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants