Skip to content

[Doc] [AMD] cookbook: Align DeepSeek-V4 MI355X AgentX recipe with InferenceX #4315 - #45268

Open
chunfangamd wants to merge 1 commit into
sgl-project:mainfrom
chunfangamd:docs/deepseek-v4-mi355x-inferencex-4315
Open

chunfangamd wants to merge 1 commit into
sgl-project:mainfrom
chunfangamd:docs/deepseek-v4-mi355x-inferencex-4315

Conversation

@chunfangamd

@chunfangamd chunfangamd commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

InferenceX #4315 needs its MI355X AgentX serving configuration documented in the SGLang cookbook. #45070 aligned §3.6 with InferenceX #4245, whose recipe is byte-identical to #4315's; #4315 only moves the image from -20261016 to -20261019. Comparing every effective arm of the #4315 recipe with §3.6 still found server settings that §3.6 has never carried.

Summary

  • Aligns the DeepSeek-V4-Pro-0813 MI355X AgentX cookbook (§3.6) with [AMD][MI35X] 1019 DSV4 sglang mtp agentic SemiAnalysisAI/InferenceX#4315.
  • Names the image Fix zhyncs amd ci test #4315 pins, lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261019, and links the submitted recipe at fd09dd949a18.
  • Adds SGLANG_DEFAULT_THINKING=1, SGLANG_DSV4_REASONING_EFFORT=high and HSA_NO_SCRATCH_RECLAIM=0 to all three commands, GPU_MAX_HW_QUEUES=2 to the TP8 command and GPU_MAX_HW_QUEUES=5 to the DP8 command. The MegaMoE command already set GPU_MAX_HW_QUEUES=5.
  • Adds the sizing rule: --max-running-requests at twice the concurrency, --cuda-graph-max-bs-decode at the same value capped at 128.
  • Adds --dp-aware to the cache_aware router guidance. Without it the router registers one worker per server, so it cannot place a session on the DP rank that holds its prefix.

Source of truth

  • InferenceX PR: [AMD][MI35X] 1019 DSV4 sglang mtp agentic SemiAnalysisAI/InferenceX#4315
  • InferenceX head reviewed: fd09dd949a18ef2f3ff2912411d980b3f6b810a1 (rechecked unchanged before opening this PR)
  • SGLang main base: ab580b2e060059c0f8387b598a9f648dcec13f93
  • Sweep/eval run: run 39258204219. GitHub reports conclusion success at cb80a92c4a4c, with all nine agentic jobs (c1–c384) and both eval-only jobs (c48, c384) success on the -20261019 image. The recipe file and the dsv4-fp4-mi355x-sglang-agentic-mtp entry are byte-identical between cb80a92c4a4c and the head; the head's sweep (run 39329752188) reuses it via /reuse-sweep-run. I did not rerun any benchmark or eval.

Coverage

Each row is one server configuration of the effective #4315 recipe (base merged with the point's override):

#4315 arm Topology §3.6 source Missing on main This PR
c1, c4 TP8, breakable prefill graphs TP8 command + adjustments sizing, HSA_NO_SCRATCH_RECLAIM=0, GPU_MAX_HW_QUEUES=2, thinking defaults match
c16 TP8 + prefill CP TP8 command + adjustments same match
c32, c48 TP8 + prefill CP + HiCache TP8 command + HiCache flags same match
c128 TP8 + DP8 attention, EP1, HiCache DP8 command sizing, HSA_NO_SCRATCH_RECLAIM=0, GPU_MAX_HW_QUEUES=5, thinking defaults, router --dp-aware match
c128 TP8 + DP8 + EP8 MegaMoE, EPLB, HiCache MegaMoE command sizing, HSA_NO_SCRATCH_RECLAIM=0, thinking defaults, router --dp-aware match
c256 same, router --balance-abs-threshold 32 MegaMoE command same match
c384 same, interval 20, decode MTPR 1024, fixed-slot cap 2047 MegaMoE command + c384 adjustment same match

main already matched the rest, including every #4315 delta from #45070: SGLANG_HIP_DSV4_C4_INDEXER_ROWGROUP=1, DP chunked prefill 131072, FlyDSL MTPR 16384, decode MTPR 512 / fixed-slot cap 1023 (1024 / 2047 at c384), SGLANG_EPLB_P2P_BATCH_CHUNK_SIZE=7, and the MegaMoE interval of 40 (20 at c384).

Recipe fields with no cookbook flag because SGLang main resolves them identically:

  • --speculative-num-steps 1 --speculative-eagle-topk 1 --speculative-num-draft-tokens 7: _handle_dspark sets steps 1, top-k 1 and draft tokens to --speculative-dspark-block-size + 1.
  • --data-parallel-size 8 --enable-dp-attention: _handle_deprecated_dp_attention resolves it to --attn-dp-size 8.
  • --served-model-name: equals the --model-path default.

Benchmark-only controls such as synthetic acceptance and AIPerf orchestration were intentionally excluded:

  • Benchmark env: AIPERF_*, CONC, KV_OFFLOADING, AGENTIC_WARMUP_GRACE_PERIOD. AIPERF_HTTP_X_SMG_ROUTING_KEY_FROM_CORRELATION_ID sets X-SMG-Routing-Key, which only the consistent_hashing and manual router policies read, not cache_aware.
  • SGLANG_TIMEOUT_KEEP_ALIVE=900: Uvicorn's idle keep-alive; the recipe sets it to outlast AIPerf's pooled connections.
  • PYTHONNOUSERSITE=1: container hygiene.
  • --enable-metrics: server metrics that AIPerf scrapes (AIPERF_REQUIRED_SERVER_METRIC_PREFIX).
  • Router: --request-id-headers x-correlation-id (AIPerf's tracing header), --connect-timeout-secs 900 and --request-timeout-secs 14400 (sized for the warmup drain), --disable-health-check and --disable-retries (measurement integrity).
  • Synthetic acceptance and golden-AL injection come from the harness, not the recipe.

Image: lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261019 is active in the public lmsysorg/sglang-rocm repository (amd64 digest sha256:8cb29fc407c2e46bdb1866c5edb91f109ac1acbbcb6905089beaa6c79b0813a2, pushed 2026-10-19). Its image config shows a build from SGLang main with AITER 2bb549102ba2 and MORI f39fa765e897. It sets HSA_NO_SCRATCH_RECLAIM=1, which the recipe overrides, and does not set GPU_MAX_HW_QUEUES.

Left unchanged: the Install example and dockerImages.mi355x / mi300x stay on -20261016, because they serve Deploy-panel cells that #4315 did not rerun; §3.6 names -20261019 itself. #45090 removes the retired SGLANG_ENABLE_UNIFIED_RADIX_TREE=1 lines from these commands, and the new variables sit at the end of each block so the two PRs touch separate lines.

Validation

  • git diff --check: pass
  • node docs/scripts/check_cookbook_configs.mjs and node --test docs/scripts/tests/*.test.mjs: pass (38/38)
  • mint broken-links --check-anchors --check-redirects (mint 4.2.559, the CI pin): pass
  • mint validate: fails on main and on this branch with the same pre-existing error, the stray }, at line 100 of docs/src/snippets/configs/popular-models.jsx (also noted in [Doc] cookbook: Refresh SemiAnalysis AgentX launches with twelve open InferenceX PRs #45111). With that line removed in a scratch copy that is not part of this PR, it passes.
  • SKIP=no-commit-to-branch pre-commit run --files docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4.mdx: pass (codespell, whitespace, end-of-file, merge-conflict, private-key). --all-files was not run locally.
  • bash -n on the four §3.6 command blocks: pass, with no duplicate variable or flag in any block.
  • A script resolved the nine Fix zhyncs amd ci test #4315 arms and compared their server flags, environment and router flags with §3.6 plus its adjustment rules: 55 gaps on main, 0 on this branch.
  • Local rendered-page review (mint dev): pass. §3.6 renders, the four code blocks' rendered text is byte-identical to the source, and the page shows no client errors.

Accuracy Tests

None. Documentation only.

Speed Tests and Profiling

None. No serving or benchmark runs were performed for this PR; the numbers live in the linked InferenceX run.

Scope

  • Documentation only: §3.6 of docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4.mdx. No SGLang runtime code, config snippets, other hardware or other DeepSeek-V4 variants changed.

CI States

Latest PR Test (Base): ✅ Run #39348424794
Latest PR Test (Extra): ❌ Run #39348424740
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.

…erenceX sgl-project#4315

Section 3.6 now covers every production server setting of the nine
InferenceX sgl-project#4315 arms (head fd09dd949a18):

- Name the image the submission pins,
  lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261019, and link the
  submitted recipe.
- Add SGLANG_DEFAULT_THINKING=1, SGLANG_DSV4_REASONING_EFFORT=high and
  HSA_NO_SCRATCH_RECLAIM=0 to all three commands, GPU_MAX_HW_QUEUES=2 to
  the TP8 command and GPU_MAX_HW_QUEUES=5 to the DP8 command.
- Add the sizing rule: --max-running-requests at twice the concurrency,
  --cuda-graph-max-bs-decode at the same value capped at 128.
- Add --dp-aware to the cache_aware router guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 20, 2026

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant