Skip to content

Add GLM-5.2 NVFP4 B300 SGLang single-node agentic benchmarks#2268

Open
Oseltamivir wants to merge 5 commits into
mainfrom
add-glm5.2-fp4-b300-sglang-agentic
Open

Add GLM-5.2 NVFP4 B300 SGLang single-node agentic benchmarks#2268
Oseltamivir wants to merge 5 commits into
mainfrom
add-glm5.2-fp4-b300-sglang-agentic

Conversation

@Oseltamivir

Copy link
Copy Markdown
Collaborator

Summary

Adds glm5.2-fp4-b300-sglang-agentic — GLM-5.2 NVFP4 single-node agentic (AgentX) benchmarks on B300 with SGLang, derived from the SGLang cookbook GLM-5.2 B300 NVFP4 single-node recipes. STP only — the cookbook's low-latency/balanced cells use EAGLE MTP, which is deliberately not wired up yet (an -mtp variant is a natural follow-up).

Two arms form the throughput-vs-interactivity pareto frontier:

  • Low-latency (TP8): cookbook low-latency levers — --kv-cache-dtype fp8_e4m3, --bf16-gemm-backend cutedsl, --max-prefill-tokens 8192 — at conc [1, 2, 4, 8, 16, 32]
  • High-throughput (TP8 + DP8 attention-DP): cookbook high-throughput cell, fronted by sglang-router (consistent_hashing on x-correlation-id, same pattern as the DSv4 B300 agentic recipe) so multi-turn sessions keep radix-cache affinity to their DP rank, at conc [48, 64, 96, 128, 192, 256, 512]

Conc lists are disjoint between arms so exp-names stay unique.

Changes

  • configs/nvidia-master.yaml: new glm5.2-fp4-b300-sglang-agentic config (agentic section); image pinned to lmsysorg/sglang:v0.5.15.post1-cu130 (verified to ship --bf16-gemm-backend and sglang-router 0.3.2)
  • benchmarks/single_node/agentic/glm5.2_fp4_b300_sglang.sh: new benchmark script (modeled on dsv4_fp4_b300_sglang.sh)
  • benchmarks/benchmark_lib.sh: add glm5.2* to the unfiltered agentic corpus branch — GLM-5.2 is a 1M-context model (max_position_embeddings: 1048576)
  • perf-changelog.yaml: changelog entry appended at tail

Validation

  • Local: generate_sweep_configs.py full-sweep --model-prefix glm5.2 emits 13 valid entries; 223 matrix_logic tests pass; changelog parses and config key resolves
  • On-node (b300-nv, exact server commands from the script):
    • TP8 low-latency arm: server ready ~5 min, smoke completion OK, 8k/1k conc 16: 10,043 total tok/s, mean TPOT 12.1 ms
    • DP8 attention-DP arm + router: server + router ready, traffic served through router, 8k/1k conc 256: 34,429 total tok/s, mean TPOT 48.9 ms
  • Weights pre-staged at /data/models/GLM-5.2-NVFP4 (465 GB, 47 shards, matches the launcher's writable-models path); squash image pre-imported at /data/squash/lmsysorg_sglang_v0.5.15.post1-cu130.sqsh

🤖 Generated with Claude Code

Add glm5.2-fp4-b300-sglang-agentic from the SGLang cookbook B300 NVFP4
single-node recipes (STP only, no spec decoding):

- Low-latency arm: TP8 with fp8 KV cache and cutedsl bf16 GEMM backend,
  conc [1, 2, 4, 8, 16, 32]
- High-throughput arm: TP8/DP8 attention-DP behind sglang-router
  consistent hashing for session affinity, conc [48-512]
- Image: lmsysorg/sglang:v0.5.15.post1-cu130 (ships sglang-router 0.3.2)
- benchmark_lib.sh: glm5.2* added to the unfiltered agentic corpus
  branch (GLM-5.2 is a 1M-context model)

Both arms validated on b300-nv: LL conc16 8k1k 10,043 total tok/s
(TPOT 12.1 ms); HT conc256 34,429 total tok/s (TPOT 48.9 ms). Weights
pre-staged at /data/models/GLM-5.2-NVFP4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Oseltamivir

Copy link
Copy Markdown
Collaborator Author

Note on the failing check-changelog: this is a pre-existing regression on main, not specific to this PR. #1947 changed mark_eval_entries(..., include_agentic=args.evals_only or args.all_evals), and process_changelog.py always runs an --evals-only pass per changelog entry — so any changelog entry resolving to single-node agentic configs now emits agentic eval rows that ChangelogMatrixEntry.evals (fixed-seq-len schema) rejects. #2267 (fix/agentic-eval-bucket-dispatch) adds the dedicated agentic_evals bucket and fixes this path.

Meanwhile, the full agentic sweep for this PR's configs was dispatched directly against e2e-tests.yml (the documented one-off path, which is unaffected): run 29634867738full-sweep --config-files configs/nvidia-master.yaml --model-prefix glm5.2, 13 agentic jobs (TP8 conc 1–32, TP8/DP8 dp-attn conc 48–512), no evals.

Once #2267 merges I'll update this branch from main (the changelog-touching merge re-fires the label-gated sweep) so the official run-sweep check goes green.

Comment on lines +9902 to +9915
glm5.2-fp4-b300-sglang-agentic:
image: lmsysorg/sglang:v0.5.15.post1-cu130
model: nvidia/GLM-5.2-NVFP4
model-prefix: glm5.2
runner: cluster:b300-nv
precision: fp4
framework: sglang
multinode: false
scenarios:
agentic-coding:
- dram-utilization: 0.80
search-space:
- { tp: 8, kv-offloading: none, conc-list: [1, 2, 4, 8, 16, 32] }
- { tp: 8, dp-attn: true, kv-offloading: none, conc-list: [48, 64, 96, 128, 192, 256, 512], router: { name: sglang-router, version: "0.3.2" } }

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.

🔴 The high-throughput arm ({ tp: 8, dp-attn: true, ... }) omits the ep key, so generate_sweep_configs.py defaults EP_SIZE to 1, and glm5.2_fp4_b300_sglang.sh unconditionally passes --ep-size $EP_SIZE to the server. This launches attention-DP (dp=8) with ep-size=1, i.e. no expert parallelism across the 8 DP ranks for this MoE model — every other dp-attn: true entry in this file (including the DSv4 recipe this PR says it copies) pairs it with an explicit ep equal to tp. Add ep: 8 to match the intended/validated recipe.

Extended reasoning...

The bug: The high-throughput search-space entry for glm5.2-fp4-b300-sglang-agentic is:

- { tp: 8, dp-attn: true, kv-offloading: none, conc-list: [48, 64, 96, 128, 192, 256, 512], router: { name: sglang-router, version: "0.3.2" } }

It sets tp: 8 and dp-attn: true but never sets ep. In utils/matrix_logic/generate_sweep_configs.py (single-node agentic branch, line 1055 — mirrored at lines 756/943 for the other scenario branches), the EP field is computed as:

Fields.EP.value: ep if ep is not None else 1,

Since the config never supplies ep, this resolves to EP_SIZE=1. That value flows straight into benchmarks/single_node/agentic/glm5.2_fp4_b300_sglang.sh, which builds PARALLEL_ARGS=(--tp "$TP" --ep-size "$EP_SIZE") unconditionally (no override or reset for the dp-attn branch — it only adds --dp "$TP" --enable-dp-attention ... on top). So the actual server launch for the documented '34,429 tok/s' high-throughput arm is --tp 8 --ep-size 1 --dp 8 --enable-dp-attention.

Why this is wrong: GLM-5.2 is an MoE model (glm_moe_dsa architecture). The whole point of pairing attention-DP with expert parallelism is to shard the MoE experts across the 8 DP ranks instead of replicating the full expert set on every GPU. With ep-size=1, SGLang runs with no expert parallelism — each of the 8 DP ranks holds/replicates the entire MoE expert set, which is a materially different (and much more memory- and compute-heavy) execution than the intended sharded layout.

Why nothing catches this today: There's no validation in generate_sweep_configs.py (or the launch script) requiring ep to be set — or to equal tp — whenever dp-attn: true is set for an MoE recipe. The default-to-1 behavior is silent, so a missing key produces a syntactically valid but semantically wrong config rather than an error.

Comparison to every other recipe in the file: Grepping configs/nvidia-master.yaml shows dozens of dp-attn: true entries (dsv4, minimaxm3, qwen3.5, etc.), and every single one pairs it with an explicit ep: equal to tp (e.g. { tp: 8, ep: 8, dp-attn: true }, { tp: 4, ep: 4, dp-attn: true }, { tp: 16, ep: 16, dp-attn: true } at lines 9892-9893 just above this diff). The PR description itself says the router setup is 'same pattern as the DSv4 B300 agentic recipe' (dsv4-fp4-b300-sglang-agentic-hicache), whose equivalent high-throughput arm is { tp: 8, ep: 8, dp-attn: true, ... }. This confirms the missing ep: 8 here is a copy-paste omission, not an intentional deviation.

Step-by-step proof:

  1. Config entry: { tp: 8, dp-attn: true, kv-offloading: none, conc-list: [...], router: {...} } — no ep key.
  2. generate_sweep_configs.py reads ep = bmk.get(Fields.EP.value)None (key absent).
  3. It writes Fields.EP.value: ep if ep is not None else 1EP_SIZE=1 in the generated matrix entry/env.
  4. glm5.2_fp4_b300_sglang.sh builds PARALLEL_ARGS=(--tp "$TP" --ep-size "$EP_SIZE") = --tp 8 --ep-size 1, then appends --dp "$TP" --enable-dp-attention ... since DP_ATTENTION=true.
  5. Resulting server launch: --tp 8 --ep-size 1 --dp 8 --enable-dp-attention — attention-DP is on, but expert parallelism is off.
  6. This is not the config that was on-node validated to get 34,429 tok/s @ conc 256 if that run used --ep-size 8 (matching every analogous recipe); the committed sweep will benchmark a different, degraded parallelism layout than what's documented.

Fix: add ep: 8 to the high-throughput arm, matching tp and the DSv4 reference recipe:

- { tp: 8, ep: 8, dp-attn: true, kv-offloading: none, conc-list: [48, 64, 96, 128, 192, 256, 512], router: { name: sglang-router, version: "0.3.2" } }

Comment on lines +1 to +5
#!/usr/bin/env bash
set -euo pipefail
set -x

# Agentic trace replay benchmark for GLM-5.2 NVFP4 on B300 using SGLang.

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.

🟡 This PR's title and description are English-only, violating the AGENTS.md rule that all PR titles/descriptions must be bilingual (title format ' / <中文标题>' plus a mirrored Chinese section in the body).

Extended reasoning...

AGENTS.md line 7 states as an explicit, mandatory rule: "PR and GitHub-issue titles & descriptions must be bilingual — include a Simplified Chinese version in addition to English. Title format: <English title> / <中文标题>. In the PR/issue body, follow the English content with its Chinese translation (e.g. a ## 中文说明 section mirroring the summary...)". This applies to every PR, with no carve-out for benchmark-recipe PRs.

This PR's title is 'Add GLM-5.2 NVFP4 B300 SGLang single-node agentic benchmarks' — no '/ <中文标题>' suffix — and the description's Summary, Changes, and Validation sections are entirely in English with no mirrored '## 中文说明' section or equivalent.

This is not a matter of subjective style: the repo's own commit log shows a sibling recipe PR following the rule correctly. Commit d85fa13 (PR #2182) has the bilingual title 'Add MiniMax M3 8k/1k Dynamo vLLM B300 EAGLE recipes / 新增 MiniMax M3 8k/1k Dynamo vLLM B300 EAGLE 配方', proving other contributors in this exact benchmark-recipe workflow are expected to (and do) satisfy the rule. This PR is the outlier.

Step-by-step proof:

  1. AGENTS.md:7 mandates bilingual title format ' / <中文标题>' and a mirrored Chinese section in the body for every PR.
  2. This PR's title metadata reads 'Add GLM-5.2 NVFP4 B300 SGLang single-node agentic benchmarks' — checking the string for '/' followed by CJK characters finds none.
  3. The description contains only '## Summary', '## Changes', '## Validation' — all English — with no '## 中文说明' or any CJK text anywhere in the body.
  4. Comparing against PR Add MiniMax M3 8k/1k Dynamo vLLM B300 EAGLE recipes / 新增 MiniMax M3 8k/1k Dynamo vLLM B300 EAGLE 配方 #2182 in the git log (same repo, same benchmark-recipe category, merged 3 commits prior) shows the correctly-formatted bilingual title, confirming the rule is actively enforced/followed elsewhere and this PR is non-compliant.

Impact: none on benchmark correctness or CI — this is a process/documentation compliance gap, not a code defect. Fix is simple: the author (or whoever finalizes the merge) should append '/ <一句中文标题>' to the PR title and add a '## 中文说明' section mirroring the Summary/Changes/Validation content before merge.

One warmup request hit ECONNRESET (uvicorn closes idle connections after
SGLANG_TIMEOUT_KEEP_ALIVE=5s while AIPerf reuses one pooled connection per
session with a 300s client keep-alive across inter-turn gaps of up to 10s),
and any terminal warmup failure aborts the AIPerf run by design. Set
SGLANG_TIMEOUT_KEEP_ALIVE=900 so the server outlasts the client pool.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Oseltamivir

Copy link
Copy Markdown
Collaborator Author

Sweep status: the TP8 conc-4 job in run 29634867738 failed with ProfileAborted: warmup_failure — one warmup request got ECONNRESET; AIPerf aborts on any terminal warmup failure by design. The server was healthy throughout (no 4xx/5xx, no crash; it kept serving 200s after the abort).

Root cause is a keep-alive lifecycle race, not the recipe/engine: AIPerf pins one pooled connection per agentic session with a 300s client-side keep-alive, while SGLang's uvicorn closes idle connections after SGLANG_TIMEOUT_KEEP_ALIVE=5s. Inter-turn idle gaps are capped at 10s, so a session's next turn can reuse the socket exactly as the server closes it → RST mid-write. This race plausibly also explains the known first-run flakiness of other agentic recipes (none of them override the 5s default).

Fixed in 8933d94 by exporting SGLANG_TIMEOUT_KEEP_ALIVE=900 in the recipe script (server now outlasts the 300s client pool). Will rerun the failed job once the run concludes — reruns resolve the branch ref, so they pick up the fix. The 12 other jobs are unaffected and still running.

Oseltamivir and others added 2 commits July 18, 2026 01:19
…b300 recipe

The cookbook HT cell's --chunked-prefill-size 8192 is a whole-engine budget:
under dp8 each rank prefills 1,024 tokens/step, which starves prefill on the
1M-context agentic corpus. A conc-256 warmup timed out after AIPerf's 1800s
drain grace period with 15 giant sessions still prefilling while KV usage sat
at ~0.01 (prefill-rate-bound, not memory-bound). Use the cookbook's own dp8
lever from the B200 cells: 32768 total = ~4096 tokens/rank/step. The TP arm
keeps 8192 (full budget per step, passed warmup fine).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant