Shiyi Cao, Shu Liu, Tyler Griggs, Peter Schafhalter, Xiaoxuan Liu, Ying Sheng, Joseph E. Gonzalez, Matei Zaharia, Ion Stoica
UC Berkeley, Stanford
ASPLOS 2025
Presenter: wzw
Date: 2026-03-27
T4/L4 这类 GPU 很容易被 CPU-GPU I/O 卡死。GPU compute + CPU attention + paged weight transfer, 再用 HRM 搜最优 (N, \mu, A_g, F_g, r_w, r_c)。Mixtral 8x7B @ 1xT4 最多 10.3x 吞吐提升, 1xL4 上 MTBench@64 达到 294.5 tok/s。

layer-by-layer streaming, 但 没有把 compute 和 I/O 真正 overlap。
f16 / int4 都落在 P1 左侧。
N 足够大时, FFN 能跨过 P1 甚至逼近 P2, 这时更适合放在 GPU。
PreAttn + PostAttn + MoE FFN, CPU 负责 Attention, I/O 负责 QKV / hidden / weights 三类传输。CGOPipe 的核心是 把下一层 weights 分页, 穿插到当前层 micro-batch 的执行间隙中。
2 x size(W_L) 的 weight buffer, 让 当前层使用 与 下一层预取 并行。CPU memory -> pinned memory -> GPU, 并用 page table 让 MoE FFN kernel 按页取数。$$ P_x^i=\min(P_i^{\text{peak}},\ B_i^{\text{peak}} I_x^i,\ B_{j,i}^{\text{peak}} I_x^j) $$
T = max(comm_cpu->gpu, T_cpu, T_gpu)(N, mu, A_g, F_g, r_w, r_c)A_g / F_g 决定 attention 和 FFN 放在哪个设备执行。A_g = 0, F_g = 1PreAttn, 生成 QKV。QKV DtoH, CPU 直接执行 attention; 同时把上一批 hidden HtoD 回传 GPU。PostAttn + MoE FFN, 而下一层 weights 已经按 page 提前搬运。comm, T_cpu, T_gpu 三者接近, 就能把整层 latency 压到更高的 balance point。192GB 或 416GB。MILP 求解, Appendix 说 < 1 min。Mixtral 8x7B, Mixtral 8x22B, DBRX (132B, 16 experts)。1xT4(16GB), 1xL4(24GB), 2xT4, 4xT4; CPU 为 24/32-core Xeon。MTBench, HELM Synthetic Reasoning, HELM Summarization。FlexGen, FlexGen(c), DeepSpeed Zero-Inference。generated tokens / (prefill + decode)。
1xT4 上 MTBench@256, MoE-Lightning(p) 达到 33.9 tok/s, 相对 FlexGen 3.5x。1xL4 上 MTBench@64, MoE-Lightning 达到 294.5 tok/s, 远高于 FlexGen 34.9 tok/s。10.3x 提升, 说明它真正打中了 memory-constrained regime。
DBRX 上从 2xT4 -> 4xT4, throughput 提升达到 2.1x ~ 2.8x, 呈现近似超线性扩展。
KV transfer, 红柱是 CPU attention, 虚线是 MoE FFN。context length / micro-batch 组合下, CPU attention 明显快于 KV 搬回 GPU。\mu 和 context 持续增大时, CPU attention 也会变成新瓶颈, 所以这不是永远成立的结论。CPU-GPU MoE 推理的最优执行区间。T4/L4 级别低成本硬件上, 把 Mixtral / DBRX 的 batch inference 吞吐大幅拉高。model too big for GPU but fits in CPU 这个场景被吃得很透。max(comm, T_cpu, T_gpu), 不是某个单独 kernel 的 micro-opt。HRM 扩展到 GPU-GPU / multi-node 通信, 或纳入 KV sparsity / speculative decoding。