Deep Optimizer States: Towards Scalable Training of Transformer Models Using Interleaved Offloading

Avinash Maurya, Jie Ye, M. Mustafa Rafique, Franck Cappello, Bogdan Nicolae
10/26/2024
cs.LGcs.AIcs.DC

No official code found. Best implementation: DataStates/artifacts (1 star, MIT, last commit 2025-08-25).

Abstract

Transformers and large language models~(LLMs) have seen rapid adoption in all domains. Their sizes have exploded to hundreds of billions of parameters and keep increasing. Under these circumstances, the training of transformers is very expensive and often hits a ``memory wall'', i.e., even when using 3D parallelism (pipeline, tensor, data) and aggregating the memory of many GPUs, it is still not enough to hold the necessary data structures (model parameters, optimizer state, gradients, activations) in GPU memory. To compensate, state-of-the-art approaches offload the optimizer state, at least partially, to the host memory and perform hybrid CPU-GPU computations. However, the management of the combined host-GPU memory is often suboptimal and results in poor overlapping between data movements and computations. This leads to missed opportunities to simultaneously leverage the interconnect bandwidth and computational capabilities of CPUs and GPUs. In this paper, we leverage a key observation that the interleaving of the forward, backward and update phases generate fluctuations in the GPU memory utilization, which can be exploited to dynamically move a part of the optimizer state between the host and the GPU memory at each iteration. To this end, we design and implement \proj, a novel technique to split the LLM into subgroups, whose update phase is scheduled on either the CPU or the GPU based on our proposed performance model that addresses the trade-off between data movement cost, acceleration on the GPUs vs the CPUs, and competition for shared resources. We integrate our approach with DeepSpeed and demonstrate 2.5$\times$ faster iterations over state-of-the-art approaches using extensive experiments.

View on arXivView PDF

Code Implementations(1)

MIT

Artifacts in support of reproducibility efforts

11C++, CMakeApr 19, 20231 years agoMIT

Similar Papers

Cite this paper

@article{maurya2024deep,
  title  = {Deep Optimizer States: Towards Scalable Training of Transformer Models Using Interleaved Offloading},
  author = {Avinash Maurya and Jie Ye and M. Mustafa Rafique and Franck Cappello and Bogdan Nicolae},
  year   = {2024},
  eprint = {2410.21316},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.21316v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.21316.svg)](https://codeofpaper.com/paper/2410.21316)

Discussion