[Frontend] Offload blocking preprocessing & postprocessing ops to thread pool for pooling entrypoints.#39763
Merged
DarkLight1337 merged 5 commits intovllm-project:mainfrom Apr 14, 2026
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the pooling entrypoints to offload pre- and post-processing tasks to a thread pool using make_async. Key changes include renaming internal preprocessing methods for consistency, converting response-building methods from asynchronous to synchronous, and updating PoolingServeContext to make pooling_params a required field. A critical bug was identified in the flash_late_interaction method where _preprocessing_async is incorrectly called at the end of the function instead of _postprocessing_async, which would prevent the final response from being built correctly.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: wang.yuqi <noooop@126.com>
Member
|
How does this compare to calling the async renderer methods? |
Collaborator
Author
Collaborator
Author
4 tasks
zxd1997066
pushed a commit
to zxd1997066/vllm
that referenced
this pull request
Apr 15, 2026
…ead pool for pooling entrypoints. (vllm-project#39763) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: zengxian <xiangdong.zeng@intel.com>
Closed
2 tasks
whk-lab
pushed a commit
to whk-lab/vllm
that referenced
this pull request
Apr 23, 2026
…ead pool for pooling entrypoints. (vllm-project#39763) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
avinashsingh77
pushed a commit
to avinashsingh77/vllm
that referenced
this pull request
Apr 27, 2026
…ead pool for pooling entrypoints. (vllm-project#39763) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
Following #34789
Offload blocking preprocessing & postprocessing ops to thread pool for pooling entrypoints.
rename _preprocess_completion_online ->_preprocess_cmpl_online
https://github.com/noooop/snippet/blob/main/benchmarks/embed3/overhead_offline.py https://github.com/noooop/snippet/blob/main/benchmarks/embed3/overhead_online.py
This largely addresses the 2ms latency regression introduced by the asynchronous tokenizer. found in #27407
main (sync tokenizer)
online 3.5837650002576993
offline 2.173177999793552
this pr (thread pool)
online 3.5909150001316448
offline 2.1705790004489245
https://github.com/noooop/snippet/blob/main/benchmarks/embed3/v1_online_high.py
Test Plan
keep ci green
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.