-
Notifications
You must be signed in to change notification settings - Fork 293
perf(dsv4): update B200 SGLang AgentX HiCache MTP DEP8 configuration / 更新 B200 SGLang AgentX HiCache MTP DEP8 配置 #2656
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
functionstackx
merged 4 commits into
main
from
dsv4-fp4-b200-sglang-agentic-hicache-mtp-w4a4
Aug 19, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b0f58bc
perf(dsv4): update B200 SGLang AgentX HiCache MTP DEP8 configuration
hshrivastava-droid 2085965
chore(changelog): link PR #2656
hshrivastava-droid ed75a92
Merge remote-tracking branch 'origin/main' into pr2656-work
functionstackx 3e58b2c
chore: refresh PR #2656 for sweep reuse [skip-sweep]
functionstackx 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
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.
🔴 MODEL_ARGS+=(--enable-deepseek-v4-fp4-indexer) is only added in the DP_ATTENTION=true branch (line 109) — the TP-only else branch never touches MODEL_ARGS, so the tp:8/kv-offloading:none and tp:8/kv-offloading:dram search-space rows launch without the FP4 indexer while the DP-attn+EP rows get it. The sibling recipe benchmarks/single_node/fixed_seq_len/dsv4_fp4_b300_sglang_mtp.sh applies this flag on both branches (lines 95, 111), and benchmarks/single_node/agentic/dsv4_fp4_b200_vllm_mtp.sh:292 sets the equivalent use_fp4_indexer_cache unconditionally, confirming it's an indexer-level optimization independent of DP-attn/TP-only, not something that should be scoped to the DP-attn branch — fix by adding it to the else branch (or hoisting it above the if) so both paths get it.
Extended reasoning...
The bug: In
benchmarks/single_node/agentic/dsv4_fp4_b200_sglang_mtp.sh, this PR movesMODEL_ARGS+=(--enable-deepseek-v4-fp4-indexer)from its own initialization block into the middle of the function, but only inside theif [ "$DP_ATTENTION" = "true" ]; thenbranch (line 109/128-136 in the final file).MODEL_ARGS=()is initialized empty right before the if/else at line 104, and theelse(TP-only) branch at lines 137-141 only appends--moe-runner-backend flashinfer_mxfp4and--disable-flashinfer-autotunetoPARALLEL_ARGS— it never touchesMODEL_ARGS. So for any launch whereDP_ATTENTION != true,MODEL_ARGSstays empty and--enable-deepseek-v4-fp4-indexeris never passed tosglang.launch_server.\n\nWhere this bites:configs/nvidia-master.yaml'sdsv4-fp4-b200-sglang-agentic-hicache-mtpsearch-space has four rows; two of them (tp: 8, kv-offloading: noneandtp: 8, kv-offloading: dram) have nodp-attn: true, meaningDP_ATTENTIONresolves to false/unset for those launches and they take the TP-onlyelsebranch. Those two rows will run this whole DEP8 sweep without the FP4 indexer, while the other two rows (tp: 8, ep: 8, dp-attn: true, ...) get it. Since this recipe's entire purpose is to produce a comparable TP-only vs DP-attn perf picture for the DEP8 config, an indexer optimization present on one side and silently absent on the other will skew that comparison — a TP-only regression (or an apparent DP-attn win) could actually just be the missing flag, not a real architectural difference.\n\nWhy nothing else catches this: there's no validation tyingMODEL_ARGScontents toDP_ATTENTION, no lint/test asserting flag parity across branches, and the flag is silently omitted rather than erroring — the server launches fine either way, it's just running a materially different (unoptimized) configuration on the TP-only rows.\n\nPrecedent proving this is a path-independent flag, not a DP-attn-specific one:benchmarks/single_node/fixed_seq_len/dsv4_fp4_b300_sglang_mtp.shsets--enable-deepseek-v4-fp4-indexerin both its DP-attn branch (line 95) and its TP-onlyelsebranch (line 111) — I verified this directly by reading the file just now. Notably, on that B300 recipe the indexer flag is the one thing kept identical across both paths, while the DeepGEMM MoE FP4 env vars (SGLANG_OPT_DEEPGEMM_MEGA_MOE_USE_FP4_ACTS,USE_MXF4_KIND, etc.) remain DP-attn-only — i.e. the sibling recipe already draws exactly the distinction this PR should draw: MoE/DP-attn tuning stays scoped to DP-attn, but the indexer flag applies everywhere. Separately,benchmarks/single_node/agentic/dsv4_fp4_b200_vllm_mtp.sh:292sets the equivalentuse_fp4_indexer_cache: trueunconditionally in the shared--attention-config, outside any DP_ATTENTION conditional. Both sibling recipes agree the indexer is orthogonal to the DP-attn/TP-only choice.\n\nStep-by-step proof: (1)MODEL_ARGS=()at line 104. (2) For thetp: 8, kv-offloading: nonerow inconfigs/nvidia-master.yaml, nodp-attnkey is set, soDP_ATTENTIONis false at runtime. (3) Execution takes theelsebranch at line 137, which appends only toPARALLEL_ARGS. (4)MODEL_ARGSremains(). (5) At line ~207,"${MODEL_ARGS[@]}"expands to nothing inSGLANG_CMD. (6)sglang.launch_serverstarts without--enable-deepseek-v4-fp4-indexerfor this row, while thedp-attn: truerows in the same sweep do get it — an inconsistent, unintended asymmetry.\n\nFix: moveMODEL_ARGS+=(--enable-deepseek-v4-fp4-indexer)out of theifbranch — either place it right afterMODEL_ARGS=()(applying unconditionally, matching the vLLM sibling) or add the same line to theelsebranch (matching the B300 sibling's per-branch structure) so both TP-only and DP-attn rows receive the flag.