arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.06069cs.LGcs.DC
收藏

1-位LAMB:具有LAMB收敛速度的通信高效大规模大批量训练

1-bit LAMB: Communication Efficient Large-Scale Large-Batch Training with LAMB's Convergence Speed

Microsoft(微软);University of Rochester(罗切斯特大学)

Conglong Li, Ammar Ahmad Awan, Hanlin Tang, Samyam Rajbhandari, Yuxiong He

摘要:

为了在数百个GPU上训练大型模型(如BERT和GPT-3),通信已成为主要瓶颈,特别是在具有有限带宽TCP网络的商品系统上。一方面,提出了大批量优化算法,如LAMB算法,以减少通信的频率。另一方面,通信压缩算法(如1位Adam)有助于减少每次通信的容量。然而,我们发现,简单地使用其中一种技术是不足以解决通信的挑战,特别是在低网络带宽。出于这一动机,我们的目标是结合大批量优化和通信压缩的力量,但我们发现,现有的压缩策略不能直接应用于LAMB由于其独特的自适应分层学习率。为此,我们设计了一个新的通信效率的算法,1位LAMB,它引入了一种新的方式来支持自适应分层学习率压缩。此外,我们还介绍了一种新的系统实现,用于使用PyTorch分布式的NCCL后端进行压缩通信,从而提高了可用性和性能。对于批量大小从8 K到64 K的BERT-Large预训练任务,我们对多达256个GPU的评估表明,与未压缩的LAMB相比,具有基于NCCL的后端的1位LAMB能够实现高达4.6倍的通信量减少,高达2.8倍的端到端时间加速,以及相同的样本收敛速度(以及相同的微调任务精度)。

英文摘要:

To train large models (like BERT and GPT-3) on hundreds of GPUs, communication has become a major bottleneck, especially on commodity systems with limited-bandwidth TCP network. On one side large batch-size optimization such as LAMB algorithm was proposed to reduce the frequency of communication. On the other side, communication compression algorithms such as 1-bit Adam help to reduce the volume of each communication. However, we find that simply using one of the techniques is not sufficient to solve the communication challenge, especially under low network bandwidth. Motivated by this we aim to combine the power of large-batch optimization and communication compression, but we find that existing compression strategies cannot be directly applied to LAMB due to its unique adaptive layerwise learning rates. To this end, we design a new communication-efficient algorithm, 1-bit LAMB, which introduces a novel way to support adaptive layerwise learning rates under compression. In addition, we introduce a new system implementation for compressed communication using the NCCL backend of PyTorch distributed, which improves both usability and performance. For BERT-Large pre-training task with batch sizes from 8K to 64K, our evaluations on up to 256 GPUs demonstrate that 1-bit LAMB with NCCL-based backend is able to achieve up to 4.6x communication volume reduction, up to 2.8x end-to-end time-wise speedup, and the same sample-wise convergence speed (and same fine-tuning task accuracy) compared to uncompressed LAMB.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑