-
Notifications
You must be signed in to change notification settings - Fork 293
[AgentX] Retune B200 vLLM MTP aggregate / 调优 B200 vLLM MTP 聚合配置 #2621
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
Merged
+75
−59
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 This PR copies two non-trivial blocks verbatim from
dsv4_fp4_b300_vllm_mtp.sh: the DP-attention2*CONC % TPdivisibility check (lines 45-49, including the exact error string) and theMAX_NUM_SEQS/CUDA_GRAPH_CAPTURE_SIZEStoken-multiple loop (lines 245-266). The capture-size loop is a third copy of the one already duplicated inkimik3_fp4_b300_vllm_mtp.sh(~line 207). Sincebenchmark_lib.shalready centralizes shared agentic-recipe helpers, consider extractingmtp_cudagraph_capture_sizes(max_num_seqs, tokens_per_seq)andrequire_dp_attention_seq_budget_divisible(conc, tp)there so a future change to the rounding/dedup algorithm doesn't require lockstep edits across three files.Extended reasoning...
What/where:
dsv4_fp4_b200_vllm_mtp.sh(this PR) introduces two blocks that are verbatim (or near-verbatim) copies of logic already present indsv4_fp4_b300_vllm_mtp.sh:The DP-attention scheduler-budget divisibility guard at lines 45-49:
This is byte-for-byte identical (including the error string) to
dsv4_fp4_b300_vllm_mtp.sh:47-50.The
MAX_NUM_SEQSsplit (2*CONC/TPunder DP-attention vs.2*CONCotherwise) plus theCUDA_GRAPH_CAPTURE_SIZESfor-loop that builds a comma-joined list ofnum_seqs * TOKENS_PER_SEQmultiples (lines 245-266). This is identical todsv4_fp4_b300_vllm_mtp.sh:254-286, and the capture-size loop body specifically is duplicated a third time inkimik3_fp4_b300_vllm_mtp.sh:207-214.Why it matters:
benchmark_lib.shalready exists precisely to hold shared agentic-recipe logic — it currently centralizesrequire_agentic_kv_offload_none,require_agentic_kv_offload_backend, andwait_for_server_ready. The capture-size loop is pure mechanical string-building (not a tuning knob itself —MAX_NUM_SEQSandTOKENS_PER_SEQremain inline inputs), so it is a strong candidate for the same treatment. With three independent copies, the comments describing the algorithm have already drifted slightly between files (this PR's comment differs in wording from b300's and kimik3's), which is a concrete symptom of the maintenance hazard: a future correction to the rounding/dedup behavior called out in the comments (vLLM rounds configured capture sizes up to multiples ofTOKENS_PER_SEQand dedups them) would require editing three files in lockstep, and it would be easy to update one and miss another.Proof of triplication (step-by-step):
grep -n \"2 \* CONC % TP\" benchmarks/single_node/agentic/*.sh\"matches bothdsv4_fp4_b200_vllm_mtp.sh:45(this PR) anddsv4_fp4_b300_vllm_mtp.sh:47, with identical error text.grep -n \"CUDA_GRAPH_CAPTURE_SIZES\" benchmarks/single_node/agentic/*.sh\"matches the same for-loop construct indsv4_fp4_b200_vllm_mtp.sh,dsv4_fp4_b300_vllm_mtp.sh, andkimik3_fp4_b300_vllm_mtp.sh, each buildingnum_seqs=1..MAX_NUM_SEQSmultiplied byTOKENS_PER_SEQinto a comma-joined string.Suggested fix: add two helpers to
benchmark_lib.sh:require_dp_attention_seq_budget_divisible(conc, tp)— encapsulates the guard and error message.mtp_cudagraph_capture_sizes(max_num_seqs, tokens_per_seq)— builds and echoes the comma-joined capture-size list.Then call these from all three scripts instead of inlining the logic. This is a pure refactor with no behavior change, so it does not block merging this PR — flagging as a nit for a follow-up cleanup.