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

每个梯度仅需一字节:关于使用共享随机性的低带宽去中心化语言模型微调的注记

Just One Byte (per gradient): A Note on Low-Bandwidth Decentralized Language Model Finetuning Using Shared Randomness

Eric Zelikman, Qian Huang, Percy Liang, Nick Haber, Noah D. Goodman

AI总结:

针对分布式语言模型训练的通信成本瓶颈,研究基于共享随机性拓展SPSA提出去中心化低带宽微调方法,仅交换单字节投影梯度,兼具隐私与动态适配优势,并通过概念验证实验证实潜力。

摘要:

分布式环境下的语言模型训练受限于梯度交换的通信成本。在这篇短注中,我们拓展了Malladi等人(2023年)的最新研究,利用共享随机性实现低带宽分布式微调。该方法是内存高效的同时扰动随机逼近(Simultaneous Perturbation Stochastic Approximation,SPSA)的自然去中心化扩展。每次迭代中,每台机器为随机数生成器(Random Number Generator,RNG)设置种子,对模型权重执行可复现的局部扰动,计算并交换标量投影梯度,随后用这些梯度更新各自的模型。通过使用(机器,样本)标识符作为随机种子,每个模型都能重新生成其他模型的扰动。由于机器间仅交换单字节投影梯度,该方法通信效率极高。它还具备潜在的隐私优势:投影梯度可基于不同的训练数据计算,且模型永远不会访问其他机器的数据。我们的方法不仅大幅降低了通信带宽需求,还支持训练过程中机器的动态增减,同时保留了近期研究的内存高效和仅需推理的优势。我们基于分布式优化和内存高效训练的丰富文献开展了概念验证实验,以证明该方法的潜在实用性。

英文摘要:

Language model training in distributed settings is limited by the communication cost of gradient exchanges. In this short note, we extend recent work from Malladi et al. (2023), using shared randomness to perform distributed fine-tuning with low bandwidth. The method is a natural decentralized extension of memory-efficient Simultaneous Perturbation Stochastic Approximation (SPSA). Each iteration, each machine seeds a Random Number Generator (RNG) to perform local reproducible perturbations on model weights and calculate and exchange scalar projected gradients, which are then used to update each model. By using a (machine, sample) identifier as the random seed, each model can regenerate one another's perturbations. As machines only exchange single-byte projected gradients, this is highly communication efficient. There are also potential privacy benefits, as projected gradients may be calculated on different training data, and models never access the other's data. Our approach not only drastically reduces communication bandwidth requirements but also accommodates dynamic addition or removal of machines during the training process and retains the memory-efficient and inference-only advantages of recent work. We perform proof-of-concept experiments to demonstrate the potential usefulness of this method, building off of rich literature on distributed optimization and memory-efficient training.

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

↑