Prhub

#34395 [Docs] Add Ling-3.0-tiny INT4 recipes

原始 PR 作者 JustinTong0323 合并时间 2026-08-12 03:16 文件变更 3 提交数 2 评论 0 代码增减 +92 / -8

执行摘要

为 Ling-3.0-tiny 新增 INT4 配方与 H200/B200 基准

PR body 说明目标是“add the public Ling-3.0-tiny INT4 checkpoint to the cookbook deployment matrix”,并提供“verified single-GPU H200 and B200 recipes with default decode CUDA Graph enabled”。文档描述中也提到 INT4 checkpoint 使用对称 group-32 W4A16 路由专家,SGLang 可自动选择 Marlin 或 Triton WNA16,无需用户显式指定量化或 MoE 后端标志,因此社区用户可直接按配方部署。

值得快速浏览,作为 cookbook 新增量化配方的模板参考。重点关注三点:一是 INT4 在 H200/B200 上的实测吞吐与精度数据,二是 verified: true 与未验证 cell 的区分方式,三是文档中关于默认 CUDA Graph 与外推能力的描述。若团队准备为其他模型补充 INT4 配方,可复用这套 jsx 配置与基准数据结构。

讨论亮点

本 PR 没有 review 评论或讨论线程,zi jiexia 直接批准(APPROVED)。因此没有可提炼的技术交锋。

实现拆解

实现按以下步骤拆解:

  1. 部署配置矩阵扩展(docs/src/snippets/configs/inclusionAI/ling-3.0-tiny.jsx):在 quantizations 中新增 { id: "int4", label: "INT4" },并在 modelNames 中映射 "default|int4": "inclusionAI/Ling-3.0-tiny-int4"。基准命令中为 speed 增加 --random-range-ratio 1 固定请求长度,为 GSM8K 评测增加 --temperature 1.0 --top-p 0.95 --thinking。最后为 h20-3e、h200、h800、h100、b200、gb300 六个硬件各新增一个 INT4 cell,其中仅 h200 与 b200 标记 verified: true
  2. 基准数据补充(docs/src/snippets/configs/inclusionAI/ling-3.0-tiny-benchmarks.jsx):新增 H200 与 B200 两套 INT4 基准条目,sglang_version 记录为 PR #33561 @ 8ba213fc,包含 P50 TTFT/TPOT、吞吐与完整 GSM8K 精度;B200 条目明确标注使用了未调优的 Triton WNA16 默认配置 E=128/N=256。注释同时更新,说明 INT4 使用 80 条精确长度请求而 BF16/FP8 保留原发布口径。
  3. 文档页更新(docs/cookbook/autoregressive/InclusionAI/Ling-3.0-tiny.mdx):将 description 与模型清单扩展为 BF16/FP8/INT4 三种量化;补充 INT4 显存约 5.8 GB、SGLang 自动选择 Marlin/WNA16 的说明,并强调使用专用镜像 lmsysorg/sglang:dev-Ling-3.0-tiny 以包含 INT4 所需后端。
  4. 验证配套:无新增测试文件,但 PR body 列出了 check_cookbook_configs.mjs 矩阵校验、Mintlify build、broken-links、Playwright 命令与基准卡片检查、H200/B200 实际 serving 与 GSM8K finish-reason 门控等验证流程。
文件 模块 状态 重要度
docs/src/snippets/configs/inclusionAI/ling-3.0-tiny.jsx 部署配方 modified 5.85
docs/src/snippets/configs/inclusionAI/ling-3.0-tiny-benchmarks.jsx 基准数据 modified 5.3
docs/cookbook/autoregressive/InclusionAI/Ling-3.0-tiny.mdx 文档页 modified 3.03

关键源码片段

docs/src/snippets/configs/inclusionAI/ling-3.0-tiny.jsx configuration

部署配置矩阵核心文件,新增 INT4 量化项、模型映射、基准命令参数与 6 个硬件 cell,其中仅 H200/B200 标记已验证。

// docs/src/snippets/configs/inclusionAI/ling-3.0-tiny.jsx
// 部署配置矩阵中与 INT4 相关的关键字段
export const config = {
  quantizations: [
    { id: "bf16", label: "BF16" },
    { id: "fp8", label: "FP8" },
    // 新增 INT4 量化项,对应公开 checkpoint inclusionAI/Ling-3.0-tiny-int4
    { id: "int4", label: "INT4" },
  ],  modelNames: {
    "default|bf16": "inclusionAI/Ling-3.0-tiny",
    "default|fp8": "inclusionAI/Ling-3.0-tiny-fp8",
    "default|int4": "inclusionAI/Ling-3.0-tiny-int4",
  },  benchmarkCommands: {
    // INT4 基准使用精确长度随机请求(--random-range-ratio 1),
    // GSM8K 评测统一采用 temperature 1.0 / top-p 0.95 并开启 --thinking
    speed: `python3 -m sglang.bench_serving ... --random-range-ratio 1 ...`,
    accuracy: {
      gsm8k_pct: `sgl-eval run gsm8k ... --temperature 1.0 --top-p 0.95 --thinking`,
    },
  },  // 新增 6 个硬件的 INT4 cell,仅 H200 与 B200 经过实测验证(verified: true),
  // 其余硬件(h20-3e/h800/h100/gb300)保持未验证状态
  cells: [
    { match: { hw: "h200", variant: "default", quant: "int4", strategy: "high-throughput", nodes: "single" },
      verified: true,
      flags: ["--model-path {{MODEL_NAME}}", "--host {{HOST_IP}}", "--port {{PORT}}"] },
    { match: { hw: "b200", variant: "default", quant: "int4", strategy: "high-throughput", nodes: "single" },
      verified: true,
      flags: ["--model-path {{MODEL_NAME}}", "--host {{HOST_IP}}", "--port {{PORT}}"] },
  ],
};
docs/src/snippets/configs/inclusionAI/ling-3.0-tiny-benchmarks.jsx configuration

新增 H200 与 B200 的 INT4 基准条目,记录 P50 TTFT/TPOT、吞吐、GSM8K 精度以及 CUDA Graph 捕获信息。

// docs/src/snippets/configs/inclusionAI/ling-3.0-tiny-benchmarks.jsx
// 新增 INT4 基准条目:TTFT/TPOT 均为 P50,精度为完整 GSM8K(1319 题)
export const benchmarks = [
  {
    match: { hw: "h200", variant: "default", quant: "int4", strategy: "high-throughput", nodes: "single" },
    sglang_version: "PR #33561 @ 8ba213fc",
    speed: [
      { workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 1 },
        ttft_ms: 90.31, tpot_ms: 1.96, tokens_per_sec_per_gpu: 4398 },
      { workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 16 },
        ttft_ms: 840.04, tpot_ms: 3.55, tokens_per_sec_per_gpu: 32958 },
    ],
    accuracy: { gsm8k_pct: 94.54 },
    // 完整 GSM8K 的 stop rate 为 100%,默认 decode CUDA Graph 捕获 36 个 shape,覆盖至 batch 256
    notes: "Full GSM8K stop rate 100%; default decode CUDA Graph captured 36 shapes through batch 256.",
  },
  {
    match: { hw: "b200", variant: "default", quant: "int4", strategy: "high-throughput", nodes: "single" },
    sglang_version: "PR #33561 @ 8ba213fc",
    speed: [
      { workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 1 },
        ttft_ms: 305.67, tpot_ms: 6.33, tokens_per_sec_per_gpu: 1359 },
      { workload: { dataset: "random", isl: 8192, osl: 1024, max_concurrency: 16 },
        ttft_ms: 2634.12, tpot_ms: 16.04, tokens_per_sec_per_gpu: 7730 },
    ],
    accuracy: { gsm8k_pct: 94.54 },
    // B200 使用未调优的 Triton WNA16 默认配置 E=128/N=256,性能数据以文档标注为准
    notes: "Full GSM8K stop rate 100%; default decode CUDA Graph captured 52 shapes through batch 512. Triton WNA16 used untuned default E=128,N=256 configs.",
  },
];

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

  1. 基准口径差异:INT4 性能数据来自 80 条精确长度请求,而 BF16/FP8 沿用原始发布数据(随机长度),同一 benchmark 表格内直接对比时需注意口径不同。
  2. B200 数据待调优:B200 上 INT4 吞吐显著低于 H200(c1 仅 1359 vs 4398 tok/s),且文档注明 Triton WNA16 使用未调优默认配置,可能给用户造成跨卡性能困惑。
  3. 运行时依赖:INT4 配方依赖 PR #33561 的运行时支持,若该 PR 未合入或行为有变,配方可能不可用;合入顺序需保证。
  4. 验证覆盖有限:仅 h200 与 b200 实测验证,其余四个硬件 cell 均未验证,用户在其他硬件上可能遇到未覆盖问题。
  5. 镜像要求:文档强调需使用专用 dev-Ling-3.0-tiny 镜像,若用户使用公共镜像可能缺少 INT4 后端。

影响范围集中于文档与社区部署体验:用户可按配方直接部署 Ling-3.0-tiny INT4(显存约 5.8 GB,比 BF16 的 15.8 GB 大幅降低),适合单卡场景;对团队而言,cookbook 矩阵新增一个量化维度、6 个硬件 cell,后续需要维护验证状态与基准数据。整体影响面小,不涉及运行时代码。

INT4 依赖 #33561 运行时合入顺序 B200 使用未调优 Triton WNA16 且吞吐远低于 H200 INT4 与 BF16/FP8 基准口径不一致 仅 H200/B200 两个硬件已验证

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论