Skip to content

[NVIDIA][AgentX] Retune B300 DeepSeek-V4.1-Flash SGLang aggregate curve on 1014 nightly / [NVIDIA][AgentX] 在 1014 nightly 上重新调优 B300 DeepSeek-V4.1-Flash SGLang 聚合曲线 - #4094

Merged
nvpohanh merged 3 commits into
mainfrom
dsv41flash-fp4-b300-sglang-agentic-1014-retune
Oct 16, 2026
Merged

nvpohanh merged 3 commits into
mainfrom
dsv41flash-fp4-b300-sglang-agentic-1014-retune

Conversation

@shyeh25

@shyeh25 shyeh25 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Retunes dsv41flash-fp4-b300-sglang-agentic-dspark (B300, SGLang, single-node aggregate, DSpark block 5) on lmsysorg/sglang:nightly-dev-cu13-20261014-684fea8a (multiarch digest pinned) with the fastokens tokenizer backend, and replaces the published points with a new set:

Arm Concurrency Key settings
TP4/EP1 1, 4, 8, 16, 20 C1 lpm + one running request; trtllm DSv4 attention at C8/C20; SWA bounded replay + breakable prefill graph at C16
TP2/EP1 16, 32, 48 shortest-prefill-first; bounded replay at C16; trtllm at C48
DEP2 (TP2/EP2, DP attention 2) 64, 256 MegaMoE + flashinfer_mxfp4, trtllm attention, HiCache, shortest-prefill-first, sglang-router consistent hashing
DEP4 (TP4/EP4, DP attention 4) 256 as DEP2 with a smaller HiCache ratio and larger prefill chunks
中文

在 lmsysorg/sglang:nightly-dev-cu13-20261014-684fea8a(固定 multiarch digest)上重新调优 dsv41flash-fp4-b300-sglang-agentic-dspark(B300、SGLang、单节点聚合、DSpark block 5),启用 fastokens tokenizer 后端,并以新的点位替换原有点位:TP4/EP1 并发 1、4、8、16、20;TP2/EP1 并发 16、32、48;DEP2(TP2/EP2、DP attention 2)并发 64、256;DEP4(TP4/EP4、DP attention 4)并发 256。

AI model disclosure

Prepared with Claude Code using claude-opus-5-5 (recipe and config changes, validation, PR text).

🤖 Generated with Claude Code

Repin to nightly-dev-cu13-20261014-684fea8a, enable the fastokens
tokenizer backend, and publish eleven points (TP4 C1/4/8/16/20,
TP2 C16/32/48, DEP2 C64/256, DEP4 C256).

在 1014 nightly 上重新调优 AgentX 曲线:固定 nightly-dev-cu13-20261014-684fea8a,
启用 fastokens tokenizer 后端,发布十一个点(TP4 C1/4/8/16/20、TP2 C16/32/48、
DEP2 C64/256、DEP4 C256)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@shyeh25
shyeh25 marked this pull request as ready for review October 15, 2026 08:17
@shyeh25
shyeh25 requested a review from a team October 15, 2026 08:17
@shyeh25 shyeh25 added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 15, 2026
@claude

claude Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @shyeh25's task in 1m 25s —— View job


Review of PR #4094

  • Read the PR diff
  • Check how recipe overrides resolve to the master-config points
  • Check perf-changelog / image / validation rules
  • Post review

I found one 🟡 issue, posted inline. The DEP2 and DEP4 rows say kv-offloading: none, but their recipe variants turn on SGLang HiCache, which offloads KV to CPU DRAM. Those three points would be published as having no offload. The other HiCache AgentX rows in this file use kv-offloading: dram, kv-offload-backend: { name: hicache }, and the inline comment has a suggestion that does the same here.

Nothing else is blocking:

  • Matrix points: each of the 11 points matches exactly one override_* variant on TP, EP, DP, GPU count and CONC. The C16 pair (TP4 vs TP2) and the C256 pair (DEP2 vs DEP4) stay separate.
  • Image: it is a public Docker Hub tag pinned by digest.
  • Perf changelog: the entry is appended at the end of the file. The XXX PR-link placeholder is accepted by validate_perf_changelog.

I couldn't run infx.matrix.changed because the command needed approval in this environment. It isn't required here, since the PR already adds a changelog entry for the affected config key.

Comment on lines +9181 to +9182
- { tp: 2, ep: 2, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [64, 256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }
- { tp: 4, ep: 4, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }

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.

🟡 WARNING: The DEP2 and DEP4 rows are labeled kv-offloading: none, but their recipe variants (override_dep2_c64, override_dep2_c256, override_dep4_c256) turn on SGLang HiCache: enable-hierarchical-cache: true, hicache-ratio: 4/2, hicache-write-policy: write_back. That is CPU DRAM KV offloading.

Why it matters: These three points will be published as if they used no KV offload, even though they rely on host DRAM. That gives the wrong picture against TP-only arms and other vendors. single_node.validate_recipe only cross-checks KV_OFFLOADING when the recipe sets it, so nothing catches the mismatch. Every other HiCache AgentX row in this file is labeled kv-offloading: dram, kv-offload-backend: { name: hicache } (for example, lines 888–889, 1094, 1123 and 1171–1173).

Fix:

Suggested change
- { tp: 2, ep: 2, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [64, 256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }
- { tp: 4, ep: 4, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }
- { tp: 2, ep: 2, dp-attn: true, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: mtp, conc-list: [64, 256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }
- { tp: 4, ep: 4, dp-attn: true, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: mtp, conc-list: [256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e668c5b: the DEP2 and DEP4 rows now use kv-offloading: dram with kv-offload-backend: { name: hicache }. Server arguments are unchanged.

中文

已在 e668c5b 修正:DEP2 与 DEP4 行改为 kv-offloading: dram 并使用 kv-offload-backend: { name: hicache }。服务器参数不变。

…RAM offload

The DEP2 and DEP4 variants enable SGLang HiCache, so their master rows
use kv-offloading dram with the hicache backend. Server arguments are
unchanged.

DEP2 与 DEP4 配置启用了 SGLang HiCache,因此主配置行改为 kv-offloading dram
并使用 hicache 后端。服务器参数不变。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline finding on kv-offloading: none vs the new HiCache-enabled DEP arms, I also checked whether the new DEP4 (TP4/EP4) c256 point silently loses its default GSM8K accuracy eval because it ties with DEP2's c256 point on concurrency within the same dp-attn group — this is confirmed intentional: mark_eval_entries in infx/matrix/generate.py explicitly groups single-node agentic eval selection by (model, runner, framework, precision, spec-decoding, dp-attn, image), not by tp/ep, per its own docstring, so only one representative per dp-attn group gets picked. Not a bug.

Extended reasoning...

The diff is a benchmark-config repin (new SGLang nightly image, tokenizer backend) plus a retune of srt-slurm recipe overrides and matching master-config search-space rows for a single agentic benchmark; no security-sensitive surface (auth, crypto, permissions) is touched. A confirmed inline finding already flags a real config-correctness issue (kv-offloading field not updated to reflect newly-enabled HiCache on the new DEP arms), which is reason enough to defer to a human regardless. I additionally traced the GSM8K-eval-skip candidate through infx/matrix/generate.py and found it matches documented, intentional grouping behavior rather than a regression.

Comment on lines +9181 to +9182
- { tp: 2, ep: 2, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [64, 256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }
- { tp: 4, ep: 4, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [256], router: { name: sglang-router, version: "0.3.2" }, srt-recipe: agentic.yaml }

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.

🟡 (optional) The new DEP2/DEP4 arms turn on SGLang HiCache but still declare kv-offloading: none, so operators and dashboards get a silently wrong DRAM-offload budget and report for these points. nvidia-master.yaml:9181-9182 keep kv-offloading: none while agentic.yaml's override_dep2_c64/c256 (lines 228-232) and override_dep4_c256 (lines 326-330) set enable-hierarchical-cache: true. Because kv_offloading != 'dram', agentic_dram_offload_gb() (infx/matrix/generate.py:491-493) returns 0, skipping the dram-utilization capacity check, and results/agentic/init.py:192 will record offload_mode=off and allocated_cpu_dram_gb=0 for jobs that actually reserve host DRAM for KV tiering. Fix: set kv-offloading: dram and kv-offload-backend: {name: hicache} on every search-space row whose recipe enables enable-hierarchical-cache, covering both the DEP2 and DEP4 rows here.

Why this was flagged

Trigger: the matrix generator builds points for the dsv41flash-fp4-b300-sglang-agentic-dspark DEP2 (nvidia-master.yaml:9181) and DEP4 (9182) rows, both kv-offloading: none. Their srt-recipe (agentic.yaml override_dep2_c64/c256, override_dep4_c256) newly sets enable-hierarchical-cache: true and hicache-ratio 4/4/2, i.e. real host-DRAM KV cache tiering. generate.py's agentic_dram_offload_gb (line 491-493) short-circuits to 0 whenever kv_offloading != 'dram', so no DRAM capacity is computed or validated against available-cpu-dram-mib, unlike the dram_utilization path CONFIGS.md:211-212 describes. Base behavior: the dp4_c192 arm this replaces never used HiCache, so kv-offloading: none was accurate there; this PR adds real offload without updating the metadata. Downstream, klaud/reporting.py:868 and results/agentic/init.py:192 will publish offload_mode=off and allocated_cpu_dram_gb=0 for these runs.

Verification: nit. nvidia-master.yaml:9181-9182 declare kv-offloading: none for the new DEP2/DEP4 arms, while agentic.yaml enables HiCache host-DRAM tiering for the same arms: override_dep2_c64 (line 228), override_dep2_c256 (line 278), override_dep4_c256 (line 326). generate.py:491-493 returns 0 whenever kv_offloading != "dram", so results/agentic/init.py:192 reports allocated_cpu_dram_gb = 0 and kv_offloading = none despite host-DRAM KV tiering.

@nvpohanh

Copy link
Copy Markdown
Collaborator

/use 38705241139

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

@nvpohanh staged run 38705241139.

This run remains available across future /stage-results requests. Staging the same run ID again updates its staged data. Staging workflow

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] The SGLang cookbook integration of this PR's AgentX config (dsv41flash-fp4-b300-sglang-agentic-dspark) will happen in sgl-project/sglang#44654, in the Agentic Long-Context Deployment section of the DeepSeek-V4.1 cookbook page.

The commands mirror the launch measured in run 38705241139, pinned by this PR's /use comment.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] sgl-project/sglang#44654 has been merged. This PR's AgentX config (dsv41flash-fp4-b300-sglang-agentic-dspark) is now in the Agentic Long-Context Deployment section of the SGLang DeepSeek-V4.1 cookbook: https://docs.sglang.io/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1#agentic-long-context-deployment

The commands mirror the launch measured in run 38705241139, pinned by this PR's /use comment.

@nvpohanh

Copy link
Copy Markdown
Collaborator

As a PR reviewer and CODEOWNER, I have reviewed this and have:

  • Verified that as of the moment of typing this, this is the latest version of PR_REVIEW_CHECKLIST.md
  • Verified that the general code quality meets the InferenceX standard and does not make the code quality any worse.
  • Verified that this PR has passed PR validation. Please link to GitHub Action workflow that shows this.
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this.
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • Verified that every draft model and draft head is served as it ships: the draft that ships with the served checkpoint, at its stored precision, through the pinned upstream image's default handling, with the shipped and effective draft precision recorded in the additional detail section. No submission-side quantization, dtype override, checkpoint substitution, or patch may lower draft precision below that default, regardless of eval results or AL. Explicitly verified that SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not enabled in the effective recipe, including inherited settings; enabling it is prohibited going forward, and historical runs do not grant an exception. See Draft-model precision for what counts as the default and the MLPerf comparison.
  • For agentic workloads: verified that speculative-decoding configs (EAGLE / MTP / draft models) run with simulated synthetic acceptance, with the acceptance-length value taken from the committed golden AL curve in infx/golden_al_distribution/ for that model, thinking mode, and draft length. A submission may choose any supported draft length, but it may not substitute a different acceptance target.
  • Verified against the current MODELS.md that this PR does not submit a deprecated model, scenario, or model-scenario combination.
  • Verified that the model architecture isn't changed with benchmark hacks like using --hf-overrides to skipping indexer for every x layers on models that don't natively support this. As a general rule, we won't accept optimizations that reduces the number of model architecture FLOPs. Anything that makes that same computation run faster is fair game; target/verifier FLOPs at lower precisions is fine, given that the config passes private evals, but this does not permit lowering draft-model or draft-head precision below what ships. As an general north star princple, we should only use optimizations which is used in production by customers that care about accuracy
  • For affected Dynamo TRT-LLM benchmarks, verified that iteration/KV-cache metrics are collected and published under the pinned Dynamo implementation and effective engine settings. Resolve the installed Dynamo version separately from the container tag; use supported metrics controls without requiring KV events. Record the version and configuration evidence in the additional detail section. See verifier Check 17. N/A for unaffected serving paths or frameworks without these Dynamo settings.
  • If an company claims that they support vLLM/SGLang as first class LLM inference engines on their hardware, I have verified that the respective vLLM submission made using upstream https://hub.docker.com/u/vllm docker repo, upstream SGLang https://hub.docker.com/u/lmsysorg docker repo. The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet as supported by vLLM/SGLang community maintainers
  • If an company claims that they support vLLM/SGLang as first class upstream in-tree LLM inference engines on their hardware, I have have verified that the respective vLLM/SGLang submission has been made before additional frameworks (TRT-LLM, ATOM, etc.). The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet.
  • Verified that every affected vLLM/SGLang production serving configuration in this PR, including Dynamo deployments, is documented in the official vLLM recipes and/or the SGLang cookbook, for both single-node and multi-node aggregated and disaggregated serving. The documentation covers production-useful flags, environment variables, and launch commands (including prefill, decode, and router/frontend commands for disaggregation); InferenceX-only benchmark/harness settings are excluded with reasoning in the additional detail section:
    • I linked the corresponding upstream PR in the vLLM recipe repo or SGLang cookbook source repo and verified that it is MERGED before this InferenceX PR merges. An opened, draft, or closed-without-merge upstream PR does not satisfy this requirement. If the matching recipe was already published, I linked the published recipe/cookbook page in the additional detail section below.
  • Verified that this PR does not patch the inference engine or serving stack — the pinned image must run as shipped. This covers .patch files / git apply / patch, inline patches embedded in benchmark scripts (e.g. a python3/sed heredoc that rewrites installed engine sources before serving), in-place edits of site-packages, monkey-patching, overwriting container files, and installing forked/rebuilt engine wheels on top of the pinned image. The only exception is a patch covered by a filled-out waiver at docs/waiver/<PR_NUMBER>.md — named after the PR that introduces the patch and filed in that same PR, stating what is patched, why the unmodified upstream image cannot run this benchmark, the upstream PR/issue link, and the removal plan — which I have linked below in the additional detail section.
  • If this PR uses append-only: true, verified that it only adds generated points or recipe variants inside a selected existing config/scenario and existing same-image visual curve: every previously generated point remains present with the same recipe, no prior point is removed or rerun, and every benchmark-affecting change in the complete diff can affect only the corresponding newly appended points (never an existing point), regardless of which file contains it.
  • If any of the above criteria cannot reasonably be satisfied, I have provided additional reasoning below.
  • Reported measured throughput/E2EL Pareto counts and evidence per affected curve (≥5 points strongly recommended). Below 5 or unverifiable: tag a core maintainer for review; recorded admin bypass required before merge. N/A if no curves are affected. Details.

Additional detail section:

  • Assessed head: e668c5b9153925a0a50f0adfcd2168d7b331afac, the current PR head and the commit of the pinned run. The PR has two commits. e668c5b9 only relabels the DEP2/DEP4 master-config rows as kv-offloading: dram with kv-offload-backend: { name: hicache }, which fixes the bot review finding; server arguments are unchanged.
    • I used the checklist, verifier prompt, CODEOWNERS, thresholds.yaml, MODELS.md and golden AL curves from current upstream main 31387958b694c2a29d443f772efe3e12ddd8afe4.
  • CODEOWNER: nvpohanh is listed for inferencex-e2e/configs/nvidia-master.yaml and for the **/b300-*/ srt-slurm recipe path. perf-changelog.yaml falls under the catch-all.
  • PR validation: Run Sweep 38705241139 ran on e668c5b9 (pull_request, full-sweep-fail-fast) and completed with success on attempt 1. It is pinned with /use 38705241139, the PR's only /use comment. Its 11 bmk_agentic_* artifacts, results_bmk, eval_results_all and server-log artifacts are unexpired (they expire 2027-01-13).
    • All 11 dsv41flash-fp4-b300-sglang-agentic-dspark benchmark jobs succeeded:
      • TP4/EP1 at C1 (canary), C4, C8, C16 and C20.
      • TP2/EP1 at C16, C32 and C48.
      • DEP2 (TP2/EP2, DP attention 2) with HiCache at C64 and C256, behind sglang-router 0.3.2.
      • DEP4 (TP4/EP4, DP attention 4) with HiCache at C256, behind sglang-router 0.3.2.
    • Ten points recorded 0 error-dropped requests. TP2 C48 recorded 1 among 7,353 records: an InvalidInferenceResultError for one response with no content.
    • Both agentic eval / jobs succeeded.
    • The 9 skipped jobs are the empty fixed-sequence, fixed-sequence eval and multi-node lanes; this config is single-node agentic only.
    • The earlier run on e2008cd7 (38704580357) was cancelled when e668c5b9 was pushed.
  • Evals: gsm8k em_strict was 0.9757 at TP2/EP1 C48 (job) and 0.9727 at DEP2 C256 with HiCache (job), n=1319 each, infrastructure_success: true, from eval_results_all.
    • Both clear the default 0.90 threshold in infx/evals/thresholds.yaml on current main, which has no dsv41flash override.
    • Both ran on the PR's image digest (SGLANG_BUILD_COMMIT=684fea8a…) with real DSpark verification. The eval server logs show speculative_algorithm='DSPARK', no SGLANG_SIMULATE_ACC_*, and mean accept lengths of 4.12 (C48) and 4.27 (C256).
  • Image: upstream lmsysorg/sglang:nightly-dev-cu13-20261014-684fea8a@sha256:ddae0e399d3d94f7827f16183301cf8dac4cf0eae0ef25590b7dac5881d713d8.
    • The digest is the tag's multi-arch index on Docker Hub (amd64 561794b6…, arm64 2b9d5dd7…). The B300 nodes ran it on x86_64.
    • It contains SGLang 684fea8af3b11a5b51ec9966c02959a32ad3421c, per SGLANG_BUILD_COMMIT in the logged worker environment.
    • The config is framework: sglang, so the engine-ordering item is satisfied by this submission itself.
  • Chat template: the AIPerf export records endpoint type: chat with streaming: true.
    • The server logs of all 11 points show only POST /v1/chat/completions request traffic, plus GET health, metrics, model and server-info probes and the harness's POST /freeze_gc. They show no /v1/completions or /generate requests.
    • The served revision dba1be0a ships DeepSeek's Python encoding/ reference instead of a chat_template.jinja, so the workers log "No HuggingFace chat template found". That Jinja path is not used: the server auto-detects the deepseekv41 tool-call parser, and at 684fea8a resolve_chat_encoding_spec maps it to the dsv41 spec. serving_chat.py then renders every chat request with encoding_dsv41.encode_messages, SGLang's port of the DeepSeek-V4.1 reference encoder.
    • Thinking is on (SGLANG_DEFAULT_THINKING=1) with reasoning effort high, and the deepseek-v41 reasoning parser is auto-detected.
  • Draft precision: the served draft is the DSpark head bundled in deepseek-ai/DeepSeek-V4.1-Flash rev dba1be0a40aa45a94ad051997016db3960a90277 (mtp.0 to mtp.2, block size 5), the revision pinned in the recipe's identity.model.revision.
    • All 11 benchmark workers and both eval workers record hf_revision: dba1be0a… in their fingerprints. They log "DSpark draft weights are bundled in the target checkpoint; defaulting --speculative-draft-model-path to --model-path".
    • Shipped: from the safetensors headers of shards 44 to 46 at this revision (all 2,401 mtp.* tensors):
      • The attention (wq_a, wq_b, wkv, wo_a, wo_b), shared-expert and main_proj weights are F8_E4M3 with F8_E8M0 scales.
      • The routed experts are MXFP4 (expert_dtype: fp4, packed as I8 with F8_E8M0 scales).
      • The norms, gate weight, markov_head and confidence_head are BF16. attn_sink, the gate biases and the hc_* tensors are F32.
      • The checkpoint quantization_config (fp8, dynamic activations, 32x32 blocks, ue8m0, expert_dtype: fp4) has no exclusions.
    • Effective: the same, through the pinned image's default handling.
      • At 684fea8a, deepseek_v4_dspark.py builds the draft with the target's quant config and wo_a_fp8=False.
      • It dequantizes wo_a from FP8 to BF16 at load (_dequant_fp8_wo_a_streaming), which matches DeepSeek's reference. Every worker logs "Finished streaming dequant fp8 wo_a" and type=DeepseekV4ForCausalLMDSpark, quant=fp8.
    • Routed experts, effective: both MoE paths use 8-bit activations with FP4 weights, as DeepSeek's reference linear does (act_quant to FP8, then fp4_gemm). No path uses W4A4.
      • TP4/EP1 and TP2/EP1 run flashinfer_mxfp4 with flashinfer_mxfp4_moe_precision=default. On SM100 that quantizes activations to MXFP8.
      • DEP2 and DEP4 run moe_a2a_backend=megamoe, which the draft inherits (speculative_moe_a2a_backend=None). With enable_w4a4_mxfp4_megamoe=False and speculative_enable_w4a4_mxfp4_megamoe=None, MegaMoE uses its default fp8xfp4 MMA.
    • KV cache: FP8 for both target and draft, which is the image default. No point sets --kv-cache-dtype, and every worker logs kv_cache_dtype=fp8_e4m3 and speculative_draft_kv_cache_dtype=None.
    • The logged server args of all 13 workers show speculative_draft_model_quantization=None, speculative_draft_model_revision=None, quantization=None, dtype=auto and speculative_draft_model_path equal to the target --model-path.
    • SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not set anywhere: not in the recipe, the master row or the launch path, and not in any file of the 13 extracted server-log archives, including the logged worker environments. It defaults to EnvBool(False) in environ.py at the pinned SHA.
  • Golden AL: infx/golden_al_distribution/dsv41flash_dspark.yaml gives 3.51 for thinking_on with draft length 5.
    • The worker environment of every one of the 11 benchmark points logs SGLANG_SIMULATE_ACC_LEN=3.51, SGLANG_SIMULATE_ACC_METHOD=match-expected and SGLANG_SIMULATE_ACC_TOKEN_MODE=real-draft-token, with SGLANG_DEFAULT_THINKING=1.
    • These values are injected by infx/srt_slurm/synthetic_acceptance.py from the golden curve; the recipe does not set them.
    • The mean accept len in the decode logs is 3.508 to 3.511 on every point.
  • MODELS.md: on current main, dsv41flash agentic coding is active, with SGLang DSpark arms per SKU, and the model has no deprecated scenario.
    • The HiCache pools also fit the MODELS.md CPU DRAM policy share for HGX B300 (3 TB per server). DEP2 allocates up to 490.8 GB of host KV pools on 2 of 8 GPUs (share 750 GB); DEP4 allocates 1,066.3 GB on 4 of 8 GPUs (share 1,500 GB).
  • No architecture hacks: there is no --hf-overrides, and json_model_override_args='{}'. enable_deepseek_v4_fp4_indexer=False, so the indexer uses the image's default path.
    • --enable-decoder-swa-bounded-replay (TP4 C16 and TP2 C16) is DeepSeek-V4.1's own deployment optimization, not a benchmark hack.
    • --dsv4-attn-backend trtllm only selects the kernel for DeepSeek-V4's native sparse attention.
    • MegaMoE fuses dispatch, expert GEMMs and combine over the same experts. SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK=16384 only sizes its buffers (default 8192).
    • SGLANG_ENABLE_DP_SPEC_PREFILL_COORDINATION=1 only coordinates which DP ranks run verify and prefill in the same step. SGLANG_RAGGED_VERIFY_MODE=static restates the default in environ.py, which that coordination requires.
    • --tokenizer-backend fastokens swaps the tokenizer implementation (fastokens 0.3.4 ships in the image); --schedule-policy, --prefill-decode-interval and the prefill CUDA-graph backend only change scheduling and graph capture.
    • The per-rank Engram host tables only move where the Engram tables live. swa-prefix-tails sizes how much SWA prefix tail is retained for prefix reuse; the sliding window itself is unchanged.
  • Dynamo TRT-LLM metrics: N/A. This is a direct framework: sglang deployment with no Dynamo and no TRT-LLM worker. SGLang metrics are on (--enable-metrics).
  • Recipe publication (merged): every point in this PR is documented in the SGLang cookbook. sgl-project/sglang#44654 added them and is MERGED (mergedAt: 2026-10-16T04:45:08Z, merge commit fd4b75c6960002d341cbb7bb127de7631770c87a). The data file on sglang main is byte-identical to the one at the merge commit.
    • Published page: https://docs.sglang.io/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1#agentic-long-context-deployment (hardware B300, checkpoint deepseek-ai/DeepSeek-V4.1-Flash).
    • Data: docs/src/snippets/agentx/deepseek-ai/deepseek-v4_1.jsx records this PR's commit e668c5b9 and run 38705241139 (status: verified-pr) as the source of four B300 deployments: "Agg TP4", "Agg TP2", "Agg DEP2" and "Agg DEP4". It lists the same image digest.
    • B300 "Agg TP4" (C1, C4, C8, C16, C20), C1 worker: python3 -m sglang.launch_server --model-path deepseek-ai/DeepSeek-V4.1-Flash --served-model-name deepseek-ai/DeepSeek-V4.1-Flash --tensor-parallel-size 4 --expert-parallel-size 1 --speculative-algorithm DSPARK --speculative-dspark-block-size 5 --chunked-prefill-size 16384 --cuda-graph-max-bs-decode 1 --max-running-requests 1 --mem-fraction-static 0.7 --prefill-decode-interval 16 --schedule-policy lpm --swa-prefix-tails 128 --tokenizer-backend fastokens --reasoning-parser auto --tool-call-parser auto --trust-remote-code --watchdog-timeout 3600 --weight-loader-prefetch-checkpoints.
      • C4 to C20 use --cuda-graph-max-bs-decode 64 and drop --schedule-policy.
      • C8 and C20 add --dsv4-attn-backend trtllm --cuda-graph-backend-prefill disabled. C16 adds --cuda-graph-backend-prefill breakable --enable-decoder-swa-bounded-replay.
      • Per point (C4 / C8 / C16 / C20): --max-running-requests 8 / 16 / 32 / 40, --prefill-decode-interval 192 / 192 / 128 / 96, and --swa-prefix-tails 256 / 512 / 512 / 512.
    • B300 "Agg TP2" (C16, C32, C48), worker: the C4 command with --tensor-parallel-size 2 --schedule-policy shortest-prefill-first.
      • C16 adds --cuda-graph-backend-prefill breakable --enable-decoder-swa-bounded-replay. C48 adds --dsv4-attn-backend trtllm --cuda-graph-backend-prefill disabled.
      • Per point (C16 / C32 / C48): --mem-fraction-static 0.7 / 0.85 / 0.8, --max-running-requests 32 / 64 / 64, --prefill-decode-interval 96 / 96 / 64, and --swa-prefix-tails 1024 / 2048 / 3072.
    • B300 "Agg DEP2" (C64, C256), worker: the TP2 command with --expert-parallel-size 2, plus the flags below. It also sets SGLANG_ENABLE_DP_SPEC_PREFILL_COORDINATION=1, SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK=16384 and SGLANG_RAGGED_VERIFY_MODE=static.
      • Parallelism and routing: --data-parallel-size 2 --enable-dp-attention --enable-dp-lm-head --enable-dp-attention-local-control-broadcast --load-balance-method total_requests --tokenizer-worker-num 8.
      • Kernels and batching: --chunked-prefill-size 32768 --disable-prefill-cuda-graph --dsv4-attn-backend trtllm --moe-a2a-backend megamoe --moe-runner-backend flashinfer_mxfp4 --mem-fraction-static 0.82 --swa-prefix-tails 3072.
      • HiCache: --enable-hierarchical-cache --hicache-io-backend direct --hicache-mem-layout page_first_direct --hicache-ratio 4 --hicache-write-policy write_back.
      • Per point (C64 / C256): --cuda-graph-max-bs-decode 96 / 128, --max-running-requests 192 / 256, and --prefill-decode-interval 48 / 16.
    • B300 "Agg DEP4" (C256), worker: the DEP2 command with --tensor-parallel-size 4 --expert-parallel-size 4 --data-parallel-size 4 --chunked-prefill-size 65536 --cuda-graph-max-bs-decode 64 --hicache-ratio 2 --max-running-requests 256 --mem-fraction-static 0.8 --prefill-decode-interval 32.
    • B300 "Agg DEP2" and "Agg DEP4", router: python3 -m sglang_router.launch_router --policy consistent_hashing --request-id-headers x-correlation-id --dp-aware --connect-timeout-secs 900 --request-timeout-secs 14400 --disable-health-check --disable-retries --worker-urls ....
      • sglang-router 0.3.2 ships in the pinned image: the worker's package list shows the image's sglang_router-0.3.2 wheel, and the harness installs no router. That matches the master-config pin.
      • "Agg TP4" and "Agg TP2" have no router.
    • Environment, all deployments: SGLANG_DEFAULT_THINKING=1, SGLANG_DSV41_REASONING_EFFORT=high, SGLANG_ENABLE_DSV41_ENGRAM_HOST_TABLE=1, SGLANG_DSV41_ENGRAM_HOST_TABLE_LAYOUT=per_rank, SGLANG_TIMEOUT_KEEP_ALIVE=900 and NCCL_CUMEM_ENABLE=1.
    • Comparison with the run: I decoded the cookbook command for each of the 11 points from the data file at fd4b75c6, using the cookbook component's own decoder. I then diffed each against the logged srt-slurm launch command, router command and worker environment in run 38705241139. They are identical except for the InferenceX-only settings listed below.
      • The pinned image auto-resolves quantization and the remaining kernel backends. The logs show quantization=None, which falls back to the checkpoint's FP8/MXFP4 quantization_config, plus attention_backend=dsv4, moe_runner_backend=flashinfer_mxfp4 (set explicitly only on DEP2/DEP4) and fp8_gemm_runner_backend=flashinfer_cutedsl.
      • Under DP attention, SGLang splits --chunked-prefill-size and --max-running-requests across the attention-DP ranks. The logs show a per-rank chunked_prefill_size of 16384 on DEP2 and DEP4, and a per-rank max_running_requests of 96 / 128 on DEP2 C64 / C256 and 64 on DEP4. Each equals that point's decode graph batch. The recipe and the cookbook pass the same CLI values.
    • Excluded as InferenceX-only:
      • --enable-metrics on the worker and --prometheus-port/--prometheus-host on the router. They are the Prometheus export that AIPerf scrapes for result collection (AIPERF_REQUIRED_SERVER_METRIC_PREFIX=sglang:) and do not affect scheduling or kernels.
      • --model-path /model, the cluster's local copy of rev dba1be0a. The cookbook uses the Hugging Face ID.
      • --host, --port, --nccl-port, worker URLs, CUDA_VISIBLE_DEVICES and HEAD_NODE_IP. These are srt-slurm process placement; the cookbook uses placeholders.
      • PYTHONNOUSERSITE and PYTHONUNBUFFERED, which only set Python path isolation and log buffering in the container.
      • SGLANG_CUDA_COREDUMP_BEFORE_CRASH=0 and SGLANG_PYSPY_DUMP_BEFORE_CRASH=0. These srt-slurm crash-diagnostic toggles only control dumps after a crash.
      • SGLANG_TORCH_PROFILER_DIR and the vLLM-only VLLM_* variables from the runtime environment. They only name profiler output and vLLM timeouts; no profiling runs, and SGLang ignores VLLM_*.
      • SGLANG_SIMULATE_ACC_*, the synthetic acceptance control. The cookbook discloses it as "synthetic-acceptance".
      • The B300 cluster's network and cache environment: NCCL_SOCKET_IFNAME, NCCL_DEBUG=WARN, NVSHMEM_BOOTSTRAP_UID_SOCK_IFNAME, OMPI_MCA_* and the HF_* cache paths. The recipe, master config and runner do not set them. NCCL_CUMEM_ENABLE=1 comes from the same environment and is mirrored in the cookbook.
      • The image's own build metadata: NCCL_VERSION, SGLANG_BUILD_COMMIT, SGLANG_BUILD_URL, SGLANG_IMAGE_TAG and SGLANG_RUST_BUILD_MODE. Any user of the image gets them.
      • The AIPerf client settings (CONC, AGENTIC_WARMUP_GRACE_PERIOD, AIPERF_*), the master row's dram-utilization and the srt-slurm health_check timeout.
  • Code quality: against main, the diff only changes this recipe and its master-config row and appends one changelog entry. The changelog entry uses the XXX pr-link placeholder that validate_perf_changelog.py accepts, and check-changelog passed in the pinned run.
    • The master row keeps the srt-recipe layout. It has four search-space rows: TP4/EP1, TP2/EP1, and DEP2 and DEP4 with HiCache behind sglang-router 0.3.2. Each of the 11 points matches exactly one override_* variant.
    • Admission never exceeds the captured decode graph batch.
      • The TP points admit 1 / 8 / 16 / 32 / 40 (TP4) and 32 / 64 / 64 (TP2) requests, against a decode graph batch of 1 at C1 and 64 elsewhere. DEP2 admits 96 / 128 per rank against graph batches of 96 / 128, and DEP4 admits 64 per rank against 64.
      • The largest per-rank decode batch in the 11 benchmark logs was 94, at DEP2 C256. Every decode log line of the TP points shows cuda graph: True; on the DP points, 29 of 20,370 decode log lines show an eager batch.
    • The only merge conflict with current main (31387958) is in perf-changelog.yaml, and this PR's change to it is append-only: the first 9,845 lines are byte-identical to the merge base b301e682, and one entry is appended. nvidia-master.yaml merges cleanly.
    • fix(launch): request explicit Slurm memory for single-node jobs and fit host pools to measured DRAM #3804 (now on main) caps a single-node srun step on b300-dsxe at its GPUs' share of node DRAM: 970.8 GiB for 2 GPUs and 1,941.5 GiB for 4. The DEP points fit well under that cap. DEP2 uses about 646 GiB of host pools (457 GiB HiCache plus 189 GiB of per-rank Engram host tables), and DEP4 uses about 1,182 GiB (993 GiB plus 189 GiB).
  • No engine patches: the diff adds no patch files, git apply, heredoc rewrites, site-packages edits or wheel installs. The launch path has no setup script. sglang-router comes from the image. The pinned image runs as shipped, so no waiver is needed.
  • append-only: N/A, because the single new changelog entry does not use append-only: true.
  • Pareto: one curve, dsv41flash / agentic-coding / b300_sglang / fp4 / run 38705241139. No other config maps to the B300 SGLang series. It was counted with infx.workflows.pareto_coverage, with x = E2EL in seconds and y = total token throughput per GPU.
    • Source: the 11 bmk_agentic_* artifacts of the run (request_metrics.throughput.per_gpu.total_tput_tps and request_metrics.latency.e2el). All 11 points share the same image.
    • P90 E2EL frontier: 9 of 11 points (TP4 C8/C16/C20, TP2 C16/C32/C48, DEP2 C64, DEP4 C256, DEP2 C256). TP4 C1 and C4 are dominated by TP4 C8.
    • P75 E2EL frontier: 9 of 11 points, the same nine. TP4 C1 and C4 are again dominated by TP4 C8.
    • Per point (tok/s/GPU, P90 E2EL s, P75 E2EL s):
      • TP4: C1 7847.7, 8.208, 4.519; C4 9775.1, 6.342, 3.001; C8 16782.9, 6.034, 2.845; C16 29228.6, 6.915, 2.874; C20 38022.2, 7.534, 3.411.
      • TP2: C16 56102.7, 8.941, 3.699; C32 109422.2, 14.471, 6.367; C48 146139.9, 19.247, 8.070.
      • DEP2: C64 208023.6, 19.597, 9.663; C256 401606.7, 50.405, 20.587.
      • DEP4: C256 324772.0, 28.298, 12.185.
    • Helper output (python -m infx.workflows.pareto_coverage from inferencex-e2e/ on upstream main, fed the 11 points above):
      • dsv41flash/agentic-coding/b300_sglang/fp4/run-38705241139/p90 is PASS with measuredPoints: 11, invalidPoints: 0, frontierPoints: 9.
      • .../p75 is PASS with measuredPoints: 11, invalidPoints: 0, frontierPoints: 9.
    • Dashboard: https://inferencex.semianalysis.com/inference?unofficialRun=38705241139
  • NVIDIA overview (advisory): the NVIDIA recipes overview has a DeepSeek-V4.1-Flash row in the Framework Recipes table. Its SGLang cell links to https://docs.sglang.io/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1, the cookbook page that documents these B300 points.

Signed: nvpohanh

@github-actions

Copy link
Copy Markdown
Contributor

✅✅✅ Verdict: PASS ✅✅✅

Passed and not applicable checks

✅ Check 0 (CODEOWNER): PASS — nvpohanh is a named owner of inferencex-e2e/configs/nvidia-master.yaml and the **/b300-*/ srt-slurm recipe path; perf-changelog.yaml falls under the catch-all.

✅ Check 1 (Passing sweep on in-PR commit): PASS — this config is agentic-only (fixed-sequence single-node */ and eval / lanes are empty and skipped); all 11 agentic / jobs, the canary and both agentic eval / jobs are success on in-PR head e668c5b9 in run 38705241139 (pull_request, attempt 1).

✅ Check 2 (Evals): PASS — eval_results_all gives gsm8k em_strict 0.9757 (TP2 C48) and 0.9727 (DEP2 C256 HiCache), n=1319 each, infrastructure_success: true, above the 0.90 default; both eval jobs ran on the PR's nightly-dev-cu13-20261014-684fea8a@sha256:ddae0e39… image.

✅ Check 3 (Upstream recipe): PASS — sgl-project/sglang#44654 is MERGED (2026-10-16T04:45:08Z, fd4b75c6); its deepseek-v4_1.jsx data has B300 "Agg TP4/TP2/DEP2/DEP4" entries with the same image, every per-point override, the env vars, and the sglang-router consistent_hashing command, matching the recipe at the pinned SHA; the excluded settings are Prometheus export, placement, and harness settings only.

✅ Check 4 (Reuse command): PASS — /use 38705241139 posted by nvpohanh (COLLABORATOR).

✅ Check 5 (Checklist template): PASS — all 18 items of the current PR_REVIEW_CHECKLIST.md template are present and checked.

✅ Check 6 (Upstream image / ordering): PASS — framework: sglang on established B300 uses upstream lmsysorg/sglang:nightly-dev-cu13-20261014-684fea8a@sha256:ddae0e39…; open-source engine entry, so the ordering rule is satisfied.

✅ Check 7 (Deprecated models): PASS — MODELS.md lists dsv41flash agentic coding as active (SGLang DSpark arms per SKU) with no deprecated scenarios; review date 2026-10-16.

✅ Check 8 (Architecture hacks): PASS — no --hf-overrides, --json-model-override-args, or model-file edits; --enable-decoder-swa-bounded-replay is DeepSeek-V4.1's native, train-aware deployment mode; other flags are kernel, scheduling, and cache selections.

✅ Check 9 (Chat template): PASS — the AIPerf export for the run records endpoint type: chat, streaming: true, and server metrics show only POST /v1/chat/completions traffic.

✅ Check 10 (Engine patches): PASS — the diff adds no patch files, git apply, heredoc source rewrites, or engine wheel installs; the recipe has no setup script and the image runs as shipped.

✅ Check 11 (Golden AL): PASS — dsv41flash_dspark.yaml gives 3.51 for thinking_on at draft length 5; synthetic_acceptance.py injects SGLANG_SIMULATE_ACC_LEN=3.51 (with match-expected and real-draft-token), confirmed in the run's submission and job logs.

➖ Check 12 (Append-only): N/A — the new changelog entry does not set append-only: true.

✅ Check 13 (Draft precision): PASS — the draft is the DSpark head bundled in DeepSeek-V4.1-Flash rev dba1be0a, loaded through the pinned image's defaults (deepseek_v4_dspark.py at 684fea8a reuses the target quant config with the default wo_a FP8-to-BF16 dequant); no draft quantization, dtype, or KV-cache override in the recipe or logs; SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is unset in the recipe, master row, and launch path, and defaults to EnvBool(False) at the pinned SHA.

✅ Check 14 (Pareto coverage): PASS — one curve dsv41flash/agentic-coding/b300_sglang/fp4/run-38705241139, recomputed with infx.workflows.pareto_coverage from the 11 bmk_agentic_* artifacts (same image): 9 frontier points at P90 and 9 at P75.

✅ Check 15 (PR description): PASS — the body's image, fastokens backend, arms, concurrency points, and per-arm settings (lpm/1 request at TP4 C1, trtllm at TP4 C8/C20 and TP2 C48, bounded replay at C16, MegaMoE plus HiCache plus consistent hashing on DEP2/DEP4, smaller HiCache ratio and larger chunks on DEP4) match the pinned recipe.

✅ Check 16 (NVIDIA overview): PASS — the NVIDIA overview Framework Recipes table has a DeepSeek-V4.1-Flash row with an SGLang ✅ linking the SGLang cookbook page.

➖ Check 17 (Metrics publication): N/A — direct framework: sglang deployment with no Dynamo or TRT-LLM worker.

Assessed commit: e668c5b9153925a0a50f0adfcd2168d7b331afac.

…glang-agentic-1014-retune

Resolve the inferencex-e2e/perf-changelog.yaml append conflict by keeping
main's entries and re-appending this PR's entry. [skip-sweep]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nvpohanh nvpohanh removed the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 16, 2026
@nvpohanh
nvpohanh merged commit 448ca30 into main Oct 16, 2026
25 checks passed
@nvpohanh
nvpohanh deleted the dsv41flash-fp4-b300-sglang-agentic-1014-retune branch October 16, 2026 06:38
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