改进分布式训练方法,让大模型在低带宽下高效训练
Streaming DiLoCo with overlapping communication: Towards a Distributed Free Lunch
- 分批同步参数子集,降低峰值带宽需求
- 训练与同步并行,缩短整体耗时
- 量化通信数据,进一步压缩带宽
大规模语言模型训练通常需在大量加速器上分布进行以缩短训练时间。由于每步梯度更新都需要交换内部状态和参数梯度,所有设备必须通过低延迟高带宽通信链路共址连接。近期的DiLoCo等分布式算法放宽了这一共址要求:将加速器分组为“工作节点”,节点间仅需偶尔同步。这使得工作节点可使用较低带宽链路而不会影响学习质量。然而,这些方法中节点间的通信仍需与之前相同的峰值带宽,因为同步时需交换全部参数。本文对DiLoCo进行三方面改进:首先,按序同步参数子集而非一次性全部交换,大幅降低峰值带宽;其次,允许工作节点在同步期间继续训练,减少实际运行时间;第三,对节点间交换的数据进行量化,进一步降低带宽。通过合理组合这些改进,实验表明可在降低所需带宽两个数量级的前提下,实现百亿参数级模型的分布式训练,并保持与之前相当的模型质量。
原文摘要 · Abstract (English)
Training of large language models (LLMs) is typically distributed across a large number of accelerators to reduce training time. Since internal states and parameter gradients need to be exchanged at each and every single gradient step, all devices need to be co-located using low-latency high-bandwidth communication links to support the required high volume of exchanged bits. Recently, distributed algorithms like DiLoCo have relaxed such co-location constraint: accelerators can be grouped into ``workers'', where synchronizations between workers only occur infrequently. This in turn means that workers can afford being connected by lower bandwidth communication links without affecting learning quality. However, in these methods, communication across workers still requires the same peak bandwidth as before, as the synchronizations require all parameters to be exchanged across all workers. In this paper, we improve DiLoCo in three ways. First, we synchronize only subsets of parameters in sequence, rather than all at once, which greatly reduces peak bandwidth. Second, we allow workers to continue training while synchronizing, which decreases wall clock time. Third, we quantize the data exchanged by workers, which further reduces bandwidth across workers. By properly combining these modifications, we show experimentally that we can distribute training of billion-scale parameters and reach similar quality as before, but reducing required bandwidth by two orders of magnitude.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。