PapersSelected

HeteroMoE:基于激活感知的 CPU-GPU 混合专家调度方案

Activation-Aware Balancing of Fused CPU and GPU Expert Execution for Offline MoE Inference

Why we picked it

MoE 模型装不进单卡显存时,CPU 和 GPU 怎么分工一直是拍脑袋的事。这篇论文把 roofline 模型用到了专家调度上,在 H100 上跑 DeepSeek-R1 吞吐最高提了 4.4 倍。做本地离线推理的工程师可以照着复现。

arXiv 论文提出 HeteroMoE,一个面向离线 MoE 推理的激活感知专家调度器,按每次 MoE 调用的实时激活模式和 GPU 缓存状态来划分 CPU 与 GPU 的专家计算任务。

Body

现有方法把每个专家的 CPU 成本固定相加,但融合 CPU 调用会随激活变化在访存受限和算力受限之间切换,导致向 GPU 迁移过多专家。HeteroMoE 用 roofline 成本模型刻画融合 CPU 调用的算力与访存上限以及 PCIe 权重传输开销,决定迁移多少激活最重的未缓存专家;引擎每层只需一次同步,并配合优化内核。

实测中,在 H100 服务器上,HeteroMoE 端到端吞吐相比最强基线在 DeepSeek-R1 上提升 1.45-4.40 倍,在 Kimi-K2 上提升 1.51-3.70 倍;在 A6000 服务器上运行 DeepSeek-R1 快 1.16-3.86 倍。对在单卡或多卡消费级/中端 GPU 上部署 DeepSeek-R1、Kimi-K2 这类超出显存容量的 MoE 模型的团队有直接参考价值。

Original · arXiv: DeepSeek

Activation-Aware Balancing of Fused CPU and GPU Expert Execution for Offline MoE Inference

Frontier Mixture-of-Experts (MoE) models do not fit in single commodity GPU memory, so their routed experts stay in host memory and the CPU and GPU compute them together. The expert activation pattern of an MoE call, characterized by the number of activated experts and the tokens routed to each, affects the relative efficiency of CPU and GPU execution. In offline throughput-oriented inference, context length limits how many sequences fit in GPU memory, causing activation patterns and the optimal CPU-GPU partition to vary across workloads. Existing approaches sum fixed per-expert CPU costs, although a fused CPU call shifts between memory-bound and compute-bound execution as the activation changes. As a result, they often transfer too many experts to the GPU. To address these limitations, we present HeteroMoE, an activation-aware expert scheduler that selects the CPU-GPU partition for each MoE call based on its live activation pattern and GPU cache state. Its roofline cost model captures the compute and memory limits of the fused CPU call and the PCIe weight transfers of the GPU branch, determining how many of the most heavily activated uncached experts to transfer. An engine with one synchronization per layer and optimized kernels runs this partition close to the measured hardware limits. On the H100 server, HeteroMoE outperforms the strongest baseline in end-to-end throughput by 1.45-4.40$\times$ on DeepSeek-R1 and 1.51-3.70$\times$ on Kimi-K2. On the A6000 server, it is 1.16-3.86$\times$ faster on DeepSeek-R1.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include HeteroMoE, DeepSeek-R1, Kimi-K2, MoE.

Primary source verification: published directly by arXiv: DeepSeek with first-party authority.