推理框架与 serving


1. 介绍

1.1. 背景

推理框架与 serving 层是 AI Infra 中离业务最近的一层:训练阶段考核的是 MFU 与有效训练时间,推理阶段考核的是 TTFT(首 token 时延)、TPOT(每输出 token 时延)与每 token 成本。2025-2026 年该方向的三条主线:

其一,KV Cache 管理成为竞争焦点。vLLM 的 PagedAttention(KV 分页)与 SGLang 的 RadixAttention(基数树 KV 复用)分别代表了"内存分页"与"前缀复用"两条路线,直接对应 Harness 六层模型的 L1 上下文工程。

其二,Prefill/Decode 分离成为大模型 serving 的默认架构。两个阶段的资源画像完全不同(Prefill 计算密集、Decode 带宽密集),分离部署后各自独立扩展,NVIDIA 侧的官方形态为 Dynamo 分离式服务编排(详见 04-硬件研发组 05-ai-infra.md),华为侧为 CloudMatrix-Infer 的 PDC 解耦(arXiv 2506.12708)。

其三,国产推理栈开源化。MindIE Turbo 于 2025-11-30 正式开源并与 vLLM-Ascend 对接,昇腾体系形成了"社区框架 + 加速插件 + 企业管理服务"的组合。

1.2. 定义与范围

推理框架与 serving 方向在运行侧覆盖:

环节内容典型对象
serving 引擎推理运行时与调度vLLM、SGLang、TensorRT-LLM、TGI
KV Cache 管理分页、复用、池化PagedAttention、RadixAttention、KV Cache 池化
架构模式分离式部署PD 分离、PDC 解耦、continuous batching
量化权重/激活压缩INT8(自适应 scale)、W8A8、NVFP4
国产栈昇腾体系推理软件MindIE、MindIE Turbo、vLLM-Ascend
服务治理多租户与故障恢复MindIE MS 类管理服务、扩缩容

边界说明:NVIDIA Dynamo 分离式编排与 NVFP4 的完整参数已由设计侧收录(详见 02-行业赋能/04-硬件研发组/05-ai-infra.md),本文交叉引用不重复展开;训练框架见 04-training-framework.md。

1.3. 在 AI Harness 体系中的定位

推理框架是 Harness 六层模型最直接的对应物,可以逐层建立对照:

Harness 层serving 栈对应物
L1 上下文工程PagedAttention / RadixAttention / KV Cache 池化(缓存、压缩、复用)
L2 工具与执行serving 引擎 = 模型执行的运行时
L3 编排与控制PD 分离、continuous batching、请求路由
L4 记忆与状态KV Cache 持久化与会话态
L5 评估与观测TTFT / TPOT / 吞吐 / 每 token 成本(在线指标)
L6 治理与安全多租户隔离、配额计量(MindIE MS 类)

瓶颈层判断:本方向六层俱全,但重心在 L1(KV 管理决定成本)与 L5(在线 SLO)。KV Cache 显存占用随上下文长度与并发线性增长,是推理成本的第一驱动因素;因此 KV 管理技术(分页/复用/池化)的选型对成本的影响大于引擎本身的算子优化。

1.4. 发展现状

1.4.1. 四大引擎技术标签与选型结论

引擎核心技术标签适用画像
vLLMPagedAttention(KV 分页)高并发吞吐优先,生态默认选项
SGLangRadixAttention(基数树 KV 复用)+ 结构化输出多轮对话/前缀共享场景,中并发
TensorRT-LLM编译式 kernel 优化(需按模型预编译,70B 约 2-4 小时)单请求低时延、新硬件深度绑定
TGI生产默认值路线快速上线的保守选择

第三方实测口径(GPT-OSS-120B/H100,C 级):高并发(100)下 vLLM 吞吐最高 4,741 tokens/s;中并发(50)SGLang 3,108 tokens/s;单请求 TensorRT-LLM 最优;B200 上 TensorRT-LLM 全指标领先(深度绑定新硬件的结果)。选型结论:无全场景赢家,按"并发模式 × 硬件代际"选型——此结论已写入本方向检查清单。

1.4.2. 架构与量化

  • PD 分离:Prefill 与 Decode 独立部署、独立扩展;华为侧扩展为 PDC 三子系统(Prefill/Decode/Caching)解耦。
  • 量化:INT8 路线(自适应 scale、离群值抑制、高效 GEMM、剪枝、误差补偿)在非 FP8 硬件上逼近 FP8 收益;W8A8 量化注意力(MindIE Turbo);NVFP4 在 NVIDIA 侧(详见设计侧文档)。
  • 规模化验证:硅基流动基于 CloudMatrix 架构"腾云"实现单卡 1,920 tokens/s 的 DeepSeek-R1 推理,比肩 NVIDIA 部署(发布会口径,B 级转述)。

图 5-1|PDC 解耦:Prefill / Decode / Caching 三子系统分离架构

PDC 解耦 serving 架构(CloudMatrix-Infer,arXiv 2506.12708) 示意:三子系统独立扩展,区别于传统 KV cache centric 架构 请求路由 peer-to-peer Prefill 子系统 计算密集 · 独立扩展 6688 tokens/s/NPU Decode 子系统 带宽密集 · 独立扩展 1943 tokens/s/NPU Caching 子系统 KV Cache / 权重 DRAM 池 EP320:320 专家 1:1 映射 UB 统一总线 内存语义 配套:INT8 量化(自适应 scale/离群值抑制/误差补偿)· 微批流水线 + 原生算子 · 输出 token 延迟 <50 ms

示意图:基于 arXiv 2506.12708(华为/硅基流动,A级)绘制;性能数字为该论文 DeepSeek-R1 实测口径。

2. 名词解释

术语英文 / 缩写释义
首 token 时延Time To First Token,TTFT从请求发出到首个 token 返回的时延,Prefill 阶段主导
每输出 token 时延Time Per Output Token,TPOT解码阶段平均每 token 输出时间
分页注意力PagedAttentionvLLM 的 KV 分页管理技术,消除显存碎片
基数树注意力RadixAttentionSGLang 的基数树 KV 复用技术,共享前缀免重复计算
预填充/解码分离Prefill/Decode Disaggregation,PD 分离两阶段独立部署独立扩展的 serving 架构
PDC 解耦Prefill/Decode/Caching Disaggregation三子系统(含 KV 缓存)解耦的扩展形态
连续批处理Continuous Batching请求完成后即时补位的动态批处理调度
KV 缓存KV Cache注意力键值缓存,推理显存的主要占用者
大规模专家并行Expert Parallelism 320,EP320DeepSeek-R1 的 320 个专家 1:1 映射到 320 个 die
前缀缓存Prefix Caching相同提示前缀的 KV 复用
权重激活量化W8A8权重与激活均为 8 位的量化方案
自适应缩放Adaptive ScaleINT8 量化中逐层动态确定缩放因子以抑制精度损失
离群值抑制Outlier Suppression处理激活离群值的量化技术
大规模专家并行负载均衡EPLB专家并行负载均衡(如 H100 对比实验中的 Perfect EPLB 口径)
分离式服务编排Disaggregated Serving OrchestrationNVIDIA Dynamo 类的 PD 分离编排框架
推理加速插件库MindIE Turbo昇腾 LLM 推理加速插件库,2025-11-30 开源
每百万 token 成本Cost per Million Tokens推理服务的经济性指标
服务等级目标SLO时延与吞吐的服务承诺,多租户治理的依据
输出 token 延迟Output Token Latency端到端输出时延,CM384 论文口径小于 50 ms
每卡吞吐Tokens/s per NPU归一化到单卡的吞吐口径,跨体系对比须注明硬件与量化格式

3. 案例

3.1. CloudMatrix-Infer:非 NVIDIA 体系的 MoE serving 全栈

证据级别:A(官方论文,arXiv 2506.12708)

3.1.1. 背景

DeepSeek-R1 类超大 MoE 模型(320 个激活专家)对推理系统提出三重挑战:专家路由的通信风暴、KV Cache 的显存压力、以及在不支持 FP8 的硬件上保持精度。该论文是业界首次公开非 NVIDIA 体系万卡级 MoE serving 全栈细节。

3.1.2. 方案

  • PDC 解耦:Prefill、Decode、Caching 三子系统独立扩展;peer-to-peer serving 架构,NPU 经 UB 直连 DRAM 池访问 KV Cache 与权重,区别于传统"KV cache centric"架构。
  • EP320:DeepSeek-R1 的 320 个专家 1:1 映射到 160 卡/320 die,消除专家路由的负载不均。
  • INT8 量化:自适应 scale、离群值抑制、高效 GEMM、剪枝、误差补偿,弥补硬件不支持 FP8 的短板。
  • 微批流水线 + 原生算子:跨子系统流水并行,算子级融合优化。

3.1.3. 效果

  • Prefill 6,688 tokens/s/NPU(4.45 tokens/s/TFLOPS),对比 SGLang@H100 Perfect EPLB 的 3.75 与 DeepSeek@H800 Profile 的 3.96。
  • Decode 1,943 tokens/s/NPU(1.29 tokens/s/TFLOPS)。
  • 输出 token 延迟小于 50 ms;TPOT 小于 15 ms 时维持 538 tokens/s。
  • 精度:INT8 量化后 16 项基准与 DeepSeek 官方 API 相当。
  • Harness 解读:该案例逐层印证了 1.3 节对照表——PDC 与 EP320 是 L3 编排、UB 直连 DRAM 池是 L1/L4 的 KV 管理、"16 项基准精度相当"是 L5 评估、量化与路由策略共同压低每 token 成本。

3.2. MindIE 与 vLLM-Ascend:昇腾推理栈的开源与企业级组合

证据级别:A/B(官方文档与发布事实);对比数字为 C 级厂商口径

3.2.1. 背景

昇腾体系需要既兼容社区生态(vLLM)又提供企业级能力的推理栈。MindIE Turbo 的开源与 vLLM-Ascend 的成熟使"社区框架 + 加速插件 + 管理服务"三层组合成型。

3.2.2. 方案

  • MindIE Turbo(昇腾 LLM 推理加速插件库,2025-11-30 正式开源):W8A8/W8A8QuantAttention 量化(MindStudio 产出可在 vLLM 一键使能);算子自动 patch;与 vLLM-Ascend 对接,无需改业务代码。
  • vLLM-Ascend:社区版 vLLM 在昇腾上的适配后端,保持 API 兼容。
  • MindIE MS 管理服务:多租户、故障重调度(宣称故障恢复从分钟级降至 30 秒级,C 级厂商口径 )。
  • 显存优化(社区帖口径,C 级):激活检查点 + ZeRO-3 式分布,宣称单卡最大序列 2048 → 4096、内存占用降低 42%。

3.2.3. 效果

  • 第三方对比口径(C 级):官方实测称同硬件 MindIE 峰值吞吐为社区 vLLM 的 2.3 倍、P99 延迟降低 62%;另一口径为"昇腾平台单卡低并发 vLLM-Ascend 略优、多卡高并发大模型/MoE 场景 MindIE 反超"。
  • 撰写纪律:上述对比数字均为厂商/第三方分析口径(C 级),只能标注"官方实测口径"引用,不得作为独立结论;确定性事实仅有开源日期、Apache 2.0 许可与 vLLM 一键使能(A 级)。
  • Harness 解读:MindIE MS 的多租户与故障重调度是 L6 治理(配额、恢复)在 serving 栈的直接实现;"vLLM 一键使能"降低了 L2 运行时的切换成本,是生态策略的关键设计。

3.3. 四框架并发选型实测:无全场景赢家

证据级别:B/C(第三方实测汇总,deploybase.ai 等,C 级需标注)

3.3.1. 背景

团队选型时最常见的问题是"哪个引擎最快"。第三方在 GPT-OSS-120B 上的受控实测提供了按"并发模式"切分的答案。

3.3.2. 方案

  • 固定硬件(H100)与模型(GPT-OSS-120B),变量仅引擎与并发度(1/50/100),统一测量吞吐与时延;另收集 B200 上 TensorRT-LLM 的结果作硬件代际对照。

3.3.3. 效果

  • 高并发(100):vLLM 吞吐最高 4,741 tokens/s。
  • 中并发(50):SGLang 3,108 tokens/s 最优。
  • 单请求:TensorRT-LLM 时延最优(预编译代价:70B 模型约 2-4 小时)。
  • 硬件代际影响:B200 上 TensorRT-LLM 全指标领先——引擎与硬件的绑定深度随代际提升。
  • Harness 解读:这是 L5 评估层"控制变量实测"的标准范式——结论不是"谁最快",而是"什么条件下谁最快";该结论转化为检查清单中的并发画像前置要求。

4. 实践标准

性质声明:以下为基于行业公开实践(arXiv 2506.12708、MindIE 官方文档、第三方实测)提炼的建议稿,非官方行业标准原文。组级上位规范见同目录 AGENTS.md;以下为推理框架与 serving 方向的裁剪版。

4.1. AGENTS.md 规范

4.1.1. AGENTS.md(AI Infra 组 · 推理框架与 serving 方向)

# AGENTS.md —— AI Infra 组 · 推理框架与 serving 方向

> 本文为基于行业实践提炼的建议稿,非官方行业标准原文。
> 上位规范:01-AI-Infra组/AGENTS.md(不可逆动作禁止清单、变更窗口、可观测要求)。

## 角色与边界
- 角色:推理 serving 智能体,负责引擎选型、PD 分离与批量参数设计、
  量化方案评估、KV Cache 管理策略、SLO 与成本核算。
- 不负责:多租户配额的最终分配(属 L6 治理人工决策)、
  训练侧问题(转交 04-training-framework)、硬件采购。
- 判定器为压测与线上指标:TTFT/TPOT/吞吐/每 token 成本必须来自
  受控压测或生产监控,禁止估算。

## 环境假设
执行前必须显式声明:
- 硬件代际与互联体系(决定引擎适配与量化格式可用集)。
- 引擎与版本(vLLM / SGLang / TensorRT-LLM / MindIE / vLLM-Ascend)、
  量化格式(INT8/W8A8/NVFP4 类)。
- 流量画像:并发分布、输入/输出长度分布、前缀重复率、峰值/均值比。
- SLO:TTFT/TPOT 目标、可用性要求、每 token 成本预算。
- 未声明流量画像与 SLO 时,禁止产出选型与容量结论。

## 上下文加载顺序(Context Budget)
1. 流量画像与 SLO。
2. 引擎版本与量化配置现状。
3. 压测基线与线上指标摘要。
4. 已知引擎问题与版本兼容清单。

## 工具契约
- 压测必须记录:并发数、输入/输出长度分布、量化格式、硬件代际、
  引擎版本——五要素缺一不可,否则结果不可比。
- 配置变更(批量、并行度、量化)可回滚,先在影子流量验证。
- PD 分离参数(Prefill/Decode 配比、路由策略)变更走变更窗口。

## 任务执行流程(SOP)
- S1 需求解析:流量画像 → 并发模式归类(单请求/中并发/高并发)。
- S2 基线压测:当前引擎在目标画像下的 TTFT/TPOT/吞吐/成本。
- S3 候选生成:引擎/量化/PD 配比候选,各附适用条件与预期收益。
- S4 受控压测:影子流量验证,五要素齐备记录。
- S5 精度核验:量化方案须过固定精度基准集(参照 16 项基准口径)。
- S6 成本核算:每 token 成本与预算差值。
- S7 证据打包与人工确认(生产切换走变更窗口)。

## 验证与证据要求
- 性能结论注明:并发模式、硬件代际、量化格式、引擎版本。
- 精度结论来自固定基准集,禁止只用困惑度单一指标。
- 厂商对比口径(如吞吐 2.3 倍)只能标"官方实测口径"引用。
- 每 token 成本给出计算过程(卡时成本 × 卡数 / 吞吐)。

## 失败与升级策略
- TPOT 超标 → 复核 PD 配比与量化格式,必要时扩容并记录。
- 量化后精度基准不达标 → 回退精度或换量化方案,禁止带病上线。
- 前缀命中率低于预期 → 检查 RadixAttention 类复用配置与路由亲和。
- 多租户争抢 → 升级治理人工,输出配额建议。

## 安全与合规红线
- 多租户严格隔离:禁止跨租户读取会话与 KV 数据。
- KV Cache 持久化数据按敏感等级管理。
- 生产切换与回滚走变更窗口,留审计记录。
- 禁止残留非标准占位符。

## 输出格式
- 首行:可判定结论 + 阻塞项。
- 压测报告:五要素 + TTFT/TPOT/吞吐/成本 + 与基线差值。
- 选型矩阵:引擎 × 并发模式 × 硬件代际。
- 待人工确认项:生产切换、配额调整。
- 数值规范:参数带单位;范围用 ~ 连接;百分比数值与 % 之间不留空格。

## 评估与自检
- 压测是否五要素齐备?
- 精度是否过了固定基准集?
- 厂商口径是否正确标注?
- 成本是否有计算过程?
- 是否残留非标准占位符?

4.2. SKILL.md 规范

4.2.1. SKILL.md(AI Infra 组 · 推理 serving 选型与 SLO 调优)

---
name: inference-serving-selection-and-slo
description: AI Infra 组推理框架方向标准技能——serving 引擎选型、PD 分离
  参数设计、量化方案评估与 SLO/成本核算。当需要选型 vLLM/SGLang/
  TensorRT-LLM/MindIE、设计 PD 分离、评估 KV Cache 策略、压测 SLO 时使用。
  触发词:推理框架、PD 分离、KV Cache、TTFT、TPOT、量化、vLLM、MindIE。
version: 1.0
created: 2026-09-12
---

# AI Infra 组 · 推理 serving 选型与 SLO 调优

> 本文为基于行业实践提炼的建议稿,非官方行业标准原文。
> 上位规范:01-AI-Infra组/AGENTS.md。

## 适用场景
- serving 引擎选型(按并发模式 × 硬件代际矩阵)。
- PD 分离(或 PDC 三子系统)参数设计与路由策略。
- 量化方案评估(INT8/W8A8/NVFP4 类)与精度基准核验。
- KV Cache 管理策略(分页/前缀复用/池化/持久化)。
- 多租户与故障重调度能力评估(MindIE MS 类)。
- SLO 未达标或每 token 成本超预算的调优。

## 前置条件
- 已声明硬件代际、引擎版本、流量画像、SLO 与成本预算。
- 固定精度基准集可用;影子流量环境可用。
- 线上监控可采集 TTFT/TPOT/吞吐分布。

## 输入
| 输入项 | 说明 | 必需 |
|---|---|---|
| 流量画像 | 并发分布、输入/输出长度、前缀重复率 | 是 |
| SLO 与预算 | TTFT/TPOT 目标、可用性、每 token 成本上限 | 是 |
| 引擎现状 | 版本、量化配置、PD 配比 | 是 |
| 压测基线 | 当前画像下的四指标 | 是 |
| 精度基准集 | 固定评测集与达标线 | 是 |

## 输出
| 输出项 | 说明 | 必需 |
|---|---|---|
| 可判定结论 | 通过 / 不通过 / 部分通过 + 阻塞项 | 是 |
| 选型矩阵 | 引擎 × 并发模式 × 硬件代际,附口径 | 条件必需 |
| 压测报告 | 五要素 + TTFT/TPOT/吞吐/成本与差值 | 是 |
| 精度核验报告 | 固定基准集结果与达标判定 | 条件必需 |
| 变更方案 | PD 配比/量化/引擎切换 + 回滚命令 | 条件必需 |
| 待人工确认项 | 生产切换、配额调整 | 是 |

## 执行步骤
1. 需求解析:流量画像归类并发模式;明确 SLO 与成本红线。
2. 基线压测:五要素齐备记录当前引擎四指标。
3. 候选生成:引擎、量化、PD 配比候选,各附适用条件与预期收益
   (参照公开口径:vLLM 高并发、SGLang 中并发与前缀复用、
   TensorRT-LLM 单请求与最新硬件)。
4. 受控压测:影子流量执行,记录五要素与四指标。
5. 精度核验:量化候选过固定基准集(参照 CM384 案例 16 项基准口径)。
6. 成本核算:卡时成本 × 卡数 / 吞吐 → 每 token 成本对照预算。
7. 变更打包:生产切换方案 + 回滚命令,进入审批队列。
8. 交付:结论 + 报告 + 待确认项。

## 质量标准(DoD)
- 压测五要素齐备;性能数字注明并发模式/硬件代际/量化格式/引擎版本。
- 精度结论来自固定基准集,非单一困惑度。
- 厂商口径标"官方实测口径",C 级数据标 [待核实]。
- 成本有计算过程。
- 参照口径(不得直接套用):CM384 Prefill 6,688 / Decode 1,943
  tokens/s/NPU、输出延迟 <50 ms(A级论文实测);MindIE Turbo 开源
  2025-11-30、Apache 2.0、vLLM 一键使能(A级);MindIE 吞吐 2.3 倍/
  P99 -62% 为厂商口径(C 级,仅限标注引用)。

## 常见失败与处理
| 失败模式 | 现象 | 处理 |
|---|---|---|
| 压测不可比 | 缺并发分布或量化格式记录 | 补齐五要素重测 |
| 引擎错配 | 高并发场景用了单请求优化引擎 | 按并发模式矩阵重选 |
| 精度滑坡 | 量化后基准集不达标 | 回退精度或换方案,禁止上线 |
| KV 膨胀 | 长上下文导致显存溢出 | 分页/复用/池化策略复核 |
| 前缀失效 | 复用命中率低 | 检查路由亲和与前缀稳定性 |
| SLO 背离 | TPOT 或 TTFT 超标 | 调 PD 配比、扩容或降级并记录 |
| 跨租户越界 | 读取他租户会话 | 立即中断并上报 |

## 示例
任务:DeepSeek-R1 类 MoE 模型上线 serving,TTFT 目标 2 秒内、
每 token 成本预算给定,在昇腾超节点体系选型。
1. 需求解析:320 专家 → EP 并行;输入长、前缀重复率中高 → Prefill
   计算密集为主。
2. 基线压测:社区 vLLM-Ascend 默认配置记录四指标。
3. 候选:PDC 解耦 + EP320 + INT8(参照 arXiv 2506.12708 实证),
   对照 MindIE Turbo W8A8 一键使能路线。
4. 受控压测:影子流量验证 PD 配比,Prefill 侧吞吐对齐公开口径量级。
5. 精度核验:INT8 方案过 16 项基准集,与官方 API 口径一致。
6. 成本核算:每 token 成本低于预算,给出计算过程。
7. 交付:通过——采用 PDC + EP320 + INT8;压测报告、精度报告、
   回滚方案与待确认项齐备。
(示例流程为方法论演示;具体数值以实际压测为准。)

4.3. 落地检查清单

序号检查项判定标准必需
1环境声明硬件代际、引擎版本、流量画像、SLO 已声明
2压测五要素并发、输入/输出长度、量化、硬件、版本齐备
3四指标报告TTFT/TPOT/吞吐/成本与基线差值
4并发模式归类单请求/中并发/高并发画像明确
5精度基准量化方案过固定基准集条件必需
6KV 策略分页/复用/池化/持久化策略已评估
7PD 配比Prefill/Decode(/Caching)配比有依据条件必需
8厂商口径厂商对比数字标"官方实测口径"或
9成本核算每 token 成本有计算过程
10多租户隔离无跨租户会话/KV 访问条件必需
11变更回滚生产切换方案含回滚命令与窗口
12占位符清理无 XX、___ 等非标准占位符

5. 总结

推理框架与 serving 方向是 Harness 六层模型对应关系最完整的 Infra 方向。三条结论:

  1. KV Cache 管理是成本的第一杠杆。 PagedAttention 与 RadixAttention 分别从分页与前缀复用两个方向压缩 KV 开销;PDC 解耦进一步把 Caching 独立成子系统。KV 策略选型对每 token 成本的影响大于引擎算子优化。
  2. 选型结论是"条件化"而非"唯一最优"。 第三方实测证明:高并发选 vLLM、中并发与前缀复用选 SGLang、单请求与最新硬件选 TensorRT-LLM;任何脱离并发画像与硬件代际的"最快引擎"结论都不可信。
  3. 国产栈走"开源兼容 + 企业能力"组合路线。 MindIE Turbo 开源并 vLLM 一键使能(A级事实),叠加管理服务的多租户与故障重调度(L6),使昇腾体系的 serving 迁移成本可控;但其对比性能数字多为厂商口径(C 级),引用必须标注。

信息缺口声明

以下条目未获 A/B 级来源确认,已在正文标注 :

  1. 四框架 GPT-OSS-120B/H100 实测数字(4,741 / 3,108 tokens/s 等)为第三方实测汇总(C 级),建议在关键决策前自行复测。
  2. MindIE 同硬件峰值吞吐 2.3 倍、P99 延迟降低 62% 为厂商口径(C 级),仅可标"官方实测口径"引用。
  3. MindIE MS 故障恢复 30 秒级、单卡序列 2048 → 4096、内存占用降低 42% 为厂商/社区帖口径(C 级)。
  4. 硅基流动单卡 1,920 tokens/s 的 DeepSeek-R1 推理为发布会口径(B 级转述),无独立复现。
  5. MLPerf Inference v5.1(Nebius GB200 提交)为推理侧最新确认口径(B 级转述),v5.1 之后无确认结果。
  6. 未检索到本方向公开 AGENTS.md/SKILL.md 标准范本,本文为建议稿。

6. 参考资料

  1. Serving Large Language Models on Huawei CloudMatrix384 — 华为/硅基流动,arXiv 2506.12708,2025-06。https://arxiv.org/pdf/2506.12708
  2. MindIE Turbo 开源仓库 — 昇腾(gitcode/Ascend)。https://gitcode.com/Ascend/MindIE-Turbo
  3. vLLM 官方文档与仓库 — vLLM 项目。https://github.com/vllm-project/vllm
  4. SGLang 官方仓库 — SGLang 项目。https://github.com/sgl-project/sglang
  5. TensorRT-LLM — NVIDIA GitHub。https://github.com/NVIDIA/TensorRT-LLM
  6. vLLM-Ascend — vLLM 昇腾后端。https://github.com/vllm-project/vllm-ascend
  7. NVIDIA Dynamo(分离式服务编排,设计侧交叉引用)— NVIDIA。https://developer.nvidia.com/
  8. 昇腾社区 MindIE 文档 — 华为昇腾。https://www.hiascend.com/
  9. DeepSeek-R1 官方 API 与技术报告 — DeepSeek。https://arxiv.org/abs/2501.12948
  10. AI Infra(设计侧,Dynamo/NVFP4 交叉引用)— 02-行业赋能/04-硬件研发组/05-ai-infra.md,2026-09-12。

Inference Frameworks & Serving

1. Introduction

1.1. Background

The inference-framework-and-serving layer is the layer closest to the business in AI Infra: training is measured by MFU and effective training time, while inference is measured by TTFT (time to first token), TPOT (time per output token), and cost per token. Three main threads ran in this direction during 2025-2026:

First, KV Cache management has become a competitive focus. vLLM's PagedAttention (KV paging) and SGLang's RadixAttention (radix-tree KV reuse) represent the two routes of "memory paging" and "prefix reuse", respectively, directly mapping to L1 context engineering of the Harness six-layer model.

Second, Prefill/Decode disaggregation has become the default architecture for large-model serving. The two phases have completely different resource profiles (Prefill is compute-intensive, Decode is bandwidth-intensive), and once deployed separately each scales independently. NVIDIA's official form is Dynamo disaggregated serving orchestration (see 04-hardware-research-05-ai-infra.md), while Huawei's is the PDC disaggregation of CloudMatrix-Infer (arXiv 2506.12708).

Third, the domestic inference stack has gone open source. MindIE Turbo was officially open-sourced on 2025-11-30 and integrated with vLLM-Ascend, forming the Ascend ecosystem combination of "community framework + acceleration plugin + enterprise management service".

1.2. Scope & Definitions

The inference-framework-and-serving direction covers, on the runtime side:

StageContentTypical Objects
serving engineInference runtime and schedulingvLLM, SGLang, TensorRT-LLM, TGI
KV Cache managementPaging, reuse, poolingPagedAttention, RadixAttention, KV Cache pooling
Architecture patternsDisaggregated deploymentPD disaggregation, PDC disaggregation, continuous batching
QuantizationWeight/activation compressionINT8 (adaptive scale), W8A8, NVFP4
Domestic stackAscend inference softwareMindIE, MindIE Turbo, vLLM-Ascend
Service governanceMulti-tenancy and failure recoveryMindIE MS-class management services, scaling

Boundary note: The complete parameters of NVIDIA Dynamo disaggregated orchestration and NVFP4 have been captured on the design side (see 02-industry-empowerment/04-hardware-research/05-ai-infra.md); this document cross-references them without repeating. For training frameworks, see 04-training-framework.md.

1.3. Position in the AI Harness Stack

The inference framework is the most direct counterpart of the Harness six-layer model, and a layer-by-layer mapping can be established:

Harness LayerServing Stack Counterpart
L1 Context engineeringPagedAttention / RadixAttention / KV Cache pooling (caching, compression, reuse)
L2 Tools and executionserving engine = the runtime that executes the model
L3 Orchestration and controlPD disaggregation, continuous batching, request routing
L4 Memory and stateKV Cache persistence and session state
L5 Evaluation and observabilityTTFT / TPOT / throughput / cost per token (online metrics)
L6 Governance and securityMulti-tenant isolation, quota metering (MindIE MS class)

Bottleneck-layer assessment: This direction spans all six layers, but the center of gravity is L1 (KV management determines cost) and L5 (online SLO). KV Cache memory usage grows linearly with context length and concurrency, making it the primary driver of inference cost; therefore, the choice of KV management technology (paging/reuse/pooling) has a greater impact on cost than the engine's own operator optimization.

1.4. Current State

1.4.1. Technology Labels & Selection Verdicts for the Four Engines

EngineCore Technology LabelFit Profile
vLLMPagedAttention (KV paging)High-concurrency throughput priority, default ecosystem option
SGLangRadixAttention (radix-tree KV reuse) + structured outputMulti-turn dialog / prefix-sharing scenarios, medium concurrency
TensorRT-LLMCompiled kernel optimization (requires per-model precompilation, ~2-4 hours for 70B)Low latency for single requests, deep binding to new hardware
TGIProduction-default routeConservative choice for fast rollout

Third-party benchmark figures (GPT-OSS-120B/H100, grade C): at high concurrency (100), vLLM has the highest throughput at 4,741 tokens/s; at medium concurrency (50), SGLang at 3,108 tokens/s; for single requests, TensorRT-LLM is best; on B200, TensorRT-LLM leads across all metrics (the result of deep binding to new hardware). Selection verdict: there is no all-scenario winner; select according to "concurrency pattern × hardware generation" — this conclusion is already written into this direction's checklist.

1.4.2. Architecture & Quantization

  • PD disaggregation: Prefill and Decode are deployed and scaled independently; on the Huawei side this extends to the PDC three-subsystem (Prefill/Decode/Caching) disaggregation.
  • Quantization: The INT8 route (adaptive scale, outlier suppression, efficient GEMM, pruning, error compensation) approaches FP8 benefits on non-FP8 hardware; W8A8 quantized attention (MindIE Turbo); NVFP4 on the NVIDIA side (see design-side documents).
  • Scale validation: SiliconFlow, based on the CloudMatrix architecture "TengYun", achieved single-card DeepSeek-R1 inference at 1,920 tokens/s, matching NVIDIA deployments (press-conference figures, grade-B relay).

Figure 5-1 | PDC disaggregation: three-subsystem separation architecture of Prefill / Decode / Caching

PDC 解耦 serving 架构(CloudMatrix-Infer,arXiv 2506.12708) 示意:三子系统独立扩展,区别于传统 KV cache centric 架构 请求路由 peer-to-peer Prefill 子系统 计算密集 · 独立扩展 6688 tokens/s/NPU Decode 子系统 带宽密集 · 独立扩展 1943 tokens/s/NPU Caching 子系统 KV Cache / 权重 DRAM 池 EP320:320 专家 1:1 映射 UB 统一总线 内存语义 配套:INT8 量化(自适应 scale/离群值抑制/误差补偿)· 微批流水线 + 原生算子 · 输出 token 延迟 <50 ms

Schematic: drawn based on arXiv 2506.12708 (Huawei/SiliconFlow, grade A); the performance figures are that paper's measured numbers for DeepSeek-R1.

2. Glossary

TermEnglish / AbbreviationDefinition
Time to first tokenTime To First Token, TTFTThe latency from when a request is issued to when the first token returns; dominated by the Prefill phase
Time per output tokenTime Per Output Token, TPOTThe average output time per token in the decode phase
Paged attentionPagedAttentionvLLM's KV paging management technique that eliminates memory fragmentation
Radix-tree attentionRadixAttentionSGLang's radix-tree KV reuse technique that avoids recomputing shared prefixes
Prefill/Decode disaggregationPrefill/Decode Disaggregation, PD disaggregationA serving architecture in which the two phases are deployed and scaled independently
PDC disaggregationPrefill/Decode/Caching DisaggregationA scaling form in which three subsystems (including KV caching) are disaggregated
Continuous batchingContinuous BatchingDynamic batching scheduling in which new requests immediately fill slots after requests complete
KV cacheKV CacheThe attention key-value cache, the main consumer of inference memory
Large-scale expert parallelismExpert Parallelism 320, EP320DeepSeek-R1's 320 experts mapped 1:1 to 320 dies
Prefix cachingPrefix CachingKV reuse for identical prompt prefixes
Weight-activation quantizationW8A8A quantization scheme in which both weights and activations are 8 bits
Adaptive scaleAdaptive ScaleDynamically determining the scale factor per layer in INT8 quantization to suppress precision loss
Outlier suppressionOutlier SuppressionQuantization techniques for handling activation outliers
Expert parallelism load balancingEPLBExpert-parallel load balancing (e.g., the Perfect EPLB baseline in H100 comparisons)
Disaggregated serving orchestrationDisaggregated Serving OrchestrationAn orchestration framework for PD disaggregation such as NVIDIA Dynamo
Inference acceleration plugin libraryMindIE TurboAscend's LLM inference acceleration plugin library, open-sourced on 2025-11-30
Cost per million tokensCost per Million TokensThe economic metric of inference services
Service level objectiveSLOThe service commitment on latency and throughput, the basis for multi-tenant governance
Output token latencyOutput Token LatencyEnd-to-end output latency, below 50 ms per the CM384 paper
Throughput per cardTokens/s per NPUA throughput figure normalized to a single card; cross-ecosystem comparisons must state the hardware and quantization format

3. Case Studies

3.1. CloudMatrix-Infer: A Full MoE Serving Stack Outside the NVIDIA Ecosystem

Evidence level: A (official paper, arXiv 2506.12708)

3.1.1. Background

Ultra-large MoE models of the DeepSeek-R1 type (320 activated experts) pose three challenges for inference systems: communication storms in expert routing, memory pressure from the KV Cache, and maintaining precision on hardware that does not support FP8. This paper is the industry's first public disclosure of the full details of a multi-thousand-card (10,000-card class) MoE serving stack outside the NVIDIA ecosystem.

3.1.2. Approach

  • PDC disaggregation: The Prefill, Decode, and Caching subsystems scale independently; a peer-to-peer serving architecture in which NPUs access the KV Cache and weights through UB directly to the DRAM pool, differing from the traditional "KV cache centric" architecture.
  • EP320: DeepSeek-R1's 320 experts are mapped 1:1 to 160 cards/320 dies, eliminating load imbalance in expert routing.
  • INT8 quantization: Adaptive scale, outlier suppression, efficient GEMM, pruning, and error compensation make up for the hardware's lack of FP8 support.
  • Micro-batch pipeline + native operators: Pipeline parallelism across subsystems with operator-level fused optimization.

3.1.3. Results

  • Prefill 6,688 tokens/s/NPU (4.45 tokens/s/TFLOPS), versus 3.75 for SGLang@H100 Perfect EPLB and 3.96 for DeepSeek@H800 Profile.
  • Decode 1,943 tokens/s/NPU (1.29 tokens/s/TFLOPS).
  • Output token latency below 50 ms; maintains 538 tokens/s while TPOT is below 15 ms.
  • Precision: after INT8 quantization, 16 benchmarks are on par with the official DeepSeek API.
  • Harness reading: This case verifies the mapping table in section 1.3 layer by layer — PDC and EP320 are L3 orchestration, direct UB access to the DRAM pool is L1/L4 KV management, "precision on par across 16 benchmarks" is L5 evaluation, and quantization and routing strategies together lower the cost per token.

3.2. MindIE & vLLM-Ascend: Open Source & Enterprise Serving Stack for Ascend

Evidence level: A/B (official documentation and release facts); comparison figures are grade-C vendor figures

3.2.1. Background

The Ascend ecosystem needs an inference stack that is both compatible with the community ecosystem (vLLM) and offers enterprise-grade capabilities. The open-sourcing of MindIE Turbo and the maturity of vLLM-Ascend have formed a three-layer combination of "community framework + acceleration plugin + management service".

3.2.2. Approach

  • MindIE Turbo (Ascend LLM inference acceleration plugin library, officially open-sourced on 2025-11-30): W8A8/W8A8QuantAttention quantization (MindStudio output can be enabled in vLLM with one click); automatic operator patching; integrates with vLLM-Ascend without changing business code.
  • vLLM-Ascend: The adaptation backend of community vLLM on Ascend, maintaining API compatibility.
  • MindIE MS management service: Multi-tenancy and failure rescheduling (claims failure recovery reduced from minutes to roughly 30 seconds, grade-C vendor figure).
  • Memory optimization (community-post figures, grade C): activation checkpointing + ZeRO-3-style distribution, claiming single-card maximum sequence 2048 → 4096 and 42% lower memory usage.

3.2.3. Results

  • Third-party comparison figures (grade C): official measurements claim that on the same hardware, MindIE's peak throughput is 2.3× that of community vLLM and P99 latency drops by 62%; another account states "on Ascend, vLLM-Ascend is slightly better for single-card low-concurrency, while MindIE overtakes it for multi-card high-concurrency large-model/MoE scenarios".
  • Writing discipline: All comparison figures above are vendor/third-party analysis figures (grade C) and may only be cited with the "official measured" label, not treated as independent conclusions; the only certain facts are the open-source date, the Apache 2.0 license, and one-click enablement in vLLM (grade A).
  • Harness reading: MindIE MS's multi-tenancy and failure rescheduling are the direct implementation of L6 governance (quota, recovery) in the serving stack; "one-click enablement in vLLM" lowers the switching cost of the L2 runtime and is a key design of the ecosystem strategy.

3.3. Four-Framework Concurrency Selection Benchmark: No All-Scenario Winner

Evidence level: B/C (compilation of third-party benchmarks, deploybase.ai, etc.; grade C must be labeled)

3.3.1. Background

The most common question during team selection is "which engine is fastest". Controlled third-party benchmarks on GPT-OSS-120B provide an answer sliced by "concurrency pattern".

3.3.2. Approach

  • Fix the hardware (H100) and model (GPT-OSS-120B); vary only the engine and concurrency (1/50/100), and uniformly measure throughput and latency; additionally collect TensorRT-LLM results on B200 for a hardware-generation comparison.

3.3.3. Results

  • High concurrency (100): vLLM has the highest throughput at 4,741 tokens/s.
  • Medium concurrency (50): SGLang is best at 3,108 tokens/s.
  • Single request: TensorRT-LLM has the lowest latency (precompilation cost: ~2-4 hours for a 70B model).
  • Hardware-generation impact: on B200, TensorRT-LLM leads across all metrics — the engine-hardware binding grows deeper with each generation.
  • Harness reading: This is the standard paradigm of "controlled-variable benchmarking" at the evaluation layer L5 — the conclusion is not "who is fastest" but "who is fastest under what conditions"; this conclusion is turned into a prerequisite for concurrency profiling in the checklist.

4. Practice Standards

Nature Statement: The following is a draft proposal distilled from public industry practices (arXiv 2506.12708, MindIE official documentation, and third-party benchmarks), not the original text of an official industry standard. For the authoritative group-level specification, see AGENTS.md in the same directory; the following is an abridged version for the inference-frameworks-and-serving direction.

4.1. AGENTS.md Specification

4.1.1. AGENTS.md (AI Infra Group · Inference Frameworks & Serving Direction)

# AGENTS.md —— AI Infra 组 · 推理框架与 serving 方向

> 本文为基于行业实践提炼的建议稿,非官方行业标准原文。
> 上位规范:01-AI-Infra组/AGENTS.md(不可逆动作禁止清单、变更窗口、可观测要求)。

## 角色与边界
- 角色:推理 serving 智能体,负责引擎选型、PD 分离与批量参数设计、
  量化方案评估、KV Cache 管理策略、SLO 与成本核算。
- 不负责:多租户配额的最终分配(属 L6 治理人工决策)、
  训练侧问题(转交 04-training-framework)、硬件采购。
- 判定器为压测与线上指标:TTFT/TPOT/吞吐/每 token 成本必须来自
  受控压测或生产监控,禁止估算。

## 环境假设
执行前必须显式声明:
- 硬件代际与互联体系(决定引擎适配与量化格式可用集)。
- 引擎与版本(vLLM / SGLang / TensorRT-LLM / MindIE / vLLM-Ascend)、
  量化格式(INT8/W8A8/NVFP4 类)。
- 流量画像:并发分布、输入/输出长度分布、前缀重复率、峰值/均值比。
- SLO:TTFT/TPOT 目标、可用性要求、每 token 成本预算。
- 未声明流量画像与 SLO 时,禁止产出选型与容量结论。

## 上下文加载顺序(Context Budget)
1. 流量画像与 SLO。
2. 引擎版本与量化配置现状。
3. 压测基线与线上指标摘要。
4. 已知引擎问题与版本兼容清单。

## 工具契约
- 压测必须记录:并发数、输入/输出长度分布、量化格式、硬件代际、
  引擎版本——五要素缺一不可,否则结果不可比。
- 配置变更(批量、并行度、量化)可回滚,先在影子流量验证。
- PD 分离参数(Prefill/Decode 配比、路由策略)变更走变更窗口。

## 任务执行流程(SOP)
- S1 需求解析:流量画像 → 并发模式归类(单请求/中并发/高并发)。
- S2 基线压测:当前引擎在目标画像下的 TTFT/TPOT/吞吐/成本。
- S3 候选生成:引擎/量化/PD 配比候选,各附适用条件与预期收益。
- S4 受控压测:影子流量验证,五要素齐备记录。
- S5 精度核验:量化方案须过固定精度基准集(参照 16 项基准口径)。
- S6 成本核算:每 token 成本与预算差值。
- S7 证据打包与人工确认(生产切换走变更窗口)。

## 验证与证据要求
- 性能结论注明:并发模式、硬件代际、量化格式、引擎版本。
- 精度结论来自固定基准集,禁止只用困惑度单一指标。
- 厂商对比口径(如吞吐 2.3 倍)只能标"官方实测口径"引用。
- 每 token 成本给出计算过程(卡时成本 × 卡数 / 吞吐)。

## 失败与升级策略
- TPOT 超标 → 复核 PD 配比与量化格式,必要时扩容并记录。
- 量化后精度基准不达标 → 回退精度或换量化方案,禁止带病上线。
- 前缀命中率低于预期 → 检查 RadixAttention 类复用配置与路由亲和。
- 多租户争抢 → 升级治理人工,输出配额建议。

## 安全与合规红线
- 多租户严格隔离:禁止跨租户读取会话与 KV 数据。
- KV Cache 持久化数据按敏感等级管理。
- 生产切换与回滚走变更窗口,留审计记录。
- 禁止残留非标准占位符。

## 输出格式
- 首行:可判定结论 + 阻塞项。
- 压测报告:五要素 + TTFT/TPOT/吞吐/成本 + 与基线差值。
- 选型矩阵:引擎 × 并发模式 × 硬件代际。
- 待人工确认项:生产切换、配额调整。
- 数值规范:参数带单位;范围用 ~ 连接;百分比数值与 % 之间不留空格。

## 评估与自检
- 压测是否五要素齐备?
- 精度是否过了固定基准集?
- 厂商口径是否正确标注?
- 成本是否有计算过程?
- 是否残留非标准占位符?

4.2. SKILL.md Specification

4.2.1. SKILL.md (AI Infra Group · Inference Serving Selection & SLO Tuning)

---
name: inference-serving-selection-and-slo
description: AI Infra 组推理框架方向标准技能——serving 引擎选型、PD 分离
  参数设计、量化方案评估与 SLO/成本核算。当需要选型 vLLM/SGLang/
  TensorRT-LLM/MindIE、设计 PD 分离、评估 KV Cache 策略、压测 SLO 时使用。
  触发词:推理框架、PD 分离、KV Cache、TTFT、TPOT、量化、vLLM、MindIE。
version: 1.0
created: 2026-09-12
---

# AI Infra 组 · 推理 serving 选型与 SLO 调优

> 本文为基于行业实践提炼的建议稿,非官方行业标准原文。
> 上位规范:01-AI-Infra组/AGENTS.md。

## 适用场景
- serving 引擎选型(按并发模式 × 硬件代际矩阵)。
- PD 分离(或 PDC 三子系统)参数设计与路由策略。
- 量化方案评估(INT8/W8A8/NVFP4 类)与精度基准核验。
- KV Cache 管理策略(分页/前缀复用/池化/持久化)。
- 多租户与故障重调度能力评估(MindIE MS 类)。
- SLO 未达标或每 token 成本超预算的调优。

## 前置条件
- 已声明硬件代际、引擎版本、流量画像、SLO 与成本预算。
- 固定精度基准集可用;影子流量环境可用。
- 线上监控可采集 TTFT/TPOT/吞吐分布。

## 输入
| 输入项 | 说明 | 必需 |
|---|---|---|
| 流量画像 | 并发分布、输入/输出长度、前缀重复率 | 是 |
| SLO 与预算 | TTFT/TPOT 目标、可用性、每 token 成本上限 | 是 |
| 引擎现状 | 版本、量化配置、PD 配比 | 是 |
| 压测基线 | 当前画像下的四指标 | 是 |
| 精度基准集 | 固定评测集与达标线 | 是 |

## 输出
| 输出项 | 说明 | 必需 |
|---|---|---|
| 可判定结论 | 通过 / 不通过 / 部分通过 + 阻塞项 | 是 |
| 选型矩阵 | 引擎 × 并发模式 × 硬件代际,附口径 | 条件必需 |
| 压测报告 | 五要素 + TTFT/TPOT/吞吐/成本与差值 | 是 |
| 精度核验报告 | 固定基准集结果与达标判定 | 条件必需 |
| 变更方案 | PD 配比/量化/引擎切换 + 回滚命令 | 条件必需 |
| 待人工确认项 | 生产切换、配额调整 | 是 |

## 执行步骤
1. 需求解析:流量画像归类并发模式;明确 SLO 与成本红线。
2. 基线压测:五要素齐备记录当前引擎四指标。
3. 候选生成:引擎、量化、PD 配比候选,各附适用条件与预期收益
   (参照公开口径:vLLM 高并发、SGLang 中并发与前缀复用、
   TensorRT-LLM 单请求与最新硬件)。
4. 受控压测:影子流量执行,记录五要素与四指标。
5. 精度核验:量化候选过固定基准集(参照 CM384 案例 16 项基准口径)。
6. 成本核算:卡时成本 × 卡数 / 吞吐 → 每 token 成本对照预算。
7. 变更打包:生产切换方案 + 回滚命令,进入审批队列。
8. 交付:结论 + 报告 + 待确认项。

## 质量标准(DoD)
- 压测五要素齐备;性能数字注明并发模式/硬件代际/量化格式/引擎版本。
- 精度结论来自固定基准集,非单一困惑度。
- 厂商口径标"官方实测口径",C 级数据标 [待核实]。
- 成本有计算过程。
- 参照口径(不得直接套用):CM384 Prefill 6,688 / Decode 1,943
  tokens/s/NPU、输出延迟 <50 ms(A级论文实测);MindIE Turbo 开源
  2025-11-30、Apache 2.0、vLLM 一键使能(A级);MindIE 吞吐 2.3 倍/
  P99 -62% 为厂商口径(C 级,仅限标注引用)。

## 常见失败与处理
| 失败模式 | 现象 | 处理 |
|---|---|---|
| 压测不可比 | 缺并发分布或量化格式记录 | 补齐五要素重测 |
| 引擎错配 | 高并发场景用了单请求优化引擎 | 按并发模式矩阵重选 |
| 精度滑坡 | 量化后基准集不达标 | 回退精度或换方案,禁止上线 |
| KV 膨胀 | 长上下文导致显存溢出 | 分页/复用/池化策略复核 |
| 前缀失效 | 复用命中率低 | 检查路由亲和与前缀稳定性 |
| SLO 背离 | TPOT 或 TTFT 超标 | 调 PD 配比、扩容或降级并记录 |
| 跨租户越界 | 读取他租户会话 | 立即中断并上报 |

## 示例
任务:DeepSeek-R1 类 MoE 模型上线 serving,TTFT 目标 2 秒内、
每 token 成本预算给定,在昇腾超节点体系选型。
1. 需求解析:320 专家 → EP 并行;输入长、前缀重复率中高 → Prefill
   计算密集为主。
2. 基线压测:社区 vLLM-Ascend 默认配置记录四指标。
3. 候选:PDC 解耦 + EP320 + INT8(参照 arXiv 2506.12708 实证),
   对照 MindIE Turbo W8A8 一键使能路线。
4. 受控压测:影子流量验证 PD 配比,Prefill 侧吞吐对齐公开口径量级。
5. 精度核验:INT8 方案过 16 项基准集,与官方 API 口径一致。
6. 成本核算:每 token 成本低于预算,给出计算过程。
7. 交付:通过——采用 PDC + EP320 + INT8;压测报告、精度报告、
   回滚方案与待确认项齐备。
(示例流程为方法论演示;具体数值以实际压测为准。)

4.3. Deployment Checklist

No.Check ItemAcceptance CriteriaRequired
1Environment declarationHardware generation, engine version, traffic profile, and SLO declaredYes
2Five benchmarking elementsConcurrency, input/output lengths, quantization, hardware, and version all presentYes
3Four-metric reportTTFT/TPOT/throughput/cost and delta from baselineYes
4Concurrency-pattern classificationSingle-request / medium-concurrency / high-concurrency profile clearYes
5Precision benchmarkQuantization scheme passes the fixed benchmark setConditionally required
6KV strategyPaging/reuse/pooling/persistence strategy evaluatedYes
7PD ratioPrefill/Decode (/Caching) ratio is justifiedConditionally required
8Vendor figuresVendor comparison numbers labeled "official measured" or [To be verified]Yes
9Cost calculationCost per token has a calculation processYes
10Multi-tenant isolationNo cross-tenant session/KV accessConditionally required
11Change and rollbackProduction-switch plan includes rollback commands and a windowYes
12Placeholder cleanupNo non-standard placeholders such as XX, ___Yes

5. Summary

The inference-framework-and-serving direction is the Infra direction with the most complete correspondence to the Harness six-layer model. Three conclusions:

  1. KV Cache management is the first lever on cost. PagedAttention and RadixAttention compress KV overhead from the two directions of paging and prefix reuse respectively; PDC disaggregation further makes Caching an independent subsystem. The choice of KV strategy has a greater impact on cost per token than engine operator optimization.
  2. The selection conclusion is "conditional" rather than "one unique optimum". Third-party benchmarks show: choose vLLM for high concurrency, SGLang for medium concurrency and prefix reuse, and TensorRT-LLM for single requests and the newest hardware; any "fastest engine" conclusion that detaches from the concurrency profile and hardware generation is untrustworthy.
  3. The domestic stack follows an "open-source compatibility + enterprise capability" combination route. MindIE Turbo is open source with one-click enablement in vLLM (grade-A fact), combined with the multi-tenancy and failure rescheduling of the management service (L6), making the Ascend ecosystem's serving migration cost controllable; however, most of its comparison performance figures are vendor figures (grade C) and must be labeled when cited.

Information Gap Statement

The following items have not been confirmed by grade-A/B sources and are marked [To be verified] in the text:

  1. The four-framework GPT-OSS-120B/H100 benchmark figures (4,741 / 3,108 tokens/s, etc.) are a compilation of third-party benchmarks (grade C); we recommend re-benchmarking yourself before key decisions.
  2. MindIE's same-hardware peak-throughput 2.3× and P99 latency reduction of 62% are vendor figures (grade C) and may only be cited with the "official measured" label.
  3. MindIE MS failure recovery of roughly 30 seconds, single-card sequence 2048 → 4096, and 42% lower memory usage are vendor/community-post figures (grade C).
  4. SiliconFlow's single-card DeepSeek-R1 inference at 1,920 tokens/s is a press-conference figure (grade-B relay) with no independent reproduction.
  5. MLPerf Inference v5.1 (Nebius GB200 submission) is the most recently confirmed figure on the inference side (grade-B relay); no confirmed results after v5.1.
  6. No public AGENTS.md/SKILL.md standard template was found for this direction; this document is a draft proposal.

6. References

  1. Serving Large Language Models on Huawei CloudMatrix384 — Huawei/SiliconFlow, arXiv 2506.12708, 2025-06. https://arxiv.org/pdf/2506.12708
  2. MindIE Turbo Open-Source Repository — Ascend (gitcode/Ascend). https://gitcode.com/Ascend/MindIE-Turbo
  3. vLLM Official Documentation and Repository — vLLM Project. https://github.com/vllm-project/vllm
  4. SGLang Official Repository — SGLang Project. https://github.com/sgl-project/sglang
  5. TensorRT-LLM — NVIDIA GitHub. https://github.com/NVIDIA/TensorRT-LLM
  6. vLLM-Ascend — vLLM Ascend Backend. https://github.com/vllm-project/vllm-ascend
  7. NVIDIA Dynamo (Disaggregated Serving Orchestration, cross-referenced on the design side) — NVIDIA. https://developer.nvidia.com/
  8. Ascend Community MindIE Documentation — Huawei Ascend. https://www.hiascend.com/
  9. DeepSeek-R1 Official API and Technical Report — DeepSeek. https://arxiv.org/abs/2501.12948
  10. AI Infra (design side, Dynamo/NVFP4 cross-references) — 02-industry-empowerment/04-hardware-research/05-ai-infra.md, 2026-09-12.