Transformers and 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 slow and often takes in the order of weeks or months. Thanks to 3D model parallelism (data, pipeline, and tensor-level parallelism), the training can scale to a large number of GPUs, which reduces the duration of the training but dramatically increases the cost. Even when a large number of GPUs are available, the aggregated GPU memory is often not enough to hold the full training state (optimizer state, model parameters, and gradients). To compensate, state-of-the-art approaches offload the optimizer state at least partially to the host memory and perform hybrid CPU-GPU computations. Such flexible solutions dramatically reduce the GPU memory utilization, which makes it feasible to run the training on a smaller number of GPUs at the cost of performance penalty. Unfortunately, the challenges and bottlenecks of adopting this strategy are not sufficiently studied by state-of-the-art, which results in poor management of the combined host-GPU memory and poor overlapping between data movements and computations. In this paper, we aim to fill this gap by characterizing the behavior of offloaded training using the DeepSpeed runtime. Specifically, we study the GPU memory utilization over time during each iteration, the activity on the PCIe related to transfers between the host memory and the GPU memory, and the relationship between resource utilization and the steps involved in each iteration. Thanks to this study, we reveal opportunities for future improvements of offloading solutions, which enable greater flexibility to optimize the cost-performance trade-off in the context of transformer and LLM training.
ZenFlow: Enabling Stall-Free Offloading for LLM Training
University of Virginia(弗吉尼亚大学);University of California, Merced(加州大学梅尔塞德斯分校);Argonne National Laboratory(阿贡国家实验室);Snowflake AI Research(Snowflake人工智能研究)
Fast and Memory Efficient Offload Training Framework with Hybrid XPU Computation
College of Future Information Technology, Fudan University(复旦大学未来信息学院);Institute for Network Sciences and Cyberspace, Tsinghua University(清华大学网络科学与网络空间研究院);School of Information, Renmin University of China(中国人民大学信息学院);College of Computer Science and Artificial Intelligence, Fudan University(复旦大学计算机科学与人工智能学院)
SwiftCache: Efficient LLM Serving for Multi-turn Conversations with Heterogeneous KV Cache Sharing
Southern University of Science and Technology(南方科技大学);Institute of Computing Technology, CAS(中国科学院计算技术研究所);Alibaba Group(阿里巴巴集团);University of Macau(澳门大学)
PatrickStar: Parallel Training of Pre-trained Models via Chunk-based Memory Management
Tencent Inc(腾讯公司);National University of Singapore(新加坡国立大学)
预训练模型(PTM)正在彻底改变人工智能(AI)技术。然而,PTM训练的硬件要求非常高,使其成为一小部分人的游戏。因此,我们提出了PatrickStar系统,以降低PTM的硬件要求,并使其可供任何人使用。PatrickStar使用CPU-GPU异构内存空间存储模型数据。与现有的工作不同,我们组织的模型数据在内存块和动态分布在异构内存。在预热迭代中收集的运行时内存统计数据的指导下,在异构内存中高效地编排块,并产生更低的CPU-GPU数据传输量和更高的带宽利用率。PatrickStar与零冗余优化器共生,可扩展到多个节点上的多个GPU。%使用数据并行。该系统可以在更大的模型和更大的批量上进行训练任务,这是现有工作无法完成的。实验结果表明,PatrickStar将模型规模扩展到DeepSpeed的2.27和2.5倍,并始终表现出显着更高的执行速度。PatricStar还在32 GPU集群上成功运行了175 B GPT 3训练任务。我们的代码可在https://github.com/Tencent/PatrickStar上公开获取。