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

[Misc] Split up pooling tasks #10820

Merged
merged 28 commits into from
Dec 11, 2024

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Dec 2, 2024

As part of #10674, split up the embedding task into the following tasks for pooling models:

  • Embedding (embed), with default pooler pooling_type=LAST, normalize=True
    • Usually one output per prompt
  • Classification (classify), with default pooler pooling_type=LAST, softmax=True
    • Usually one output per prompt
    • The scoring module will be automatically loaded from sentence-transformers.
    • Other models should register a separate architecture so that the model contains the correct modules.
  • Scoring (scoring)
    • Technically an alias for Classification, used for cross-encoder models
  • Reward Modeling (reward), with default pooler pooling_type=ALL
    • Usually one output per token per prompt
    • If the reward model has any additional modules compared to the text generation model, a separate architecture should be registered so that the model contains the correct modules.
    • To avoid peiyi9979/math-shepherd-mistral-7b-prm conflicting with other LlamaForCausalLM pooling models, we will remove the pooler default from the text generation model. Since users already have to override step_tag_id etc. anyway to use that model, this should not be a major breaking change.

Backwards compatibility

  • embedding remains available as an alias to embed.
  • If --task embedding is passed but the requested pooling model is not an embedding model, a deprecation warning is emitted.
  • Later, we will make --task embedding exclusive to embedding models.

Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Copy link

github-actions bot commented Dec 2, 2024

👋 Hi! Thank you for contributing to the vLLM project.
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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@mergify mergify bot added documentation Improvements or additions to documentation frontend labels Dec 2, 2024
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337 DarkLight1337 force-pushed the split-pooling-tasks branch 2 times, most recently from b4964ad to 5d3a629 Compare December 2, 2024 16:44
Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337 DarkLight1337 force-pushed the split-pooling-tasks branch 2 times, most recently from 3627461 to 39f7d7c Compare December 2, 2024 16:46
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Dec 6, 2024

cc @russellb see if these new doc additions look good to you!

@DarkLight1337
Copy link
Member Author

@Isotr0py would be great if you could review this as well!

Copy link
Collaborator

@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.

Overall LGTM. Just a comment about the score task.

vllm/config.py Outdated Show resolved Hide resolved
vllm/config.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@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 now!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) December 11, 2024 03:39
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 11, 2024
@youkaichao youkaichao disabled auto-merge December 11, 2024 09:27
@youkaichao youkaichao merged commit 8f10d5e into vllm-project:main Dec 11, 2024
55 of 58 checks passed
@DarkLight1337 DarkLight1337 deleted the split-pooling-tasks branch December 11, 2024 09:28
llsj14 pushed a commit to llsj14/vllm that referenced this pull request Dec 11, 2024
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Dec 12, 2024
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: Akshat Tripathi <[email protected]>
sleepwalker2017 pushed a commit to sleepwalker2017/vllm that referenced this pull request Dec 13, 2024
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