TokenScale: Timely and Accurate Autoscaling for Disaggregated LLM Serving with Token Velocity
Autoscaling framework using token velocity metric and convertible decoders for 80-96% SLO attainment in disaggregated LLM serving
TokenScale: Timely and Accurate Autoscaling for Disaggregated LLM Serving with Token Velocity
一、论文概述
| 项目 | 内容 |
|---|---|
| 标题 | TokenScale: Timely and Accurate Autoscaling for Disaggregated LLM Serving with Token Velocity |
| 作者 | Ruiqi Lai, Hongrui Liu, Chengzhi Lu, Zonghao Liu, Siyu Cao, Siyang Shao, Yixin Zhang, Luo Mai, Dmitrii Ustiugov |
| 机构 | (作者机构未在摘要页明确列出) |
| 论文 | https://arxiv.org/abs/2512.03416 |
| 发布 | 2025-12-03 (v1) |
| 许可 | CC BY 4.0 |
二、核心思想
问题定义
LLM 推理服务架构正从单体转向 Prefill/Decode (PD) 分离,以提高资源利用率。然而,这种架构在现代突发工作负载下面临挑战:
- autoscaling 响应慢:现有系统(AIBrix, DistServe, BlitzScale)依赖滞后指标(GPU 利用率、粗粒度请求计数)
- SLO 违规严重:负载突增时 TTFT 和 TPOT SLO 违规高达 30%
- 过度配置成本高:为应对突发而预留资源导致 GPU 成本增加 14%
生产 trace 分析(Azure)发现:
- 流量突发占 47% 的运行时间
- 每次突发平均仅持续 ~2.3 秒
- 现有 autoscaling 策略无法在如此短的时间内响应
解决方案概述
本文提出 TokenScale——一种基于 Token Velocity 指标的 autoscaling 框架,包含两大创新:
- Token Velocity:统一 prefill、网络和 decode 阶段的细粒度预测性指标,量化各阶段的工作速率,作为系统背压的前导指标
- Convertible Decoders:允许 decoder GPU 在流量突增时动态执行 prefill 任务,创建快速响应缓冲区吸收突发,消除新 prefiller 的初始化延迟
实验结果:在 GPU 集群和生产 trace 评估中,TokenScale 将 SLO 达成率从 50-88% 提升至 80-96%,成本降低 4-14%。
三、技术架构
PD 分离架构

LLM 推理的两个阶段:
┌──────────────────────────────────────────────────────────────┐
│ Prefill Phase (Compute-Intensive) Decode Phase (Memory-Intensive) │
│ │
│ Input: Prompt tokens Output: 1 token/step │
│ KV-Cache construction Autoregressive generation │
│ Highly parallel Sequential │
│ GPU-bound Memory-bound │
│ │
│ [Prefiller GPUs] ───KV Cache──RDMA/NVLink──→ [Decoder GPUs] │
└──────────────────────────────────────────────────────────────┘
Token Velocity 指标

Token Velocity 定义三个子指标:
| 指标 | 符号 | 定义 |
|---|---|---|
| Prefill Velocity | VP | GPU 计算 throughput(prefill 阶段) |
| Network Velocity | VN | KV-Cache 网络传输速率 |
| Decode Velocity | VD | Decoder 释放 GPU 内存的速度 |
核心思想:监控 incoming token arrival rate 与各阶段 velocity 的比值,在 SLO 违规发生前主动检测瓶颈。
流量突发分析

生产 trace 显示:
- 突发以 token 为单位(而非请求)更为明显
- 突发的 token 级 spike 远超请求级 spike
- Token Velocity 能更早检测到这类突发
Scaling Policy 对比

Token Velocity vs 传统指标:
- 传统 GPU 利用率:滞后于实际负载变化
- Token Velocity:前导指标,在背压形成前响应
系统架构

TokenScale 系统组成:
┌────────────────────────────────────────────────────────────────┐
│ Control Plane │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Offline Profiler: Pre-compute token velocity profiles │ │
│ │ Scaling Decider: Token Velocity-based decisions │ │
│ │ Load Balancer: Routing policy for prefills │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Inference Engine Cluster (vLLM + LMCache) │ │
│ │ │ │
│ │ [Prefiller Pool] [Decoder Pool] [Convertible] │ │
│ │ I_P GPUs I_D GPUs D GPUs │ │
│ │ │ │
│ │ Token Velocity: VP, VN, VD → Autoscaler adjusts I_P, I_D│ │
│ └──────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────┘
Convertible Decoders
Convertible Decoders 使用 SLO-aware restricted chunked-prefill 策略:
- 精心设计的 chunk 大小和专用的 GPU 内存/计算预留
- 避免与进行中的 decode 任务争用
- 处理完 prefill chunk 后无缝切换回纯 decode 模式
负载平衡策略
Algorithm 1 定义了 prefiller 的路由策略,考虑 token velocity 和各节点当前负载。
四、核心创新
| 创新点 | 说明 | 理论/实验依据 |
|---|---|---|
| Token Velocity | 统一的细粒度预测性指标 | VP/VN/VD 覆盖 prefill/network/decode 三阶段 |
| Convertible Decoders | Decoder GPU 动态执行 prefill | 消除新 prefiller 初始化延迟,吸收突发 |
| 离线 Profiler | 预计算 token velocity profile | 加速在线决策 |
| SLO-aware chunked prefill | 受限 chunk 大小 + 内存预留 | 避免与 decode 任务争用 |
| 自适应 scaling policy | 基于 token velocity 的 scaling 阈值 | 表 I 定义 scaling thresholds |
五、实验结果
评估设置
| 配置 | 详情 |
|---|---|
| 集群 | A100 和 H100 GPU 集群 |
| 模型 | Llama-3.1-8B (TP=1), Qwen-2.5-32B (TP=4) |
| Trace | Azure 生产 trace |
| 基线 | DistServe, BlitzScale, AIBrix |
| 实现 | 基于 vLLM + LMCache |
SLO 达成率

| 系统 | SLO 达成率 | 成本 |
|---|---|---|
| 基线(DistServe 等) | 50-88% | 基准 |
| TokenScale | 80-96% | -4~14% |
TTFT vs 时间
Figure 10 展示了 TTFT 随时间的变化:
- TokenScale 显著减少了 TTFT 的峰值
- 在流量突增期间保持稳定
生成吞吐量
TokenScale 在提高 SLO 达成率的同时,保持了较高的生成吞吐量。
组件消融
Figure 14 消融实验:
- DistServe (B):基线
- B + P(仅 prefiller autoscaler):部分改进
- B + P + D(完整 TokenScale):最佳性能
- 证明 Token Velocity 和 Convertible Decoders 各自贡献显著
Convertible Decoder 数量
Figure 13 显示 SLO 达成率随 Convertible Decoder 数量的变化:
- 适度数量的 convertible decoders 即可显著提升性能
- 过多则边际效益递减
泛化性
TokenScale 在不同模型大小和 TP 配置下均表现良好,证明了方法的通用性。
六、与现有方法对比
| 系统 | Autoscaling 指标 | Convertible Decoders | SLO 达成率 |
|---|---|---|---|
| AIBrix | GPU 利用率(滞后) | 无 | 低 |
| DistServe | 请求计数(粗粒度) | 无 | 中 |
| BlitzScale | GPU 利用率 | 无 | 中 |
| TokenScale | Token Velocity(预测性) | 有 | 高 |
七、总结
核心贡献
- TokenScale 框架:首个基于 token velocity 的 disaggregated LLM serving autoscaling 系统
- Token Velocity 指标:统一 prefill/network/decode 三阶段的细粒度预测性指标
- Convertible Decoders:动态 prefill 能力的 decoder GPU,消除初始化延迟
- 生产级评估:基于 Azure 真实 trace,SLO 达成率 80-96%
- 成本优化:4-14% GPU 成本降低
技术影响
- 为 disaggregated LLM serving 提供了预测性 autoscaling 的新范式
- Convertible Decoders 的概念可推广到其他 GPU 共享场景
- Token Velocity 为系统监控提供了细粒度的前导指标
局限性
- 仅评估了 Llama 和 Qwen 系列模型
- Convertible Decoders 的最佳数量需要经验调优
- 未评估跨数据中心部署场景
八、参考资源
- arXiv: https://arxiv.org/abs/2512.03416
- License: CC BY 4.0
- 评估硬件: NVIDIA A100, H100 GPUs
- 评估模型: Llama-3.1-8B, Qwen-2.5-32B
- 实现基础: vLLM, LMCache
- Trace 来源: Azure 生产 trace
关键图片索引
| 图片 | 说明 | 文件名 |
|---|---|---|
| Figure 1 | PD 分离架构 | pd-disaggregation.png |
| Figure 2 | 流量突发分析 | traffic-bursts.png |
| Figure 5 | Token Velocity 概览 | token-velocity.png |
| Figure 6 | Scaling Policy 对比 | scaling-policy.png |
| Figure 8 | TokenScale 架构 | architecture.png |
| Figure 10 | TTFT vs 时间 | performance-comparison.png |