Skip to content

feat(bench): add --dp-rank-roundrobin for explicit DP-rank routing - #2696

Closed
rebel-joonhyunglee wants to merge 1 commit into
SemiAnalysisAI:mainfrom
rebel-joonhyunglee:feat/dp-rank-roundrobin-header
Closed

rebel-joonhyunglee wants to merge 1 commit into
SemiAnalysisAI:mainfrom
rebel-joonhyunglee:feat/dp-rank-roundrobin-header

Conversation

@rebel-joonhyunglee

Copy link
Copy Markdown

What

Adds an opt-in --dp-rank-roundrobin N flag to benchmark_serving.py. When set, request i is pinned to data-parallel rank i % N via the X-data-parallel-rank HTTP header, bypassing vLLM's server-side DP load balancer.

Why

Under injection=inf (request-rate unbounded), vLLM's internal DP balancer can dispatch requests unevenly across ranks — some engines sit idle while others queue — which depresses output TPS on high-DP configs (observed on DP8). This flag measures the ideal round-robin routing baseline as a clean A/B against the default balancer, with no server or SDK change (the X-data-parallel-rank header is already honored by vLLM v0.18+).

Judging signal for the A/B: with the flag on, mean_ttft / median(p50) ttft collapses toward ~1 and output TPS rises, indicating the default-balancer TPS gap was a routing artifact rather than a hardware limit.

Changes

  • backend_request_func.py: RequestFuncInput gains an extra_headers field; the OpenAI completions and chat-completions request funcs merge it into request headers.
  • benchmark_serving.py: --dp-rank-roundrobin arg; benchmark() assigns the header per request when set. Default None → no behavior change.

Compatibility

Off by default; no change to existing runs. Header is a no-op on servers that don't read it.

Add an opt-in `--dp-rank-roundrobin N` flag to benchmark_serving.py that
pins request i to data-parallel rank i % N via the `X-data-parallel-rank`
HTTP header, bypassing the server-side DP balancer.

Under injection=inf, vLLM's internal balancer can dispatch requests
unevenly across DP ranks, leaving some engines idle while others queue,
which depresses output TPS on high-DP configs. This flag lets a benchmark
measure the ideal round-robin routing baseline as an A/B against the
default balancer, with no server/SDK change.

- RequestFuncInput gains an `extra_headers` field, merged into the request
  headers by the OpenAI completions and chat-completions request funcs.
- benchmark() assigns the header per request when the flag is set.

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

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.

@functionstackx

Copy link
Copy Markdown
Collaborator

We are phasing out single turn in favor of agentic bench so probably won't accept this contribution

seungrokj added a commit that referenced this pull request Nov 11, 2026
…e diff

- Update the image from rocm/atom-dev:nightly_202610121516 to nightly_202611101510 (ATOM e5b74bc86, ROCm 7.2.4) in the master config, and the AToMesh frontend container_image from sha256:a60811a8... to sha256:160a4ec4..., the same image.
- Replace plain TP2 at concurrency [1, 2, 4, 6, 8, 16, 32, 64] and plain TP4 at [1, 8, 32] with plain TP2 at [1, 2, 16, 32], DTP2 at 64, DEP2 at [128, 256] and plain TP4 at [1, 2, 4, 8]. TP2 c4, c6, c8 and c64 and TP4 c32 are dropped; TP4 c2 and c4 are new.
- Switch the KV cache from BF16 to MXFP8 at every point; the index cache stays FP4.
- Drop max-num-seqs 128. Concurrency 1 runs max-num-seqs 2, decode graphs [1, 2] and ATOM_PREFILL_DECODE_INTERVAL=1000000, the C1 recipe of ATOM's recipes/Kimi-K3.md (ROCm/ATOM#2659). The c256 point also captures 256.
- Set ATOM_PREFILL_DECODE_INTERVAL per point: 192 at TP2 c2 and TP4 c2-c8, 96 at TP2 c16, 40 at TP2 c32 and 10 at the DP points.
- The DP points add dp-load-balance least_tokens, ATOM_DP_SESSION_AFFINITY=1, ATOM_DP_LB_REQ_EQUIV=512 and GPU_MAX_HW_QUEUES=5, with AIPerf session ids as X-Dynamo-Session-Id.
- Every point adds timeout-keep-alive 900.
- The new ATOM brings V4.1 DP attention (#2376), the V4.1 MXFP8 KV cache with DSpark (#2725), DP prefill balancing and graph replay (#2551, #2696, #2697) and the default HIP Mega-MHC kernel (#2568).
- No change to the DSpark draft's weight precision; its KV cache follows the target from BF16 to MXFP8.

Also replace the recipe and master-config header comments with line comments (AGENTS.md "Comments"); no setting changes.

- 镜像从 rocm/atom-dev:nightly_202610121516 更新为 nightly_202611101510(ATOM e5b74bc86,ROCm 7.2.4),AToMesh 前端 container_image 同步更新为同一镜像。
- 纯 TP2 [1, 2, 4, 6, 8, 16, 32, 64] 和纯 TP4 [1, 8, 32] 改为纯 TP2 [1, 2, 16, 32]、DTP2 c64、DEP2 [128, 256] 和纯 TP4 [1, 2, 4, 8]。删除 TP2 c4、c6、c8、c64 和 TP4 c32;新增 TP4 c2 和 c4。
- 所有点的 KV cache 从 BF16 改为 MXFP8;index cache 仍为 FP4。
- 去掉 max-num-seqs 128。并发 1 使用 max-num-seqs 2、decode 图 [1, 2] 和 ATOM_PREFILL_DECODE_INTERVAL=1000000,即 ATOM recipes/Kimi-K3.md 的 C1 recipe(ROCm/ATOM#2659)。c256 额外捕获 256。
- 各点设置 ATOM_PREFILL_DECODE_INTERVAL:TP2 c2 和 TP4 c2-c8 为 192,TP2 c16 为 96,TP2 c32 为 40,DP 点为 10。
- DP 点增加 dp-load-balance least_tokens、ATOM_DP_SESSION_AFFINITY=1、ATOM_DP_LB_REQ_EQUIV=512 和 GPU_MAX_HW_QUEUES=5,AIPerf 以 X-Dynamo-Session-Id 发送 session id。
- 所有点增加 timeout-keep-alive 900。
- 新 ATOM 带来 V4.1 DP attention(#2376)、V4.1 MXFP8 KV cache 与 DSpark(#2725)、DP prefill 均衡与图回放(#2551、#2696、#2697)以及默认 HIP Mega-MHC kernel(#2568)。
- DSpark draft 权重精度不变;其 KV cache 随 target 从 BF16 变为 MXFP8。

另将 recipe 和 master config 的头部注释改为行注释(AGENTS.md "Comments"),不改变任何设置。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants