Skip to content

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Sep 25, 2025

Purpose

The removal of V0 lets us get rid of the msgspec wrappers and access the data in a more direct manner.

cc @maxdebayser @noooop

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>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 25, 2025
@DarkLight1337 DarkLight1337 changed the title [Misc] Simply PoolerOutput and move to v1/outputs [Misc] Simplify PoolerOutput and move to v1/outputs Sep 25, 2025
@mergify mergify bot added the v1 label Sep 25, 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 refactors the PoolerOutput by removing the msgspec wrappers and simplifying its definition to a type alias for Union[torch.Tensor, list[torch.Tensor]]. The definition has been moved from vllm/sequence.py to vllm/v1/outputs.py. The changes are consistently applied across the codebase, including updates to pooler implementations and their usage in the model runner. This simplification makes the code more direct and easier to understand. The refactoring appears correct and well-executed, with no apparent issues.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
hidden_states=hidden_states,
pooling_metadata=pooling_metadata,
)
raw_pooler_output = json_map_leaves(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes more sense for model runner to handle device transfer

Copy link
Member

@Isotr0py Isotr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) September 25, 2025 05:48
@DarkLight1337 DarkLight1337 merged commit 755ed7b into vllm-project:main Sep 25, 2025
51 checks passed
@DarkLight1337 DarkLight1337 deleted the mv-pooler-output branch September 25, 2025 06:47
Zhuul pushed a commit to Zhuul/vllm that referenced this pull request Sep 26, 2025
…5629)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
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>
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 v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants