用混合压缩提升大模型训练速度,192张GPU下提速超17%
Accelerating Large Language Model Training with Hybrid GPU-based Compression
- 针对不同并行维度采用差异化压缩策略,提升通信效率
- 在192张V100 GPU上实现每卡17.3%的TFLOPS提升
- 适合大规模分布式训练场景,尤其关注通信优化的研究者
数据并行(DP)、张量并行(TP)和流水线并行(PP)是加速大语言模型(LLM)训练的主流方法。但这些方法依赖高带宽通信收集、聚合与分发梯度、激活值等关键信息,带来显著开销。结合基于GPU的压缩库,已证明可大幅减少消息大小,利用互连带宽,从而提升训练效率并保持可接受精度。本文研究在3D并行与ZeRO优化下的压缩辅助MPI集合操作有效性。在Lassen超级计算机上扩展至192张V100 GPU。首先,在所有集合操作中启用简单压缩,使GPT-NeoX-20B训练的每卡TFLOPS提升22.5%,样本吞吐量提升23.6%。然而该策略忽略各并行维度间消息稀疏性的差异,引入更多误差导致训练损失下降。因此,我们引入针对各并行维度的混合压缩设置,并相应调整压缩强度:鉴于梯度具有低秩结构(arXiv:2301.02654),对DP All-reduce采用激进压缩;对TP和PP中的激活值、优化器状态和模型参数则采用较温和压缩以保精度。采用调整后的混合压缩方案后,每卡TFLOPS提升17.3%,样本吞吐量提升12.7%,同时达到基线损失收敛。
原文摘要 · Abstract (English)
Data Parallelism (DP), Tensor Parallelism (TP), and Pipeline Parallelism (PP) are the three strategies widely adopted to enable fast and efficient Large Language Model (LLM) training. However, these approaches rely on data-intensive communication routines to collect, aggregate, and re-distribute gradients, activations, and other important model information, which pose significant overhead. Co-designed with GPU-based compression libraries, MPI libraries have been proven to reduce message size significantly, and leverage interconnect bandwidth, thus increasing training efficiency while maintaining acceptable accuracy. In this work, we investigate the efficacy of compression-assisted MPI collectives under the context of distributed LLM training using 3D parallelism and ZeRO optimizations. We scaled up to 192 V100 GPUs on the Lassen supercomputer. First, we enabled a naïve compression scheme across all collectives and observed a 22.5\% increase in TFLOPS per GPU and a 23.6\% increase in samples per second for GPT-NeoX-20B training. Nonetheless, such a strategy ignores the sparsity discrepancy among messages communicated in each parallelism degree, thus introducing more errors and causing degradation in training loss. Therefore, we incorporated hybrid compression settings toward each parallel dimension and adjusted the compression intensity accordingly. Given their low-rank structure (arXiv:2301.02654), we apply aggressive compression on gradients when performing DP All-reduce. We adopt milder compression to preserve precision while communicating activations, optimizer states, and model parameters in TP and PP. Using the adjusted hybrid compression scheme, we demonstrate a 17.3\% increase in TFLOPS per GPU and a 12.7\% increase in samples per second while reaching baseline loss convergence.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。