Skip to content

Conversation

noooop
Copy link
Contributor

@noooop noooop commented Jul 28, 2025

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.

Purpose

After #21470, LLM.encode pooling_task defaults to using "encode", meaning that reward models actually use LLM.encode. However, most libraries' encode corresponds to an embedding model, which can lead to potential errors.

  • Add LLM.reward specified to reward models
  • The pooling_task for LLM.encode defaults to None, and pooling_task needs to be specified

Test Plan

Test Result

(Optional) Documentation Update

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.

🚀

@mergify mergify bot added the frontend label Jul 28, 2025
Signed-off-by: wang.yuqi <[email protected]>
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 aims to improve the API for reward models by adding a dedicated LLM.reward method and making the pooling_task in LLM.encode explicit. The changes are in the right direction, but the implementation of the new reward method seems incorrect as it uses pooling_task="encode" and lacks necessary validation. I've left a critical comment with suggestions to align it with other task-specific methods like embed and classify. Additionally, I've suggested improving an error message for better user guidance. Addressing these points will significantly improve the correctness and consistency of the new API.

@noooop
Copy link
Contributor Author

noooop commented Jul 28, 2025

@DarkLight1337

Quick review

Signed-off-by: wang.yuqi <[email protected]>
noooop added 2 commits July 28, 2025 14:13
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
@mergify mergify bot added the documentation Improvements or additions to documentation label Jul 28, 2025
@noooop noooop marked this pull request as ready for review July 28, 2025 07:29
Signed-off-by: wang.yuqi <[email protected]>
noooop added 2 commits July 28, 2025 16:13
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
@noooop noooop marked this pull request as draft July 28, 2025 09:22
noooop added 2 commits July 28, 2025 18:34
Signed-off-by: wang.yuqi <[email protected]>
@noooop noooop marked this pull request as ready for review July 28, 2025 12:40
noooop added 3 commits July 29, 2025 08:57
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
@DarkLight1337
Copy link
Member

I think we should still keep encode in VllmRunner just like for LLM class

@noooop
Copy link
Contributor Author

noooop commented Jul 29, 2025

I think we should still keep encode in VllmRunner just like for LLM class

Perhaps we need to figure out whether it requires embed or reward.

@DarkLight1337
Copy link
Member

DarkLight1337 commented Jul 29, 2025

This model uses pooler interface for image segmentation. So it's not really embed/reward. The more generic encode (which we can rename later) is a better match.

@noooop
Copy link
Contributor Author

noooop commented Jul 29, 2025

I'll wait for buildkite/ci/pr/language-models-test-extended-pooling to finish and check for any other errors

Signed-off-by: wang.yuqi <[email protected]>
auto-merge was automatically disabled July 29, 2025 07:27

Head branch was pushed to by a user without write access

@DarkLight1337
Copy link
Member

Let's wait for #18321 to be merged first, then update this PR

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) July 29, 2025 10:48
@noooop
Copy link
Contributor Author

noooop commented Jul 30, 2025

buildkite/ci/pr/language-models-test-extended-pooling

The failed test can be fixed by #21747

@vllm-bot vllm-bot merged commit 65f311c into vllm-project:main Jul 30, 2025
66 of 69 checks passed
Jun-Howie pushed a commit to Jun-Howie/vllm that referenced this pull request Jul 30, 2025
liuyumoye pushed a commit to liuyumoye/vllm that referenced this pull request Jul 31, 2025
wenscarl pushed a commit to wenscarl/vllm that referenced this pull request Aug 4, 2025
wenscarl pushed a commit to wenscarl/vllm that referenced this pull request Aug 4, 2025
@noooop noooop deleted the llm_reward branch August 5, 2025 11:37
vadiklyutiy pushed a commit to CentML/vllm that referenced this pull request Aug 5, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
noamgat pushed a commit to noamgat/vllm that referenced this pull request Aug 9, 2025
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
taneem-ibrahim pushed a commit to taneem-ibrahim/vllm that referenced this pull request Aug 14, 2025
BoyuanFeng pushed a commit to BoyuanFeng/vllm that referenced this pull request Aug 14, 2025
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
googlercolin pushed a commit to googlercolin/vllm that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation frontend 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.

3 participants