Prhub

#36544 GLM-5.3-Flash cookbook: HiCache for LL, fusion-flag drop, EAGLE, default-cell numbers, DCP4 overlay

原始 PR 作者 JustinTong0323 合并时间 2026-08-28 03:18 文件变更 3 提交数 11 评论 0 代码增减 +102 / -53

执行摘要

GLM-5.3-Flash cookbook 恢复 HiCache、新增 DCP4、重测基准

PR body 明确这是对 #36519 的 follow-up,动机是“用最终权重上的实测证据校正 cookbook”:

1) HiCache 启动崩溃已在 release image 与 #36538 中修复(L2 host pool 打包 target 11 + draft 1,GSM8K-20 95%、100% stop rate),可以重新放开低延迟组合;
2) fusion-gate fix 使 EP>1 默认构建 unfused 路径,--disable-shared-experts-fusion 不再需要;
3) 上游把 NEXTN 折叠进 EAGLE,命令模板需用规范拼写;
4) HT 数字之前用手工 pin 参数不可复现,需按发布命令原样重测。

值得精读:对维护部署 cookbook 的工程师有参考价值,尤其是“文档配置面板与运行时修复联动”“基准数据治理”两个点。关注点:DCP4 两条基准行的 match 键(kvDsaPair + dcp 组合)与配置面板维度的互斥关系,以及 HiCache 重新启用后与 Low Latency 策略的隐藏依赖。精读强度中等。

讨论亮点

该 PR 无 inline review 评论与 issue 评论,仅有一条 zijiexia 的 APPROVED(空 body)审核。从 commit 历史可见 review follow-ups 驱动了数据一致性清理(commit 588864):统一 fp8-vs-bf16 delta 为 2.9–5.7%、KV 池绝对值采用默认 cell 值、fp8 stop rate 采用 d6ab 门禁数据;commit 11fd11 将 HT 行按发布命令逐字重测,放弃手工 pin 参数。这体现了“文档数字必须以发布命令 + release image 为准”的治理原则。

实现拆解

  1. 重新启用 HiCache 低延迟选项:在 docs/src/snippets/configs/zai-org/glm-5.3-flash.jsxoverlayDims.hicache 中删除 l2/l3 两个选项上的 disabled: (s) => s.strategy === "low-latency" 与对应 disableReason,原因:#36538(已并入 release image)修复了裸 DSATokenToKVPool 缺少 full_kv_pool 导致的启动崩溃,实测 L2 host pool 可按 target 11 + draft 1 打包启动,GSM8K-20 95% 且 100% stop rate。影响:Low Latency 策略下将出现 HiCache L1+L2 / L3 选项,用户可用;但依赖包含该 fix 的 release image。

  2. 移除 fusion flag 并统一 EAGLE 拼写:在 gsm8k 与 sgl-eval 命令模板中删除 --disable-shared-experts-fusion(fusion-gate fix 已使 EP>1 默认走 unfused 路径);--speculative-algorithm 从 NEXTN 改为 EAGLE(上游将 NEXTN 折叠进 EAGLE,topk=1 行为一致)。影响:生成命令更简洁,与上游枚举对齐。

  3. 新增 DCP4 overlay 维度:在 overlayDims 增加 dcp 维度(off / 4),DCP 4 仅在 gb300 可用,flags 为 --dcp-size 4 --dcp-comm-backend a2a --dcp-replicate-q-proj;同步在 isRecommendedSelectionverificationStatus 中要求 dcp === "off" 或允许 ["off", "4"],防止推荐/验证状态与实测范围不一致。

  4. 重测并重写基准表glm-5.3-flash-benchmarks.jsxsglang_version 全部更新为 release-image 树 d6ab04bdf1;Low Latency 行数字刷新,新增 FP8 + TRT-LLM DCP4(1,680.61 out tok/s,原生 LSE)与 BF16 + TileLang DCP4(1,565.8 out tok/s,依赖 release image 的 LSE fix)两行;High Throughput 行改为“发布命令原样执行”的默认 cell 测量(BF16 1,161 / 2,660 / 4,828,FP8 1,227 / 2,739 / 4,977),删除原先“不可复现”的注记。验证配套:node docs/scripts/check_cookbook_configs.mjs 校验配置合法性,PR CI 与 extra CI 均通过。

  5. 同步 MDX 叙述GLM-5.3-Flash.mdx 新增“Decode context parallelism”小节,说明 DCP4 适用范围与 LSE 依赖;FP8 vs BF16 的吞吐差统一为 2.9–5.7%;补充 EAGLE 拼写说明。无新增测试文件(该仓库 cookbook 由 check 脚本与 CI 门禁兜底)。

文件 模块 状态 重要度
docs/src/snippets/configs/zai-org/glm-5.3-flash.jsx 配置面板 modified 6.21
docs/src/snippets/configs/zai-org/glm-5.3-flash-benchmarks.jsx 基准数据 modified 6.53
docs/cookbook/autoregressive/GLM/GLM-5.3-Flash.mdx 用户手册 modified 2.92

关键符号

isRecommendedSelection verificationStatus

关键源码片段

docs/src/snippets/configs/zai-org/glm-5.3-flash.jsx configuration

配置面板核心:移除 HiCache 对 low-latency 的禁用、删除 fusion flag、新增 dcp 维度并联动推荐 / 验证状态,直接决定用户生成命令。

// isRecommendedSelection 与 verificationStatus 的联动(head 版)
// 新增 dcp 维度后,推荐 / 已验证状态都要求 DCP 为 off,
// 避免把只在 4x GB300 上验证的 DCP4 组合标记为 recommended / verified。
isRecommendedSelection(s) {
  const pairing = ["h100", "h200", "mi300x", "mi325x", "mi355x"].includes(s.hw)
    ? "bf16-tilelang"
    : "fp8-trtllm";
  return (
    s.kvDsaPair === pairing &&
    s.mmTransport === "auto" &&
    s.hicache === "off" &&
    s.dcp === "off"
  );
}// overlayDims 中的 HiCache 与 DCP 维度(head 版)
// 1) HiCache 的 L1+L2 / L3 选项删除了对 low-latency 的 disabled 与 disableReason,
// 前提是 release image 已内置 #36538 的 DSA draft pool 修复
// (L2 host pool 按 target 11 + draft 1 打包,GSM8K-20 95%、100% stop rate)。
// 2) 新增 dcp 维度:DCP4 仅 gb300 可选,flags 一次性注入
// --dcp-size / --dcp-comm-backend / --dcp-replicate-q-proj。
overlayDims: [
  // ...mmTransport 维度省略 ...
  {
    id: "hicache",
    title: "HiCache",
    default: "off",
    options: [
      { id: "off", label: "Off" },
      {
        id: "l2",
        label: "L1 + L2",
        subtitle: "Host memory",
        flags: ["--enable-hierarchical-cache", "--hicache-size 32"],
        hints: ["32 GB host tier; the default ratio can demand more host RAM than the node has free."],
      },
      {
        id: "l3",
        label: "+ L3",
        subtitle: "Mooncake",
        flags: ["--enable-hierarchical-cache", "--hicache-size 32", "--hicache-storage-backend mooncake"],
        env: ["SGLANG_HICACHE_MOONCAKE_CONFIG_PATH={{MOONCAKE_CONFIG}}"],
        hints: ["Start Mooncake and place the configuration file on every serving node."],
      },
    ],
  },
  {
    id: "dcp",
    title: "Context Parallelism",
    default: "off",
    options: [
      { id: "off", label: "Off" },
      {
        id: "4",
        label: "DCP 4",
        // 目前只在 4x GB300 TP4/EP4 上完成验证,其他硬件直接置灰
        disabled: (s) => s.hw !== "gb300",
        disableReason: "DCP is validated only on 4x GB300 TP4/EP4 for now.",
        flags: ["--dcp-size 4", "--dcp-comm-backend a2a", "--dcp-replicate-q-proj"],
        hints: ["Measured on 4x GB300 with both KV/DSA pairings, adaptive MTP 5/1/6, full decode graph."],
      },
    ],
  },
]

评论区精华

Review follow-ups 清理 rc2 子声明与数据一致性 documentation

提交 588864 记录了对 review 跟进项的清理:fp8-vs-bf16 delta 统一为 2.9–5.7%(MDX 与 notes 一致)、KV 池绝对值改为默认 cell 值(12.6M/7.0M)、fp8 stop rate 采用 d6ab 门禁数据;对应基准则在 commit 11fd11 重新用发布命令逐字测量。

结论:所有跟进项已在基准表、notes 与 MDX 中对齐,review 通过(zijiexia APPROVED)。 · 已解决

风险与影响

配置面板依赖运行时修复:HiCache LL 与 TileLang DSA DCP4 分别依赖 #36538 与 release image 中的 LSE fix;若用户使用旧 build,生成的命令可能仍触发启动崩溃或精度偏差。基准数据版本绑定:所有数字绑定 d6ab04bdf1 树与最终权重 c5b82b63e37b,其他版本不可直接引用。配置逻辑变更面:isRecommendedSelection / verificationStatus 与 dcp 维度联动,若未来支持更多 dcp 值(如 2/8)需同步更新,否则会出现推荐/验证状态与实际不符。无直接测试文件:cookbook 依赖 check_cookbook_configs.mjs 与 CI 门禁,逻辑回归风险由脚本覆盖,但运行时 flag 组合未被单元化验证。

用户侧:GLM-5.3-Flash 部署面板新增可用的 HiCache(LL)与 DCP4 选项,生成的 sgl-eval 命令更简洁;基准表反映当前 release-image 实测水平,提高选型可信度。团队侧:建立了“发布 image + 原样命令 + 默认 cell 测量”的文档数字基线,供后续 cookbook 复刻。范围:仅影响 zai-org/GLM-5.3-Flash cookbook 3 个文件;配置对象的 disabled/stripPrefixes 逻辑变化可能影响模糊匹配渲染,但 CI 校验已通过。

文档配置逻辑变更 依赖运行时修复(HiCache/DCP) 基准数据绑定 release image 版本 无对应用例测试

关联 Issue

#36538 Fix HiCache startup with bare DSA MTP draft pools

完整报告

参与讨论