Skip to content

Add GLM-5.1 FP8 B300 SGLang configurations / 新增 GLM-5.1 FP8 B300 SGLang 配置#2320

Closed
RohitNagraj wants to merge 3 commits into
mainfrom
glm5-fp8-b300-sglang-glm5.1-v0.5.15-post1
Closed

Add GLM-5.1 FP8 B300 SGLang configurations / 新增 GLM-5.1 FP8 B300 SGLang 配置#2320
RohitNagraj wants to merge 3 commits into
mainfrom
glm5-fp8-b300-sglang-glm5.1-v0.5.15-post1

Conversation

@RohitNagraj

@RohitNagraj RohitNagraj commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add GLM-5.1 FP8 B300 SGLang benchmark configurations for standard and MTP decoding using lmsysorg/sglang:v0.5.15.post1-cu130.
  • Add the matching single-node scripts, with EAGLE speculative decoding and chat-template requests for MTP.
  • Use the writable model cache when weights are not pre-staged.

中文说明

  • 新增 GLM-5.1 FP8 B300 SGLang 标准解码和 MTP 解码基准测试配置,使用 lmsysorg/sglang:v0.5.15.post1-cu130 镜像。
  • 新增对应的单节点脚本;MTP 配置启用 EAGLE 投机解码,并为请求使用聊天模板。
  • 权重未预置时使用可写模型缓存。

Add the B300 SGLang benchmark entry and script with writable model-cache fallback.

中文:新增 B300 SGLang 基准测试配置和脚本,并在模型未预置时使用可写缓存。
@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 关于重新运行失败任务的文档

Record the pull request URL for the GLM-5.1 FP8 B300 SGLang configuration.

中文:记录 GLM-5.1 FP8 B300 SGLang 配置的拉取请求链接。
中文:新增 GLM-5.1 FP8 B300 SGLang MTP 配置,并将其变更日志关联到 #2320
@RohitNagraj RohitNagraj changed the title Add GLM-5.1 FP8 B300 SGLang configuration / 新增 GLM-5.1 FP8 B300 SGLang 配置 Add GLM-5.1 FP8 B300 SGLang configurations / 新增 GLM-5.1 FP8 B300 SGLang 配置 Jul 23, 2026
Comment on lines +1288 to +1301
glm5-fp8-b300-sglang:
image: lmsysorg/sglang:v0.5.15.post1-cu130
model: zai-org/GLM-5.1-FP8
model-prefix: glm5
runner: b300
precision: fp8
framework: sglang
multinode: false
scenarios:
fixed-seq-len:
- isl: 8192
osl: 1024
search-space:
- { tp: 8, ep: 1, conc-start: 4, conc-end: 256 }

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 new config sets model-prefix: glm5 for model zai-org/GLM-5.1-FP8, but every other GLM-5.1 config in the repo uses glm5.1 — GLM-5 and GLM-5.1 are distinct models. Because the deprecated glm5-fp8-b300-sglang config for the unrelated zai-org/GLM-5-FP8 model used the identical prefix glm5 with the same runner/tp/ep/isl/osl/conc, utils/compare_results.py's baseline lookup (a prefix LIKE match) will silently pick historical GLM-5 rows as the regression baseline for this GLM-5.1 config. Should be model-prefix: glm5.1.

Extended reasoning...

The bug: configs/nvidia-master.yaml sets model: zai-org/GLM-5.1-FP8 but model-prefix: glm5 (line ~1291). Every other GLM-5.1-FP8/GLM-5.1-NVFP4 entry in the repo (e.g. configs/deprecated/nvidia-glm5-glm5.1-master.yaml lines 650, 957, 1261, 1382, 1525, 1782) uses model-prefix: glm5.1, while GLM-5 (non-5.1) entries use glm5. This new config breaks that convention, using the GLM-5 prefix for a GLM-5.1 model.

Code path: The model-prefix YAML field flows through generate_sweep_configs.py into the MODEL_PREFIX env var, then into infmax_model_prefix in the result JSON written by benchmark_lib.sh. utils/compare_results.py reads this value (model = result['infmax_model_prefix'].lower()) and uses it in its regression-baseline query:

WHERE ... AND c.model LIKE %(model)s || '%%' ...
ORDER BY br.date DESC LIMIT 1

With model = 'glm5', this becomes LIKE 'glm5%', which matches BOTH 'glm5' and 'glm5.1' rows in the DB, since 'glm5' is a literal prefix of 'glm5.1'.

Why this causes contamination, concretely: The deprecated config key glm5-fp8-b300-sglang previously existed in configs/deprecated/nvidia-glm5-glm5.1-master.yaml (lines 40-53) for the distinct model zai-org/GLM-5-FP8, also with model-prefix: glm5, and identical hardware/framework/precision/tp/ep/isl/osl/conc (b300/sglang/fp8/tp8/ep1/isl8192/osl1024/conc 4-256). Every other column in BASELINE_QUERY's WHERE clause matches between the old GLM-5 rows and this new GLM-5.1 config. So:

  1. The new GLM-5.1 sweep runs and writes a result with c.model = 'glm5' (from infmax_model_prefix).
  2. compare_results.py runs its baseline query with model = 'glm5', i.e. LIKE 'glm5%'.
  3. If any historical main-branch row exists with c.model = 'glm5' from the old GLM-5 (not 5.1) config, it satisfies every filter and ORDER BY date DESC LIMIT 1 picks it as 'the' baseline.
  4. The regression report silently compares GLM-5.1 throughput/latency numbers against an unrelated GLM-5 model's historical numbers, instead of correctly reporting 'no baseline' for this first GLM-5.1 B300 SGLang run.

If model-prefix were correctly set to glm5.1, the query would be LIKE 'glm5.1%', which does not match plain 'glm5' rows (since 'glm5' does not start with 'glm5.1'), correctly isolating GLM-5.1 baselines from GLM-5 ones.

Why nothing else catches this: The WHERE clause intentionally uses a prefix LIKE match (per the comment above BASELINE_QUERY) to handle cases like model-prefix: gptoss matching DB model gptoss120b — a legitimate use of prefix matching for suffix variation. That same permissiveness backfires here because glm5 is also a valid, distinct model family name that is a literal string-prefix of glm5.1. There's no additional disambiguation column (e.g. exact model name) in the baseline query to prevent this collision.

Fix: change model-prefix: glm5 to model-prefix: glm5.1 in this new config entry, consistent with every other GLM-5.1 config in the repository. Separately, this also means results from this config would otherwise be permanently mislabeled under the glm5 model family in the results DB, independent of the baseline-lookup issue.

@github-actions

Copy link
Copy Markdown
Contributor

@RohitNagraj

Copy link
Copy Markdown
Collaborator Author

/reuse-sweep-run

@Ankur-singh

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. — https://github.com/SemiAnalysisAI/InferenceX/actions/runs/30052832516
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this. — https://github.com/SemiAnalysisAI/InferenceX/actions/runs/30052832516
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • 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 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 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; FLOPs at lower precisions is fine, given that the config passes private evals. As an general north star princple, we should only use optimizations which is used in production by customers that care about accuracy
  • 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 single-node vLLM/SGLang recipe in this PR is documented in the official vLLM recipes and/or the SGLang cookbook:
    • I linked the corresponding upstream PR in the vLLM recipe repo or SGLang 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 any of the above criteria cannot reasonably be satisfied, I have provided additional reasoning below.

Additional detail section:

  • Scope: new-model submission — GLM-5.1 FP8 B300 SGLang, single-node 8k1k, TP8, conc 4–256. Two config keys: glm5-fp8-b300-sglang (base) and glm5-fp8-b300-sglang-mtp (EAGLE speculative decoding). Model zai-org/GLM-5.1-FP8, image lmsysorg/sglang:v0.5.15.post1-cu130 (upstream lmsysorg repo).
  • Validation & evals: Run Sweep https://github.com/SemiAnalysisAI/InferenceX/actions/runs/30052832516 (head 62b7be84) is green top-level with non-skipped single-node 8k1k benchmark jobs (c4–c256) and dedicated eval jobs (c64, c256) passing for both config keys; collect-evals/collect-results/compare-results all succeeded. Evals pass — the accuracy check for this new fp8 + NSA + speculative-decoding model.
  • Chat template (spec decode): glm5_fp8_b300_mtp.sh runs EAGLE speculative decoding and passes --use-chat-template in run_benchmark_serving, aligning the AL distribution to real-world chat usage.
  • Architecture / precision: the configs use --attention-backend nsa (GLM-5.1's native sparse attention), fp8 quantization, and fp8 kv-cache — precision/backend choices, not a reduction of model-architecture FLOPs — and the configs pass evals.
  • Recipe: documented in the SGLang cookbook — https://docs.sglang.io/cookbook/autoregressive/GLM/GLM-5.1 . At submission time the cookbook has no B300-specific recipe, so the B300 scripts reuse the GLM-5.1 FP8 B200 SGLang recipe until B300-specific guidance is available (noted in the script/config comment).
  • No engine patching: both scripts run python3 -m sglang.launch_server with the pinned image as shipped — no patch files, sed/heredoc rewrites, site-packages edits, or forked wheels.
  • Agentic item (unchecked): not applicable — single-node fixed-seq-len (8k1k) benchmarks, not agentic workloads; agentic jobs are correctly skipped in the sweep.

Signed: Ankur-singh

@Klaud-Cold

Copy link
Copy Markdown
Collaborator

✅✅✅ Verdict: PASS ✅✅✅

✅ Check 0 (CODEOWNER): PASS — Ankur-singh is a listed owner of configs/nvidia-master.yaml; remaining paths fall under the catch-all, which a recognized CODEOWNER satisfies.
✅ Check 1 (Sweep on in-PR commit): PASS — head 62b7be84 has green, non-skipped single-node 8k1k / (c4–c256, both configs) and eval / check-runs from run 30052832516.
✅ Check 2 (Evals pass): PASS — agg_eval_all.json from that run: GSM8K em_strict 0.9606/0.9712 (base c64/c256) and 0.9704/0.9689 (mtp c64/c256), all on the PR's image lmsysorg/sglang:v0.5.15.post1-cu130.
✅ Check 3 (Recipe merged & matches): PASS — published SGLang cookbook GLM-5.1 page linked; major args (model zai-org/GLM-5.1-FP8, TP8, parsers, EAGLE steps=3/topk=1/draft=4) match its FP8 recipe. All extra kernel/precision flags (--attention-backend nsa, --nsa-*-backend trtllm, --kv-cache-dtype fp8_e4m3, --quantization fp8, --moe-runner-backend flashinfer_trtllm, --enable-flashinfer-allreduce-fusion) are verified SGLang v0.5.15.post1 auto-defaults for GLM-5.1 on Blackwell — equivalent to recipe defaults. Informational: the cookbook has no B300-specific FP8 command (it recommends NVFP4 there); the sign-off and script comments disclose this and reuse the published FP8 recipe.
✅ Check 4 (Reuse command): PASS — /reuse-sweep-run posted by RohitNagraj (COLLABORATOR).
✅ Check 5 (Latest checklist): PASS — all current-template items present and checked; the agentic item is unchecked with an explicit N/A explanation in the additional detail section.
✅ Check 6 (Upstream image & ordering): PASS — upstream lmsysorg/sglang:v0.5.15.post1-cu130 on B300; framework is SGLang itself, so engine-first ordering is satisfied.
✅ Check 7 (No architecture hacks): PASS — no --hf-overrides/model-config edits; NSA is GLM-5.1's native attention and fp8 kv-cache is a precision choice backed by passing evals.
✅ Check 8 (Spec-decode chat template): PASS — glm5_fp8_b300_mtp.sh passes --use-chat-template to run_benchmark_serving.
✅ Check 9 (No engine patches): PASS — pinned image runs as shipped; only client-side pip install datasets pandas and model download.
➖ Check 10 (Agentic spec-decode golden AL): N/A — no agentic changes (fixed-seq-len 8k1k only), and no simulated-acceptance knobs on the non-agentic spec config.

@functionstackx

functionstackx commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

A couple of things to flag: the GLM 5.1 architecture is already deprecated (see PR #2276) in favor of GLM 5.2. All submitters including Nick and Xin at NVIDIA are both in agreement on this deprecation as well awhile ago. Everyone was given 3-4 weeks' written notice ahead of the submission cutoff, so we'd ask that any new work target the 5.2 architecture going forward.

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

Projects

Development

Successfully merging this pull request may close these issues.

4 participants