Skip to content

[Perf][EPD] Batch image requests per encoder - #57095

Merged
khluu merged 9 commits into
vllm-project:mainfrom
gty111:perf/epd-image-batching
Sep 17, 2026
Merged

khluu merged 9 commits into
vllm-project:mainfrom
gty111:perf/epd-image-batching

Conversation

@gty111

@gty111 gty111 commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Batch proxy-to-encoder HTTP requests: instead of sending one request per image, the proxy groups images from the same user request assigned to the same E instance into a single multi-image request. Per-image round-robin assignment and parallel requests to different E instances are preserved. Audio/video remain unbatched; no new configuration is added.

Return item positions in EC metadata so the proxy can map each result back to the original image, including repeated images and processing-derived hashes. This changes request fan-out in the proxy, not encoder compute batching; no scheduler or model-runner changes.

Results

Same-node A/B: Qwen3.5-35B-A3B BF16, 4E+4PD on two GB200 nodes, Mooncake RDMA, MRv2, concurrency 96, CUDA graphs up to 16384 tokens, no eager. Each arm: 200 warmup requests, then 2 × 1200 MUIRBench requests with structured choice.

Metric Baseline Batched Change
Mean throughput 90.22 req/s 96.34 req/s +6.8%
Mean latency 1035.7 ms 975.2 ms -5.8%
P99 latency 3036.0 ms 2862.8 ms -5.7%
Accuracy 58.92% 59.33% +0.42 pp

E subrequests per round: 4924 → 3878 (-21.2%). All requests succeeded without proxy retries. No accuracy regression observed; this is a two-round comparison, not a claim of improved model accuracy. Both arms use the same worker metadata addition and differ only in the proxy.

Validation

.venv/bin/python -m pytest tests/v1/ec_connector/unit/{test_epd_proxy_retry,test_epd_proxy_round_robin,test_ec_example_connector}.py -q

58 passed; pre-commit passed. Covers repeated images, derived hashes, raw-media mode, metadata ordering and HTTP retries.

Checked #52409 and open PRs for encoder batching/fan-out; no duplicate found. #54176 concerns dynamic registration, not request batching.

AI assistance was used. Draft pending human review.

Assisted-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@mergify

mergify Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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

@mergify mergify Bot added documentation Improvements or additions to documentation kv-connector labels Sep 16, 2026
@gty111
gty111 marked this pull request as ready for review September 16, 2026 01:49

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

Comment thread examples/disaggregated/disaggregated_encoder/disagg_epd_proxy.py
Comment thread examples/disaggregated/disaggregated_encoder/disagg_epd_proxy.py
Assisted-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@mergify

mergify Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gty111.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Sep 16, 2026
Preserve image batching semantics while adopting main docstring formatting.

Assisted-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Keep raw video when its audio/video metadata cannot be uniquely matched and no transport handles need forwarding. Preserve image batching and push-path validation; cover both rewrite modes and transfer boundaries.

Co-authored-by: OpenAI Codex <codex@openai.com>

Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
[Bugfix][EPD] Preserve raw video fallback for audio features

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

LGTM. I went through the PR again after the latest fix and don’t see any remaining blockers.

Retain the video/audio fallback fix and annotate its test payload for mypy.

Assisted-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@gty111 gty111 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 17, 2026
@gty111

gty111 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #89528 for commit 746aa43e2b55.

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Hi @gty111, 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.

@mergify mergify Bot removed the needs-rebase label Sep 17, 2026
Assisted-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@gty111

gty111 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #89547 for commit 59f4645657f7.

gty111 and others added 2 commits September 17, 2026 07:26
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@gty111

gty111 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #89568 for commit b237d47c58b7.

@khluu
khluu merged commit 0d72627 into vllm-project:main Sep 17, 2026
127 checks passed
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Co-authored-by: Zhou ziheng <jiaranran2@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
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 kv-connector 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