Fast and Memory Efficient Offload Training Framework with Hybrid XPU Computation
Zhiyi Yao, Zuning Liang, Yuedong Xu, Jin Zhao, Jessie Hui Wang, Tong Li
Abstract
With the ever-growing size of deep learning models, GPU memory is prone to being insufficient during training. A prominent approach is ZeRO-Offload, which moves the optimizer states to CPU memory and performs parameter update using CPU. However, the deficiencies of ZeRO-Offload include low GPU utilization, imperfect overlapping of communication and computation, and inflexible offloading. In this paper, we leverage Direct Host Access (DHA) on the GPU that can compute data in CPU memory, forming a novel hybrid on-GPU and DHA. We design and implement MemFerry consisting of an execution scheduler and a shadow model. The scheduler strategically chooses layers of parameters for DHA computation and transmits the remaining parameters to GPU memory simultaneously to shorten forward propagation time, and further loads DHA parameters to GPU memory to reduce backward propagation time. The shadow model presents a unified memory abstraction for the parameter partitions stored separately in GPU and CPU memories. To further reduce GPU memory usage, we present MemFerry along with its dynamic programming algorithm that offloads gradients to CPU memory via DHA. We further extend MemFerry to emerging scale-up domains with ScaleUp-MemFerry, which exploits otherwise underutilized accelerator interconnect bandwidth to assist host-to-accelerator data movement through adaptive multi-path transfer. Our experiments show that \system trains up to faster and MemFerry can train larger model compared to ZeRO-Offload on a single GPU, and increase training speed by at least when scaling to data parallelism on 8 GPUs. We further extend the design to a Huawei CloudMatrix384 scale-Up node with up to 8 NPUs, and our ScaleUp-MemFerry reduces the end-to-end iteration time by up to over DeepSpeed.
Create a lesson
Related papers
TrimSO(2): Fast and Memory-Efficient Training of Equivariant Interatomic Potentials
Shared title terminologycs.DCChen Wang, Yuanchang Zhou, Guangming Tan et al.
Fault-Tolerant Offloading Framework for Real-Time Applications in Mobile Edge Computing
Shared title terminologycs.DCChuanchao Gao, Yiyang Gao, Michael Yuhas et al.
BaGuaLu-2: Taming Dynamic Memory Fluctuation for Efficient MoE Model Training over 10,000 GPUs
Shared title terminologycs.DCMingshu Zhai, Minkun Guo, Hongrui Lian et al.
SlackSwap: Bandwidth-Aware Activation Swapping and Recomputation for Memory-Efficient DNN Training
Shared title terminologycs.DCHui Feng, Xun Zhou, Yuxin Wang
Memory-Efficient Expert Routing for Distributed MoE Training
Shared title terminologycs.DCArnab Kanti Tarafder, Jaume Guasch-Martí, Gokcen Kestor et al.
LIBRA: Runtime Co-Tuning of Batch Size and Parallelism for Time-Efficient LLM Training
Shared title terminologycs.DCShengkai Lyu, Hairui Zhao, Daran Sun et al.