-
Notifications
You must be signed in to change notification settings - Fork 284
[AMD][DSV4] Disagg AgentX DP-attention tuning, HiCache ratio investigation, FP4 sparse-attention indexer #2823
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
base: main
Are you sure you want to change the base?
Changes from all commits
4f9dc94
178a0d5
73655da
a93787b
b0121ba
eef805c
b6ee496
b2237e2
07ce2fb
ff29006
931ed8e
49c7646
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,11 @@ | |
| # base_flags: str # Common flags for both prefill and decode | ||
| # mtp_flags: str # Appended to decode when DECODE_MTP_SIZE > 0 | ||
| # dp_flags: str # Appended when DP attention is enabled (prefill or decode) | ||
| # no_dp_flags: str # Appended when DP attention is disabled. Mutually exclusive | ||
| # # with dp_flags -- use this (not base_flags) for any flag | ||
| # # that conflicts with one in dp_flags (e.g. shared-experts | ||
| # # fusion), so the two conflicting flags are never both | ||
| # # emitted onto the same command line. | ||
| # ep_flags: str # Appended when EP is enabled. EP-specific MoE knobs only | ||
| # # (a2a backend, deepep mode, ep-dispatch algorithm). With | ||
| # # ep=1 these are dropped so the MoE runs tensor-parallel (TP). | ||
|
|
@@ -364,36 +369,49 @@ DeepSeek-R1-0528-MXFP4-v2: | |
| cuda_graph_bs_range: "1-128" | ||
|
|
||
| DeepSeek-V4-Pro-AgentX: | ||
| base_flags: "--watchdog-timeout 3600 --load-balance-method round_robin --kv-cache-dtype fp8_e4m3 --attention-backend dsv4 --page-size 256 --swa-full-tokens-ratio 0.1 --disable-shared-experts-fusion --tool-call-parser deepseekv4 --reasoning-parser deepseek-v4 --disaggregation-transfer-backend mori --log-level info --log-level-http error" | ||
| dp_flags: "--enable-dp-attention --enable-prefill-delayer" | ||
| base_flags: "--enable-deepseek-v4-fp4-indexer --watchdog-timeout 3600 --load-balance-method round_robin --kv-cache-dtype fp8_e4m3 --attention-backend dsv4 --page-size 256 --swa-full-tokens-ratio 0.1 --tool-call-parser deepseekv4 --reasoning-parser deepseek-v4 --disaggregation-transfer-backend mori --log-level info --log-level-http error" | ||
| # --enforce-shared-experts-fusion and dp_flags' --disable-shared-experts-fusion | ||
| # are documented by sglang as mutually exclusive (server_args.py), so each lives | ||
| # in its own bucket (no_dp_flags / dp_flags) rather than both riding on the | ||
| # command line at once relying on DeepseekV4ForCausalLM's internal check order. | ||
| no_dp_flags: "--enforce-shared-experts-fusion" | ||
| # DP-attention overrides mirror the single-node dsv4-fp4-mi355x-sglang-agentic-mtp | ||
| # recipe's `if [ "$DP_ATTENTION" = "true" ]` block (InferenceX PR #2800): | ||
| # --swa-full-tokens-ratio 0.15 widens the SWA ring for the larger DP batch, and | ||
| # --tokenizer-worker-num matches the only DP arm's TP (8) today -- bump this if | ||
| # a different-TP DP arm is added. | ||
| dp_flags: "--enable-dp-attention --enable-prefill-delayer --disable-shared-experts-fusion --swa-full-tokens-ratio 0.15 --enable-dp-attention-local-control-broadcast --tokenizer-worker-num 8 --stream-interval 20 --prefill-decode-interval 10" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Colocated PD interval on disaggMedium Severity
Reviewed by Cursor Bugbot for commit ff29006. Configure here. |
||
| ep_flags: "--ep-dispatch-algorithm fake --moe-a2a-backend mori --deepep-mode normal" | ||
| mtp_flags: "--speculative-algorithm EAGLE --speculative-eagle-topk 1" | ||
| prefill: | ||
| mem_fraction_static: 0.85 | ||
| mem_fraction_static: 0.86 | ||
| disable_radix_cache: false | ||
| disable_cuda_graph: true | ||
| dp: | ||
| max_running_requests: 1024 | ||
| chunked_prefill_size: "MORI_MAX_DISPATCH_TOKENS_PREFILL * PREFILL_TP_SIZE" # dsv4 compressor kernel uint16 token cap (255*256) | ||
| chunked_prefill_size: "16384 * PREFILL_TP_SIZE if PREFILL_TP_SIZE == 8 else 8192 * PREFILL_TP_SIZE" # dsv4 compressor kernel uint16 token cap (255*256) | ||
| context_length: 1048576 | ||
| # max_total_tokens: 1048576 | ||
| # Mirrors the single-node recipe's --enable-two-batch-overlap inside the | ||
| # DP-attention block; prefill-only, matching that recipe's PARALLEL_ARGS | ||
| # scope. Also flips server_sglang.sh's PREFILL_SDMA_ENV to | ||
| # MORI_ENABLE_SDMA=true, required alongside two-batch-overlap. | ||
| enable_two_batch_overlap: true | ||
| no_dp: | ||
| max_running_requests: 64 | ||
| # Small prefill chunks interleave long-context agentic prefills across | ||
| # requests instead of letting one ~100K-token prefill monopolize the | ||
| # engine (the conc>=16 queue-saturation / decode-stall failure mode). | ||
| # Mirrors the single-node DSv4 agentic recipe (dsv4_fp4_mi355x.sh=8192). | ||
| # Was 65280 (255*256, the dsv4 compressor kernel uint16 token cap); 8192 | ||
| # (32*256) stays a page-size multiple well under that cap. | ||
| chunked_prefill_size: 8192 | ||
| # TP8 widens to 16384 to fix the conc>=16 queue-saturation / decode-stall | ||
| # failure mode; TP4 stays at 8192 = 32*256, a page-size multiple well | ||
| # under the dsv4 compressor kernel's uint16 token cap. Mirrors the | ||
| # single-node dsv4-fp4-mi355x-sglang-agentic-mtp recipe's TP-conditional | ||
| # fix (InferenceX PR #2784). | ||
| chunked_prefill_size: "16384 if PREFILL_TP_SIZE == 8 else 8192" | ||
| context_length: 1048576 | ||
| decode: | ||
| mem_fraction_static: 0.85 | ||
| mem_fraction_static: 0.86 | ||
| prefill_round_robin_balance: true | ||
| disagg_decode_enable_radix_cache: false | ||
| dp: | ||
| max_running_requests: 1024 | ||
| cuda_graph_bs_range: "1-128" | ||
| cuda_graph_bs_range: "1-256" | ||
| no_dp: | ||
| max_running_requests: 128 | ||
| cuda_graph_bs_range: "1-128" | ||
|
|
||


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.
Shared DSv4 crash knobs commented out
Medium Severity
The shared
DeepSeek-V4-Proenv block comments out the kernel-routing exports that the surrounding comment still describes as required to avoid a fused-MoE heuristic-dispatch crash at decode. That block is selected byMODEL_NAME, so DeepSeek-V4-Pro-DI loses the same pins even though this PR only retunes AgentX.Reviewed by Cursor Bugbot for commit 07ce2fb. Configure here.