-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Misc] Simplify PoolerOutput and move to v1/outputs
#25629
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
[Misc] Simplify PoolerOutput and move to v1/outputs
#25629
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
v1/outputs
v1/outputs
There was a problem hiding this 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( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…5629) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: yewentao256 <zhyanwentao@126.com>
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
supported_models.md
andexamples
for a new model.