arXiv:2610.09657cs.DCOct 2026

Manuscript Offprint

arXiv:2610.09657

Fast and Memory Efficient Offload Training Framework with Hybrid XPU Computation

Zhiyi Yao, Zuning Liang, Yuedong Xu, Jin Zhao, Jessie Hui Wang, Tong Li

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 GO-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 MemFerry trains up to 1.68×1.68\times faster and GO-MemFerry can train 1.52×1.52\times larger model compared to ZeRO-Offload on a single GPU, and increase training speed by at least 28.1% 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 20.7% over DeepSpeed.

Index Terms—Offloaded training, CPU offloading, Direct-host-access, Communication scheduling, GPU/NPU

I. INTRODUCTION

With the penetration of large-scale deep learning such as ChatGPT (GPT-3.5 and GPT-4) [1] in our daily life and production activities, how to train deep learning models efficiently has attracted great interest. In recent years, the size of deep learning models has increased rapidly. For instance, BERT-base [2] developed in 2018 contains 110 million parameters, while one year after GPT-2 [3] contains 1.5 Billion parameters, and today's LLaMA [4] and GPT-3 [5] contain 65 Billion and 175 Billion parameters, respectively. However, GPU as the mainstream computing accelerator, have very limited device memory. The latest Nvidia A100, H100 and H800 have 80G Bytes of high-bandwidth memory (HBM), and the frequently used V100 has only 32G Bytes of memory. This imposes a significant challenge on large-scale model training.

To reduce GPU memory requirements, two key technical routines have surfaced. One is to segment the parameters, gradients, optimizer states and activations (also called training content) across multiple GPUs, such as ZeRO [6] for data parallelism (DP) and GPipe [7] for pipeline parallelism. The other is offload training [8]–[11]. The basic idea is to move partial training content from GPU memory to CPU memory [12], which is usually an order of magnitude larger, or even to secondary storage [13], [14]. However, accommodating larger models comes at the cost of reduced training speed. The most widely used offload training system is ZeRO-Offload [11]. In ZeRO-Offload, the optimizer states are placed in CPU memory and parameter updates are performed by the CPU, while regular forward propagation (FP) and backward propagation (BP) are executed on the GPU. Therefore, in each iteration, updated parameters are transferred to GPU memory for FP, and the resulting gradients are returned to CPU memory for parameter updates. The limited bandwidth between CPU and GPU thus throttles effective GPU utilization. Meanwhile, this bottleneck becomes more pronounced in emerging scale-up domains, where accelerator-to-accelerator connectivity is substantially enhanced while host-to-accelerator data movement remains comparatively constrained, leaving part of the high-bandwidth scale-up fabric underutilized during offload training [15]–[18].

In this paper, we conduct a preliminary evaluation on the DeepSpeed implementation of ZeRO-Offload with three key observations. (1) GPU streaming processors (SMs) are severely under-utilized compared to non-offloading (e.g. 63% vs 99% in BERT-base on Nvidia A100). (2) Communication and computation are not well overlapped. The GPU idleness becomes prominent when the parameters are enormous and unbalancedly distributed on different layers. (3) The memory offloading is not flexible, especially that no further training content can be moved to CPU memory. Hence, we raise a critical question: “Does there exist a new or improved training paradigm that can achieve higher training speed over ZeRO-Offload and reduce GPU memory usage at the same time?”

We propose to integrate the Direct-Host-Access (DHA) functionality provided by mainstream GPUs in offload training. With DHA, GPU SMs access data in CPU memory, bypassing CPU cores and GPU memory. DeepPlan [19] is the first work to introduce DHA into model inference. Inspired by this, we evaluate the FP and BP times under the on-GPU and DHA execution modes of offload training. In FP, DHA outperforms on-GPU on certain large layers considerably. In BP, DHA is inferior to on-GPUs if the resulting gradients are

Manuscript created November, 2026. Zhiyi Yao and Zuning Liang are with College of Future Information Technology, Fudan University; Jessie Hui Wang is with Institute for Network Sciences and Cyberspace, Tsinghua University; Tong Li is with School of Information, Renmin University of China; Yuedong Xu and Jin Zhao are with College of Computer Science and Artificial Intelligence, Fudan University (e-mail: ydxu@fudan.edu.cn).

stored in GPU memory, but their gaps are greatly reduced if the gradient transmission times of on-GPU are considered. Therefore, fusing on-GPU and DHA into a novel hybrid training paradigm has the potential to achieve our objectives.

We design MemFerry, a novel hybrid training framework that exploits the benefits of DHA in FP while mitigating its side effects in BP as much as possible. MemFerry consists of an execution scheduler and a shadow model. The execution scheduler leverages DHA to compute selected layers while loading the remaining parameters into GPU memory during FP, thereby overlapping communication with computation. During the interval between the completion of parameter loading and the beginning of gradient transmission, MemFerry further loads selected DHA parameters into GPU memory to reduce their BP time. By mitigating communication bubbles in both FP and BP, MemFerry reduces the per-iteration training time. The shadow model provides a unified memory abstraction for three parameter partitions spanning CPU and GPU memories: DHA parameters that remain in CPU memory, GFGB (GPU-FP-GPU-BP) parameters that are computed in GPU memory, and DFGB (DHA-FP-GPU-BP) parameters that are computed via DHA during FP but transferred to GPU memory for more efficient BP. Through dynamic address mapping, the GPU can transparently access these parameter partitions without additional CPU-side data copies.

To achieve flexible GPU memory offloading, we propose GO-MemFerry that uses DHA to write gradients directly to CPU memory, thus further reducing GPU memory usage. To the best of our knowledge, gradient offloading by DHA has not been reported before. With the user-specified gradient reserving factor, we model the optimal gradient offloading as a dynamic programming problem so as to minimize its impact on the training speed. With GO-MemFerry, we are able to train even larger models and balance the tradeoff between fast training speed and low GPU memory usage. We further adapt MemFerry to emerging scale-up domains by exploiting otherwise underutilized accelerator interconnect bandwidth to assist CPU-to-accelerator data movement. ScaleUp-MemFerry combines an additional assisted transfer path with an adaptive data dispatcher that partitions data across the direct and assisted paths according to their latency and bandwidth characteristics.

The evaluation results on clusters equipped with NVIDIA V100 and A100 GPUs show that MemFerry achieves both faster training and lower GPU memory usage than state-of-the-art offload training systems. MemFerry improves training speed by 1.32×1.32\times on average and up to 1.68×1.68\times, while increasing GPU utilization by up to 1.27×1.27\times. MemFerry also reduces GPU memory usage by up to 61.7%. With gradient offloading, GO-MemFerry reduces memory usage by 20.1% on average and up to 74.4%, enabling the training of models up to 1.52×1.52\times larger than those supported by ZeRO-Offload. MemFerry is also scalable to distributed training, achieving at least 1.28×1.28\times speedup when integrated with data parallelism on eight GPUs. Finally, on a CloudMatrix384 scale-up node, ScaleUp-MemFerry further reduces the end-to-end iteration time by up to 20.7% over DeepSpeed and 4.0% over the original MemFerry.

Figure

Fig. 1. Training process of ZeRO-Offload.

References (39)