跳转至

TEMPO:面向内存与计算受限场景的专家并行负载均衡调度器

文章背景与核心概要

在专家并行(Expert-Parallel, EP)的混合专家模型(MoE)推理服务中,传统的负载均衡策略往往基于“执行时间与 Token 数量呈线性关系”的假设,这在实际生产环境中往往失效。本文指出,MoE 模型的性能表现受两种截然不同的机制制约:在 Token 数量较少时,系统受限于内存带宽(HBM 权重流式传输);而在 Token 数量较多时,系统则受限于计算能力(分组 GEMM 操作带来的填充开销)。

为了解决这一问题,研究团队提出了 TEMPO。该调度器通过最大仿射模型(max-affine profile)对上述两种机制进行建模,将每批次的调度问题转化为固定费用的完工时间(makespan)优化问题,并能在毫秒级时间内完成求解。通过集成至 SGLang 框架,TEMPO 在 Qwen3-235B 等大规模模型上实现了显著的吞吐量提升(4–6%)及 p99 延迟优化(约 15.6%)。


TEMPO:面向内存与计算受限场景的专家并行负载均衡调度器

作者: Jie Li, Chenxin Jia, Jinliang Shen, Cunzhuang Liu, Ruiyi Ding, Jianwen Xian, Kang He, Chengru Song
arXiv: 2608.13057 [cs.DC]
日期: 2026年8月14日


摘要

In expert-parallel (EP) Mixture-of-Experts (MoE) serving, traditional load balancers often fail because they assume expert execution time is linear relative to token count. The authors demonstrate that performance is actually governed by two distinct regimes: 1. Memory-Bound: Below \(\approx 156\)--\(168\) tokens, HBM weight streaming dominates, where cost is tied to activated replicas. 2. Compute-Bound: Above this threshold, grouped GEMM operations introduce padding, where splitting experts adds computational overhead.

The paper introduces TEMPO, a makespan-aware dispatcher that models these regimes using a max-affine profile (\(t=\max(a+bG,\,c+\beta N)\)). By treating per-batch dispatch as a fixed-charge makespan problem, TEMPO optimizes scheduling in milliseconds. Integrated into SGLang, TEMPO achieves significant throughput gains (4–6%) and reduces p99 latency by ~15.6% for models like Qwen3-235B.

在专家并行(EP)混合专家模型(MoE)服务中,传统的负载均衡器往往因为假设专家执行时间与 Token 数量呈线性关系而失效。作者证明,性能实际上受两种截然不同的机制支配: 1. 内存受限(Memory-Bound): 在约 156–168 个 Token 以下时,HBM 权重流式传输占主导地位,成本与激活的副本数量相关。 2. 计算受限(Compute-Bound): 超过此阈值后,分组 GEMM 操作会引入填充(padding),此时拆分专家会增加计算开销。

本文介绍了 TEMPO,这是一种感知完工时间(makespan-aware)的调度器,它使用最大仿射模型(\(t=\max(a+bG,\,c+\beta N)\))对这些机制进行建模。通过将每批次的调度视为一个固定费用的完工时间问题,TEMPO 能够在毫秒级内优化调度。集成到 SGLang 后,TEMPO 实现了显著的吞吐量提升(4–6%),并将 Qwen3-235B 等模型的 p99 延迟降低了约 15.6%。


核心贡献

  • Regime-Aware Modeling: Identifies that expert latency is not linear but follows a dual-regime profile, capturing both HBM-dominated streaming and compute-dominated padding.
  • TEMPO Dispatcher: A novel, makespan-aware scheduling algorithm that solves the NP-hard fixed-charge makespan problem efficiently off the critical path.
  • System Integration: Implemented as an out-of-process kernel in SGLang, fusing dispatch and count collection to minimize overhead.
  • Performance Gains: Validated on an 8-GPU testbed, demonstrating up to 15.5% improvement in load balancing and significant end-to-end latency reductions for large-scale MoE models.
  • 机制感知建模: 识别出专家延迟并非线性,而是遵循双重机制曲线,涵盖了 HBM 主导的流式传输和计算主导的填充开销。
  • TEMPO 调度器: 一种新颖的、感知完工时间的调度算法,能够在关键路径之外高效解决 NP-hard 难度的固定费用完工时间问题。
  • 系统集成: 作为 SGLang 中的进程外内核实现,融合了调度和计数收集功能,以最大限度地减少开销。
  • 性能提升: 在 8-GPU 测试平台上进行了验证,证明负载均衡性能提升高达 15.5%,并显著降低了大规模 MoE 模型的端到端延迟。

技术元数据

属性 详情
主要学科 分布式、并行与集群计算 (cs.DC)
其他学科 cs.AI, cs.CL, cs.GT
代码仓库 https://github.com/jeshxxx/TEMPO
许可协议 CC BY 4.0

访问与资源

license icon