arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.11364cs.DCcs.LG
收藏

OOM:通过内存-执行协同设计实现卸载优化的全参数MoE训练

OOM: Offload-Optimized Full-Parameter MoE Training via Memory-Execution Co-Design

Ruijia Yang, Shiyuan Lin, Chengxi Liao, Zeyi Wen

AI总结:

本文提出OOM系统,通过内存-执行协同设计优化全参数MoE训练,在多GPU平台上实现更高吞吐量,且主机内存占用仅为FSDP2的1/3.0,可训练更大规模的MoE模型。

摘要:

将模型状态卸载到主机内存并流式传输层权重,可让单个多GPU节点训练大型混合专家(MoE)模型。此时GPU内存成为性能预算,由驻留专家状态、保留激活值和执行工作集共享,最佳分配取决于专家执行路径、批量大小和序列长度。本文提出OOM(卸载优化MoE),这是一种全参数MoE训练系统,通过协同设计专家执行与内存分配实现上述目标。对于专家并行执行,OOM在其所属GPU上更新驻留专家,并根据流水线依赖关系联合规划状态驻留与MoE激活值保留;对于本地执行,OOM通过感知依赖的分区限制GPU工作集;在混合模型中,它还在主机上保留注意力结果以避免代价高昂的重新计算,并通过更廉价的层选择性重新生成层边界以腾出空间。校准后的成本模型指导在GPU与主机预算内的联合配置,以最小化步长时间;OOM通过短时间执行在配置路径中进行选择。在4块H100上,OOM可训练1M token的上下文,而FSDP2、ZeRO-Offload和MegaTrain在512K token时就会耗尽GPU内存;它还能训练1220亿参数的MoE模型,而上述三者在该规模下均会耗尽主机内存。在4块24GB RTX 4090上,OOM每步可训练512K token上下文和1024个1K token序列,无需梯度累积。在匹配全局批量的对比中,OOM在两个平台上相比CPU卸载的FSDP2,吞吐量几何均值分别为1.58倍和4.08倍(最高达2.14倍和7.77倍),同时在评估系统中使用的主机内存最少,仅为FSDP2的1/3.0。

英文摘要:

Offloading model state to host memory and streaming layer weights let a single multi-GPU node train large mixture-of-experts (MoE) models. GPU memory then becomes a performance budget, shared by resident expert state, retained activations, and execution worksets. The best allocation depends on the expert execution path, batch size, and sequence length. We present OOM (Offload-Optimized MoE), a full-parameter MoE training system that co-designs expert execution and memory allocation. For expert-parallel execution, OOM updates resident experts on their owning GPUs and jointly plans state residency and MoE activation retention according to pipeline dependencies. For local execution, OOM bounds GPU worksets through dependency-aware partitioning; in hybrid models, it also retains attention results on the host to avoid costly recomputation and selectively regenerates layer boundaries through cheaper layers to make room. Calibrated cost models guide joint configuration within GPU and host budgets to minimize step time; OOM selects among the configured paths through short executions. On four H100s, OOM trains with 1M-token contexts, whereas FSDP2, ZeRO-Offload, and MegaTrain exhaust GPU memory at 512K. It also trains a 122B-parameter MoE model, on which all three exhaust host memory. On four 24 GB RTX 4090s, it trains 512K-token contexts and 1,024 1K-token sequences per step without gradient accumulation. Across matched-global-batch comparisons, OOM delivers 1.58x and 4.08x geometric-mean (up to 2.14x and 7.77x) throughput over CPU-offloaded FSDP2 on the two platforms while using the least host memory among the evaluated systems -- as little as 1/3.0 of FSDP2's.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑