4比特通信量化让大模型训练更快更省内存。
SDP4Bit: Toward 4-bit Communication Quantization in Sharded Data Parallelism for LLM Training
- 通过权重差值量化和两级梯度平滑量化,将通信量压缩至近4比特。
- 在128张GPU上实现最高4.08倍的端到端吞吐加速,损失可忽略。
- 适合大规模语言模型训练场景,尤其关注通信效率的研究者。
近年来,语言模型参数规模持续增长,训练开销和内存消耗也随之上升。分布式训练,尤其是将优化器状态分片到各工作节点的分片数据并行(ShardedDP),成为缓解训练时间和内存压力的关键技术。然而,ShardedDP的可扩展性面临权重与梯度通信开销过大的挑战。尽管压缩技术可缓解此问题,但常导致精度下降。为此,本文提出SDP4Bit(面向大模型训练中分片数据并行的4比特通信量化),通过两种新方法——权重差值量化与两级梯度平滑量化,将通信量降至近4比特。同时,采用算法-系统协同设计与运行时优化,最小化压缩计算开销。理论层面保证收敛性,实验表明,在67亿参数GPT模型预训练中,训练损失几乎无损;在128张GPU规模下,端到端吞吐最高提升4.08倍。
原文摘要 · Abstract (English)
Recent years have witnessed a clear trend towards language models with an ever-increasing number of parameters, as well as the growing training overhead and memory usage. Distributed training, particularly through Sharded Data Parallelism (ShardedDP) which partitions optimizer states among workers, has emerged as a crucial technique to mitigate training time and memory usage. Yet, a major challenge in the scalability of ShardedDP is the intensive communication of weights and gradients. While compression techniques can alleviate this issue, they often result in worse accuracy. Driven by this limitation, we propose SDP4Bit (Toward 4Bit Communication Quantization in Sharded Data Parallelism for LLM Training), which effectively reduces the communication of weights and gradients to nearly 4 bits via two novel techniques: quantization on weight differences, and two-level gradient smooth quantization. Furthermore, SDP4Bit presents an algorithm-system co-design with runtime optimization to minimize the computation overhead of compression. In addition to the theoretical guarantees of convergence, we empirically evaluate the accuracy of SDP4Bit on the pre-training of GPT models with up to 6.7 billion parameters, and the results demonstrate a negligible impact on training loss. Furthermore, speed experiments show that SDP4Bit achieves up to 4.08$\times$ speedup in end-to-end throughput on a scale of 128 GPUs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。