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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Maurya, Avinash, Ye, Jie, Rafique, M. Mustafa, Cappello, Franck, Nicolae, Bogdan
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908955413839872
author Maurya, Avinash
Ye, Jie
Rafique, M. Mustafa
Cappello, Franck
Nicolae, Bogdan
author_facet Maurya, Avinash
Ye, Jie
Rafique, M. Mustafa
Cappello, Franck
Nicolae, Bogdan
contents 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 generates 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 Deep Optimizer States, 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_21316
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Deep Optimizer States: Towards Scalable Training of Transformer Models Using Interleaved Offloading
Maurya, Avinash
Ye, Jie
Rafique, M. Mustafa
Cappello, Franck
Nicolae, Bogdan
Machine Learning
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
Emerging Technologies
Performance
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 generates 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 Deep Optimizer States, 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.
title Deep Optimizer States: Towards Scalable Training of Transformer Models Using Interleaved Offloading
topic Machine Learning
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
Emerging Technologies
Performance
url https://arxiv.org/abs/2410.21316