Skip to content

[Entrypoints] Split the pooling offline API into PoolingOfflineMixin.#42267

Merged
noooop merged 14 commits into
vllm-project:mainfrom
noooop:pooling_llm_mixin
May 15, 2026
Merged

[Entrypoints] Split the pooling offline API into PoolingOfflineMixin.#42267
noooop merged 14 commits into
vllm-project:mainfrom
noooop:pooling_llm_mixin

Conversation

@noooop

@noooop noooop commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Purpose

This pull request refactors the LLM class by moving offline pooling inference logic into a new PoolingOfflineMixin class in vllm/entrypoints/pooling/offline.py.

vllm/entrypoints/llm.py: 1957 -> 1539

Test Plan

pytest tests/entrypoints/pooling/

Test Result

pass


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.

noooop added 2 commits May 11, 2026 11:01
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify mergify Bot added the frontend label May 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 LLM class by moving offline pooling inference logic into a new PoolingOfflineMixin class in vllm/entrypoints/pooling/llm.py. The LLM class now inherits from this mixin, and methods such as encode, embed, classify, reward, and score have been relocated to improve modularity. A compatibility issue was identified regarding the use of the default parameter in TypeVar, which is only available in Python 3.13+ and requires importing from typing_extensions to maintain support for older Python versions.

Comment thread vllm/entrypoints/pooling/llm.py Outdated
noooop added 2 commits May 11, 2026 11:15
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop noooop marked this pull request as ready for review May 11, 2026 03:43
@noooop noooop requested a review from DarkLight1337 as a code owner May 11, 2026 03:43

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

noooop added 2 commits May 11, 2026 11:43
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify

mergify Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--42267.org.readthedocs.build/en/42267/

@mergify mergify Bot added the documentation Improvements or additions to documentation label May 11, 2026
noooop added 2 commits May 11, 2026 13:40
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Comment thread docs/api/README.md
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify

mergify Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

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

uv pip install pre-commit>=4.5.1
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 failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify

mergify Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

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

uv pip install pre-commit>=4.5.1
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 failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify

mergify Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

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

uv pip install pre-commit>=4.5.1
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 failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

noooop added 2 commits May 15, 2026 14:12
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop noooop enabled auto-merge (squash) May 15, 2026 06:21
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label May 15, 2026
@noooop noooop merged commit 75fd68c into vllm-project:main May 15, 2026
44 checks passed
omerpaz95 pushed a commit to omerpaz95/vllm that referenced this pull request May 18, 2026
omerpaz95 pushed a commit to omerpaz95/vllm that referenced this pull request May 18, 2026
mfylcek pushed a commit to mfylcek/vllm that referenced this pull request May 19, 2026
jhu960213 pushed a commit to jhu960213/vllm that referenced this pull request May 20, 2026
h1t35h pushed a commit to h1t35h/vllm that referenced this pull request May 21, 2026
@noooop noooop deleted the pooling_llm_mixin branch May 22, 2026 05:43
Liuweixiong0118 pushed a commit to Liuweixiong0118/vllm that referenced this pull request Jun 1, 2026
…vllm-project#42267)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Liuweixiong0118 <lwx34158427@gmail.com>
mvanhorn pushed a commit to mvanhorn/vllm that referenced this pull request Jun 4, 2026
…vllm-project#42267)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
andakai pushed a commit to andakai/vllm that referenced this pull request Jun 4, 2026
knight0528 pushed a commit to knight0528/vllm that referenced this pull request Jun 8, 2026
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.

2 participants