SSDTrain:一种将激活卸载到 SSD 以加速大语言模型训练的框架
SSDTrain: An Activation Offloading Framework to SSDs for Faster Large Language Model Training
AI总结:
本文提出 SSDTrain 框架,将 LLM 激活自适应卸载至 NVMe SSD,并通过传输与计算重叠、张量去重等技术降低显存占用且几乎不损失吞吐量。
摘要:
GPU 显存容量的增长速度已经无法跟上大语言模型(LLM)规模的增长速度,从而阻碍了模型训练过程。特别是,激活——前向传播期间产生并在反向传播中复用的中间张量——占据了 GPU 显存使用的主导地位。这会导致高昂的训练开销,例如由于微批量尺寸较小而产生的高昂权重更新成本。为应对这一挑战,我们提出 SSDTrain,这是一种面向大容量 NVMe SSD 的自适应激活卸载框架。SSDTrain 通过让数据传输与计算完全重叠,在不影响性能的情况下降低 GPU 显存使用。SSDTrain 兼容 PyTorch、Megatron 和 DeepSpeed 等流行深度学习框架,并采用张量去重和转发等技术进一步提升效率。我们使用 GPT、BERT 和 T5 等流行 LLM 进行了大量实验。结果表明,SSDTrain 可降低 47% 的激活峰值显存使用。同时,SSDTrain 实现了 I/O 与计算的完美重叠,并且只产生可忽略的开销。与将激活保留在 GPU 显存中以及逐层完全重算相比,SSDTrain 实现了最佳的显存节省,同时吞吐量损失可忽略。我们进一步分析了如何利用减少后的激活显存使用,通过增大微批量尺寸并减少流水线并行气泡来提高吞吐量。
英文摘要:
The growth rate of the GPU memory capacity has not been able to keep up with that of the size of large language models (LLMs), hindering the model training process. In particular, activations -- the intermediate tensors produced during forward propagation and reused in backward propagation -- dominate the GPU memory use. This leads to high training overhead such as high weight update cost due to the small micro-batch size. To address this challenge, we propose SSDTrain, an adaptive activation offloading framework to high-capacity NVMe SSDs. SSDTrain reduces GPU memory usage without impacting performance by fully overlapping data transfers with computation. SSDTrain is compatible with popular deep learning frameworks like PyTorch, Megatron, and DeepSpeed, and it employs techniques such as tensor deduplication and forwarding to further enhance efficiency. We extensively experimented with popular LLMs like GPT, BERT, and T5. Results demonstrate that SSDTrain reduces 47% of the activation peak memory usage. Meanwhile, SSDTrain perfectly overlaps the I/O with the computation and incurs negligible overhead. Compared with keeping activations in GPU memory and layerwise full recomputation, SSDTrain achieves the best memory savings with negligible throughput loss. We further analyze how the reduced activation memory use may be leveraged to increase throughput by increasing micro-batch size and reducing pipeline parallelism bubbles.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。