执行摘要
本次 PR 更新了 GLM-5.2 NVFP4 模型在 B300 硬件上的部署配置,将原有的 TP4 布局升级为 verified 的单节点 8×B300 TP8 方案,并新增 high-throughput 策略,同时补充了对应的性能基准数据。变更涉及两个 JSX 配置文件,属于纯文档/配置更新,无运行时代码改动。
功能与动机
原来 cookbook 中 GLM-5.2 NVFP4 的 B300 配置仅提供 TP4 布局和 low-latency、balanced 两种策略,且配置未经实际验证 (verified: false)。实际 8×B300 单节点已验证可稳定运行 TP8 布局,且缺少高吞吐场景的指导。本次更新旨在提供经实际验证的完整配置方案,覆盖从低延迟到高吞吐的三种典型部署场景,并附上实测性能数据,帮助用户快速选择合适的配置。
实现拆解
-
更新部署配置 (glm-5.2.jsx)
- 将 B300 NVFP4 的 low-latency 和 balanced 策略从 --tp 4 改为 --tp 8,--mem-fraction-static 从 0.8 提升至 0.85
- 为 balanced 策略新增 DP-Attention 相关标志 (--dp 8、--enable-dp-attention),使用短 draft MTP 2-1-3 而非默认 5-1-6,并添加两个必要标志:--speculative-attention-mode decode(避免 CUDA-graph 捕获死锁)和 --max-running-requests 256(提升默认并发限制以填满所有 DP rank)
- 新增 high-throughput 策略:TP8 + DP-Attention (dp8)、禁用 speculative、--max-running-requests 1024,针对极高并发吞吐场景
- 更新注释块,明确 B300 与 GB300 的 TP 差异
-
补充性能基准数据 (glm-5.2-benchmarks.jsx)
- 为 B300 NVFP4 三种策略添加实测 latency 和 throughput 数据,所有数据在 lmsysorg/sglang:dev-glm52-nvfp4 预览镜像上测得
- 记录 aime25 准确率 89.58%(当前 NVFP4 构建实测),gsm8k 继承变体默认值
- 性能概览:
| 策略 | 并发 | TTFT | TPOT | 吞吐 (tok/s/GPU) |
|-------------|---------|----------|----------|-------------------|
| low-latency | 1 / 16 | 196/274 ms | 1.86/6.95 ms | 51 / 224 |
| balanced | 64 / 256 | 680/3010 ms | 48.9/149 ms | 153 / 205 |
| high-throughput | 1024 | 6370 ms | 280 ms | 430 |
-
配置验证:两个 JSX 配置文件均通过 node --check 和模块导入验证,确保语法正确,无运行时风险。
docs_new/src/snippets/configs/zai-org/glm-5.2.jsx
核心部署配置,更新了 B300 NVFP4 的三种策略(low-latency、balanced、high-throughput),包括 TP 大小、DP-Attention 启用、speculative decoding 参数、内存比例等关键改动。
// 以下是 B300 NVFP4 balanced 策略的配置片段 (docs_new/src/snippets/configs/zai-org/glm-5.2.jsx)
{
match: { hw: "b300", variant: "default", quant: "nvfp4", strategy: "balanced", nodes: "single" },
verified: true,
env: [],
flags: [
"--model-path {{MODEL_NAME}}",
"--tp 8", // 从 tp4 升级到 tp8,充分利用 8 卡 B300
"--dp 8", // 启用数据并行,提升吞吐
"--enable-dp-attention", // 配合 DP 的分组注意力机制
"--quantization modelopt_fp4",
// 使用短 draft (MTP 2-1-3) 而非默认的 5-1-6:在此并发度下,
// 长 draft 的校验开销超过了 accept-length 收益
"--speculative-algorithm EAGLE",
"--speculative-num-steps 2",
"--speculative-eagle-topk 1",
"--speculative-num-draft-tokens 3",
// DP-Attention + MTP 需要两个必需标志:
// decode 模式避免 CUDA-graph 捕获死锁,
// max-running 256 提升默认约 48 请求的节流,使 DP-Attention 填满所有 8 个 rank
"--speculative-attention-mode decode",
"--max-running-requests 256",
"--chunked-prefill-size 8192",
"--mem-fraction-static 0.85", // 从 0.8 调高,分配更多 GPU 内存
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
docs_new/src/snippets/configs/zai-org/glm-5.2-benchmarks.jsx
性能基准数据,为 B300 NVFP4 的三种策略提供了实测的 TTFT、TPOT 和吞吐数据,并包含 accuracy 记录。
// B300 + NVFP4 基准条目 (docs_new/src/snippets/configs/zai-org/glm-5.2-benchmarks.jsx)
// tokens_per_sec_per_gpu = 总服务器输出 tok/s / 8 块 GPU
// aime25 覆盖变体默认值 (87.7→89.58,当前 NVFP4 构建实测 );gsm8k 继承默认值
{
match: { hw: "b300", variant: "default", quant: "nvfp4", strategy: "balanced", nodes: "single" },
sglang_version: "dev-glm52-nvfp4",
accuracy: { aime25_pct: 89.58 },
speed: [
{ workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 64 },
ttft_ms: 680, tpot_ms: 48.9, tokens_per_sec_per_gpu: 153 },
{ workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 256 },
ttft_ms: 3010, tpot_ms: 149, tokens_per_sec_per_gpu: 205 },
],
},
评论区精华
用户 tazjin 在 Issue 评论中提问:
Is there any info about the dev-glm52-nvfp4 branch? What PR is that based on, for example? Is this expected to work on B200?
作者 zijiexia 回复:
it is based on branch glm-opt. it is expected to work on B200, will provide update soon
说明配置基于 glm-opt 分支,并承诺后续提供 B200 支持更新。
风险与影响
- 风险:本次变更为纯文档/配置更新,无运行时代码改动,技术风险极低。潜在风险包括:配置依赖特定预览镜像,若镜像或模型变更可能需要同步更新;作者确认预期可在 B200 工作但尚未提供验证数据。
- 影响:为用户提供了经过实际验证的 B300 部署指南,覆盖三种典型场景;balanced 策略中的
--speculative-attention-mode decode 和 --max-running-requests 调整经验值得其他使用 DP-Attention + MTP 的场景参考。
关联脉络
- 与 PR #28731 同属 GLM-5.2 cookbook 的持续改进:前者移除了冗余 serve 标志,本次更新聚焦 B300 NVFP4 的配置升级和性能数据补充。
- 未来可能扩展到 B200 硬件,作者已确认预期兼容。
参与讨论