Skip to content

[Docs] GLM-5.2: move GB300 AgentX recipe to the agentic HiCache section and drop no-op settings - #42167

Merged
nvpohanh merged 3 commits into
sgl-project:mainfrom
nvpohanh:docs/glm5.2-gb300-agentic-hicache
Oct 6, 2026
Merged

nvpohanh merged 3 commits into
sgl-project:mainfrom
nvpohanh:docs/glm5.2-gb300-agentic-hicache

Conversation

@nvpohanh

@nvpohanh nvpohanh commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

[by Claude Code]

Motivation

#42109 added the InferenceX GB300 GLM-5.2 NVFP4 AgentX settings to the general-purpose GB300 cells of the command generator. Most of the added env vars and flags were no-ops or repeated SGLang's defaults, and an agentic HiCache recipe fits better in §3.6 Agentic Long-Context with HiCache DRAM Offload (NVFP4, MTP), next to the existing B300/B200 recipes (the same layout as DeepSeek-V4 §3.6). Follows up on the review comments in #42109.

Modifications

  1. Revert [Docs] GLM-5.2 GB300 NVFP4: add env vars from InferenceX AgentX recipe #42109 in docs/src/snippets/configs/zai-org/glm-5.2.jsx. The three GB300 NVFP4 single-node cells go back to their earlier state.
  2. Add a GB300 (TP4, single node) block to §3.6 of docs/cookbook/autoregressive/GLM/GLM-5.2.mdx with three commands, all using HiCache DRAM offload (--hicache-size 135, write_back, direct):

Env vars and flags from #42109 left out, because they do nothing on current main or repeat the default for this model on GB300:

Setting Why it is not needed on main
SGLANG_DISABLE_TP_MEMORY_INBALANCE_CHECK, SGLANG_ENABLE_THINKING Deprecated aliases removed in #40795; nothing reads them.
SGLANG_HICACHE_DEBUG_LOG, SGLANG_HICACHE_DEBUG_SAMPLE_RATE Not read anywhere in the codebase.
SGLANG_ENABLE_UNIFIED_RADIX_TREE Deprecated; the unified radix tree is the default since #35081.
SGLANG_MOE_NVFP4_DISPATCH No effect without an all-to-all backend: the standard dispatcher only uses the FP4 input scale on the flashinfer_cutlass all-gather path, and the flashinfer_trtllm runner quantizes its own input.
--kv-cache-dtype fp8_e4m3 Default for DSA models on SM10x (_dsa_kv_cache_dtype_default).
--dsa-prefill-backend trtllm, --dsa-decode-backend trtllm Default for DSA with an FP8 KV cache on SM10x.
--moe-runner-backend flashinfer_trtllm Default for modelopt_fp4 DeepSeek-family MoE on Blackwell with no all-to-all backend.
--disable-shared-experts-fusion Set automatically for the flashinfer_trtllm MoE runner.
--flashinfer-allreduce-fusion-backend auto Enabled automatically for GlmMoeDsaForCausalLM at TP>1 without DP attention on SM90/SM10x.

Kept: --fp4-gemm-backend flashinfer_trtllm in the low-latency command, because the default on SM10x is flashinfer_cutedsl.

Accuracy Tests

N/A — docs-only change.

Speed Tests and Profiling

N/A — docs-only change. I have not re-run the §3.6 GB300 commands as written. The low-latency settings come from the InferenceX GB300 AgentX recipe (SemiAnalysisAI/InferenceX#3178). The balanced and high-throughput commands are the existing generator cells with HiCache added.

Checklist

🤖 Generated with Claude Code


CI States

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

nvpohanh and others added 2 commits October 1, 2026 18:29
Add a GB300 (TP4, single node) block with low-latency, balanced, and
high-throughput commands to "Agentic Long-Context with HiCache DRAM
Offload (NVFP4, MTP)". The commands omit env vars and flags that only
repeat SGLang defaults (FP8 KV cache and TRT-LLM DSA backends for DSA
models on Blackwell, flashinfer_trtllm MoE runner, shared-expert fusion
off, FlashInfer allreduce fusion) and keep --fp4-gemm-backend
flashinfer_trtllm, which differs from the flashinfer_cutedsl default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 2, 2026
@nvpohanh

nvpohanh commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

cc @faradawn

Comment on lines +306 to +376

**GB300 (TP4, single node):** one 4-GPU GB300 node serves the whole model. All three commands offload KV cache to host DRAM with `--hicache-size 135` (GB of host memory per rank, 540 GB per node). GLM-5.2 is a DSA model, so on Blackwell SGLang already defaults to an FP8 E4M3 KV cache and TRT-LLM DSA attention; the commands do not need to set them.

Low-latency (TP4, MTP 4-1-5, up to 16 concurrent requests):
```bash Command
sglang serve \
--model-path nvidia/GLM-5.2-NVFP4 \
--trust-remote-code \
--tp 4 \
--quantization modelopt_fp4 \
--fp4-gemm-backend flashinfer_trtllm \
--max-running-requests 16 \
--cuda-graph-max-bs-decode 16 \
--chunked-prefill-size 8192 \
--max-prefill-tokens 8192 \
--mem-fraction-static 0.8 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--speculative-algorithm EAGLE \
--speculative-num-steps 4 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 5 \
--enable-hierarchical-cache \
--hicache-size 135 \
--hicache-write-policy write_back \
--hicache-io-backend direct
```

Balanced (DP attention, MTP 2-1-3, up to 256 concurrent requests):
```bash Command
sglang serve \
--model-path nvidia/GLM-5.2-NVFP4 \
--trust-remote-code \
--tp 4 \
--attn-dp-size 4 \
--quantization modelopt_fp4 \
--max-running-requests 256 \
--chunked-prefill-size 8192 \
--mem-fraction-static 0.92 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--speculative-algorithm EAGLE \
--speculative-num-steps 2 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 3 \
--enable-hierarchical-cache \
--hicache-size 135 \
--hicache-write-policy write_back \
--hicache-io-backend direct
```

High-throughput (DP attention, no MTP, up to 512 concurrent requests):
```bash Command
sglang serve \
--model-path nvidia/GLM-5.2-NVFP4 \
--trust-remote-code \
--tp 4 \
--attn-dp-size 4 \
--quantization modelopt_fp4 \
--max-running-requests 512 \
--chunked-prefill-size 8192 \
--mem-fraction-static 0.92 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--enable-hierarchical-cache \
--hicache-size 135 \
--hicache-write-policy write_back \
--hicache-io-backend direct
```

With `--attn-dp-size 4`, `--chunked-prefill-size` is a global budget divided across the attention DP ranks, so the balanced and high-throughput commands prefill 2048 tokens per rank per chunk.

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 flags looks great. Do we want to move these configs into the command builder?

Image

If you prefer it to be in this static markdown section, I'm also fine.

The InferenceX GB300 AgentX aggregate points (concurrency 1, 2 and 4)
passed with EAGLE 5-1-6 (SemiAnalysisAI/InferenceX#3659).

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

nvpohanh commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Merging to unblock SA submission. Let me know if anyone has concerns.

@nvpohanh
nvpohanh merged commit f2f0be7 into sgl-project:main Oct 6, 2026
97 of 101 checks passed
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.

2 participants