分布式随机梯度下降(SGD)方法已广泛应用于大型深度学习,梯度集体方法至关重要,以确保分布式深度学习系统的培训可扩展性。已广泛采用分布式SGD过程广泛采用诸如解释的集体通信,以减少通信时间。但是,allreduce会引发大带宽资源,而在许多情况下大多数梯度稀疏,因为许多梯度值是零,并且应该有效地压缩以用于节省带宽。为了减少稀疏梯度通信开销,我们提出了一种稀疏的剪影减速器(S2减速器),这是一种具有收敛保证的新型草图的稀疏梯度聚合方法。 S2减速机仅通过Count-Sketch和Bitmap压缩非零梯度来降低通信成本,并实现有效的已有SGD培训的有效恢复运算符。我们在五种培训模型中对四种最先进的方法进行广泛的评估。我们的结果表明,S2减速机收敛到相同的准确性,降低了81 \%稀疏通信开销,与最先进的方法相比,实现了1.8 $ \ times $ Speedup。
translated by 谷歌翻译
现代深度学习模型通常在分布式机器集合中并行培训,以减少训练时间。在这种情况下,机器之间模型更新的通信变成了一个重要的性能瓶颈,并且已经提出了各种有损的压缩技术来减轻此问题。在这项工作中,我们介绍了一种新的,简单但理论上和实践上有效的压缩技术:自然压缩(NC)。我们的技术分别应用于要进行压缩的更新向量的所有条目,并通过随机舍入到两个的(负或正)两种功能,可以通过忽略Mantissa来以“自然”方式计算。我们表明,与没有压缩相比,NC将压缩向量的第二刻增加不超过微小因子$ \ frac {9} {8} $,这意味着NC对流行训练算法的收敛速度的影响,例如分布式SGD,可以忽略不计。但是,NC启用的通信节省是可观的,导致$ 3 $ - $ 4 \ times $ $改善整体理论运行时间。对于需要更具侵略性压缩的应用,我们将NC推广到自然抖动,我们证明这比常见的随机抖动技术要好得多。我们的压缩操作员可以自行使用,也可以与现有操作员结合使用,从而产生更具侵略性的结合效果,并在理论和实践中提供新的最先进。
translated by 谷歌翻译
分布式数据并行训练已被广泛用于深神经网络(DNN)模型。尽管当前的深度学习(DL)框架对于图像分类模型(例如图像分类模型)的密集模型很好地扩展了,但我们发现这些DL框架对于具有高度稀疏嵌入表的稀疏模型(NLP)模型(NLP)模型(NLP)模型具有相对较低的可扩展性。大多数现有作品忽略了模型参数的稀疏性,因此遭受了重要但不必要的沟通开销。在本文中,我们提出了Ablace,这是一个有效的沟通框架,以加快稀疏模型分布式培训的通信。 Embrace引入了稀疏感知的混合通信,将AlltoAll和模型并行置于数据并行训练中,以减少高度稀疏参数的交流开销。为了有效地重叠稀疏的通信与后向前和前向计算,采用进一步设计的2D通信调度方法,该方法优化了模型计算过程,放松嵌入式的依赖性,并计划以优先级的排队来安排每个嵌入行的稀疏通信。我们已经基于Pytorch和Horovod实施了Embrace的原型,并通过四个代表性的NLP模型进行了全面的评估。实验结果表明,与最先进的分布式训练基线相比,Embrace的速度高达2.41倍。
translated by 谷歌翻译
In distributed training of deep neural networks, parallel minibatch SGD is widely used to speed up the training process by using multiple workers. It uses multiple workers to sample local stochastic gradient in parallel, aggregates all gradients in a single server to obtain the average, and update each worker's local model using a SGD update with the averaged gradient. Ideally, parallel mini-batch SGD can achieve a linear speed-up of the training time (with respect to the number of workers) compared with SGD over a single worker. However, such linear scalability in practice is significantly limited by the growing demand for gradient communication as more workers are involved. Model averaging, which periodically averages individual models trained over parallel workers, is another common practice used for distributed training of deep neural networks since (Zinkevich et al. 2010) (McDonald, Hall, andMann 2010). Compared with parallel mini-batch SGD, the communication overhead of model averaging is significantly reduced. Impressively, tremendous experimental works have verified that model averaging can still achieve a good speed-up of the training time as long as the averaging interval is carefully controlled. However, it remains a mystery in theory why such a simple heuristic works so well. This paper provides a thorough and rigorous theoretical study on why model averaging can work as well as parallel mini-batch SGD with significantly less communication overhead.
translated by 谷歌翻译
High network communication cost for synchronizing gradients and parameters is the well-known bottleneck of distributed training. In this work, we propose TernGrad that uses ternary gradients to accelerate distributed deep learning in data parallelism. Our approach requires only three numerical levels {−1, 0, 1}, which can aggressively reduce the communication time. We mathematically prove the convergence of TernGrad under the assumption of a bound on gradients. Guided by the bound, we propose layer-wise ternarizing and gradient clipping to improve its convergence. Our experiments show that applying TernGrad on AlexNet doesn't incur any accuracy loss and can even improve accuracy. The accuracy loss of GoogLeNet induced by TernGrad is less than 2% on average. Finally, a performance model is proposed to study the scalability of TernGrad. Experiments show significant speed gains for various deep neural networks. Our source code is available 1 .
translated by 谷歌翻译
二阶优化方法,尤其是D-KFAC(分布式Kronecker近似曲率)算法,在加速GPU簇上加速了深神经网络(DNN)训练方面已获得了吸引力。但是,现有的D-KFAC算法需要计算和传达大量二阶信息,即Kronecker因素(KFS),在预处理梯度之前,导致大量计算和通信开销以及高存储器足迹。在本文中,我们提出了DP-KFAC,这是一种新颖的分布式预处理方案,该方案将不同DNN层的KF构造任务分配给不同的工人。 DP-KFAC不仅保留了现有D-KFAC算法的收敛性属性,而且还可以带来三个好处:减少计算开销在构造KFS中,没有KFS的通信和低内存足迹。在64-GPU群集上进行的广泛实验表明,DP-KFAC将开销的计算开销降低了1.55 x-1.65x,通信成本降低2.79x-3.15x,并且内存足迹在每秒二阶更新中降低1.14x-1.47 x与最先进的D-KFAC方法相比。
translated by 谷歌翻译
我们考虑通过连接到中央服务器的一组边缘设备的大规模分布式优化,其中服务器和边缘设备之间的有限通信带宽对优化过程提出了显着的瓶颈。灵感来自最近在联邦学习的进步,我们提出了一种分布式随机梯度下降(SGD)类型算法,该算法利用梯度的稀疏性,尽可能降低沟通负担。在算法的核心,用于使用压缩的感测技术来压缩器件侧的局部随机梯度;在服务器端,从嘈杂的聚合压缩的本地梯度恢复全局随机梯度的稀疏近似。我们对通信信道产生的噪声扰动的存在,对我们算法的收敛性进行了理论分析,并且还进行了数值实验以证实其有效性。
translated by 谷歌翻译
随着大数据的快速增长,分布式机器学习(ML)已广泛应用于培训大型模型。随机梯度下降(SGD)可以说是ML的Workhorse算法。 SGD培训的分布式ML型号涉及大量的梯度通信,这限制了分布式ML的可扩展性。因此,压缩梯度以减少通信是重要的。在本文中,我们提出了FastSGD,一种用于分布式ML的快速压缩的SGD框架。为了以低成本实现高压缩比,FastSGD表示梯度作为键值对,并在线性时间复杂度压缩梯度键和值。对于梯度值压缩,FASTSGD首先使用互焦数映射器将原始值转换为互焦值,然后,它利用对数量化来进一步将互焦值减少到小整数。最后,FastSGD通过给定阈值过滤减少梯度整数。对于渐变键压缩,FastSGD提供了一种自适应细粒度的Δ编码方法,用于存储具有更少位的渐变键。实际ML模型和数据集的广泛实验证明,与最先进的方法相比,FastSGD实现了高达4个级别的压缩比,并加速了高达8倍的收敛时间。
translated by 谷歌翻译
嵌入式模型是高维数据的有效学习范例。但是,嵌入模型的一个开放问题是它们的表示(潜在因子)通常会导致大参数空间。我们观察到,现有的分布式训练框架面临嵌入模型的可伸缩性问题,因为从服务器的共享嵌入参数更新和检索共享嵌入参数通常占主导地位培训周期。在本文中,我们提出了一种新的系统框架,可显着提高巨大嵌入模型培训的可扩展性。我们拥抱嵌入的嵌入式作为绩效机会的倾斜流行分布,并利用它来解决具有嵌入缓存的通信瓶颈。为确保缓存跨越一致性,我们将新的一致性模型纳入HET设计,该模型提供了在每嵌入的基础上提供细粒度的一致性保证。与以前的工作相比,只允许读取操作的僵化,HET也利用了写入操作的血液性。六种代表性任务的评估表明,在最先进的基线上,HET达到高达88%的嵌入通信减少和高达20.68倍的性能加速。
translated by 谷歌翻译
分布式优化和学习的最新进展表明,沟通压缩是减少交流的最有效手段之一。尽管在通信压缩下的收敛速率有很多结果,但理论下限仍然缺失。通过通信压缩的算法的分析将收敛归因于两个抽象属性:无偏见的属性或承包属性。它们可以通过单向压缩(仅从工人到服务器的消息被压缩)或双向压缩来应用它们。在本文中,我们考虑了分布式随机算法,以最大程度地减少通信压缩下的平滑和非凸目标函数。我们为算法建立了收敛的下限,无论是在单向或双向中使用无偏压缩机还是使用承包压缩机。为了缩小下限和现有上限之间的差距,我们进一步提出了一种新石器时代的算法,该算法在轻度条件下几乎达到了我们的下限(达到对数因素)。我们的结果还表明,使用承包双向压缩可以产生迭代方法,该方法的收敛速度与使用无偏见的单向压缩的方法一样快。实验结果验证了我们的发现。
translated by 谷歌翻译
Huge scale machine learning problems are nowadays tackled by distributed optimization algorithms, i.e. algorithms that leverage the compute power of many devices for training. The communication overhead is a key bottleneck that hinders perfect scalability. Various recent works proposed to use quantization or sparsification techniques to reduce the amount of data that needs to be communicated, for instance by only sending the most significant entries of the stochastic gradient (top-k sparsification). Whilst such schemes showed very promising performance in practice, they have eluded theoretical analysis so far. In this work we analyze Stochastic Gradient Descent (SGD) with k-sparsification or compression (for instance top-k or random-k) and show that this scheme converges at the same rate as vanilla SGD when equipped with error compensation (keeping track of accumulated errors in memory). That is, communication can be reduced by a factor of the dimension of the problem (sometimes even more) whilst still converging at the same rate. We present numerical experiments to illustrate the theoretical findings and the good scalability for distributed applications.
translated by 谷歌翻译
Mini-batch stochastic gradient descent (SGD) is state of the art in large scale distributed training. The scheme can reach a linear speedup with respect to the number of workers, but this is rarely seen in practice as the scheme often suffers from large network delays and bandwidth limits. To overcome this communication bottleneck recent works propose to reduce the communication frequency. An algorithm of this type is local SGD that runs SGD independently in parallel on different workers and averages the sequences only once in a while. This scheme shows promising results in practice, but eluded thorough theoretical analysis.We prove concise convergence rates for local SGD on convex problems and show that it converges at the same rate as mini-batch SGD in terms of number of evaluated gradients, that is, the scheme achieves linear speedup in the number of workers and mini-batch size. The number of communication rounds can be reduced up to a factor of T 1/2 -where T denotes the number of total steps-compared to mini-batch SGD. This also holds for asynchronous implementations.Local SGD can also be used for large scale training of deep learning models. The results shown here aim serving as a guideline to further explore the theoretical and practical aspects of local SGD in these applications.
translated by 谷歌翻译
由于培训数据集的大小爆炸,分布式学习近年来受到了日益增长的兴趣。其中一个主要瓶颈是中央服务器和本地工人之间的沟通成本。虽然已经证明错误反馈压缩以通过随机梯度下降(SGD)降低通信成本,但在培训大规模机器学习方面广泛用于培训的通信有效的适应性梯度方法楷模。在本文中,我们提出了一种新的通信 - 压缩AMSGRAD,用于分布式非透明的优化问题,可提供有效的效率。我们所提出的分布式学习框架具有有效的渐变压缩策略和工人侧模型更新设计。我们证明所提出的通信有效的分布式自适应梯度方法会聚到具有与随机非凸化优化设置中的未压缩的vanilla amsgrad相同的迭代复杂度的一阶静止点。关于各种基准备份我们理论的实验。
translated by 谷歌翻译
数据爆炸和模型尺寸的增加推动了大规模机器学习的显着进步,但也使模型训练时间耗时和模型存储变得困难。为了解决具有较高计算效率和设备限制的分布式模型培训设置中的上述问题,仍然存在两个主要困难。一方面,交换信息的沟通成本,例如,不同工人之间的随机梯度是分布式培训效率的关键瓶颈。另一方面,较少的参数模型容易用于存储和通信,但是损坏模型性能的风险。为了同时平衡通信成本,模型容量和模型性能,我们提出了量化的复合镜下降自适应亚基(QCMD Adagrad),并量化正规化双平均平均自适应亚级别(QRDA ADAGRAD)进行分布式培训。具体来说,我们探讨了梯度量化和稀疏模型的组合,以降低分布式培训中每次迭代的通信成本。构建了基于量化梯度的自适应学习率矩阵,以在沟通成本,准确性和模型稀疏性之间达到平衡。此外,从理论上讲,我们发现大量化误差会引起额外的噪声,从而影响模型的收敛性和稀疏性。因此,在QCMD Adagrad和QRDA Adagrad中采用了具有相对较小误差的阈值量化策略,以提高信噪比并保留模型的稀疏性。理论分析和经验结果都证明了所提出的算法的功效和效率。
translated by 谷歌翻译
基于深度学习的模型占主导地位的生产推荐系统的当前景观。此外,近年来目睹了模型规模的指数增长 - 从谷歌的2016年模型,最新的Facebook的型号有10亿个参数,具有12万亿参数。型号容量的每次跳跃都有显着的质量增强,这使我们相信100万亿参数的时代即将来临。然而,即使在工业规模数据中心内,这些模型的培训也在挑战。这种困难是从训练计算的惊人的异质性继承 - 模型的嵌入层可以包括总模型尺寸的99.99%,这是极其内存密集的;虽然其余的神经网络越来越多地计算密集型。为支持培训此类巨大模式,迫切需要有效的分布式培训系统。在本文中,我们通过仔细共同设计优化算法和分布式系统架构来解决这一挑战。具体而言,为了确保培训效率和训练精度,我们设计一种新型混合训练算法,其中嵌入层和密集的神经网络由不同的同步机制处理;然后,我们构建一个名为Persia的系统(短暂的并行推荐培训系统,其中包含混合加速),以支持这种混合培训算法。理论上的示范和实证研究均达到100万亿参数,以证明了波斯的系统设计和实施。我们将Pensia公开使用(在https://github.com/persiamml/persia),以便任何人都能够以100万亿参数的规模轻松培训推荐模型。
translated by 谷歌翻译
使用多个计算节点通常可以加速在大型数据集上的深度神经网络。这种方法称为分布式训练,可以通过专门的消息传递协议,例如环形全部减少。但是,以比例运行这些协议需要可靠的高速网络,其仅在专用集群中可用。相比之下,许多现实世界应用程序,例如联合学习和基于云的分布式训练,在具有不稳定的网络带宽的不可靠的设备上运行。因此,这些应用程序仅限于使用参数服务器或基于Gossip的平均协议。在这项工作中,我们通过提出MOSHPIT全部减少的迭代平均协议来提升该限制,该协议指数地收敛于全局平均值。我们展示了我们对具有强烈理论保证的分布式优化方案的效率。该实验显示了与使用抢占从头开始训练的竞争性八卦的策略和1.5倍的加速,显示了1.3倍的Imagenet培训的加速。
translated by 谷歌翻译
SOTA decentralized SGD algorithms can overcome the bandwidth bottleneck at the parameter server by using communication collectives like Ring All-Reduce for synchronization. While the parameter updates in distributed SGD may happen asynchronously there is still a synchronization barrier to make sure that the local training epoch at every learner is complete before the learners can advance to the next epoch. The delays in waiting for the slowest learners(stragglers) remain to be a problem in the synchronization steps of these state-of-the-art decentralized frameworks. In this paper, we propose the (de)centralized Non-blocking SGD (Non-blocking SGD) which can address the straggler problem in a heterogeneous environment. The main idea of Non-blocking SGD is to split the original batch into mini-batches, then accumulate the gradients and update the model based on finished mini-batches. The Non-blocking idea can be implemented using decentralized algorithms including Ring All-reduce, D-PSGD, and MATCHA to solve the straggler problem. Moreover, using gradient accumulation to update the model also guarantees convergence and avoids gradient staleness. Run-time analysis with random straggler delays and computational efficiency/throughput of devices is also presented to show the advantage of Non-blocking SGD. Experiments on a suite of datasets and deep learning networks validate the theoretical analyses and demonstrate that Non-blocking SGD speeds up the training and fastens the convergence. Compared with the state-of-the-art decentralized asynchronous algorithms like D-PSGD and MACHA, Non-blocking SGD takes up to 2x fewer time to reach the same training loss in a heterogeneous environment.
translated by 谷歌翻译
与训练数据中心的训练传统机器学习(ML)模型相反,联合学习(FL)训练ML模型,这些模型在资源受限的异质边缘设备上包含的本地数据集上。现有的FL算法旨在为所有参与的设备学习一个单一的全球模型,这对于所有参与培训的设备可能没有帮助,这是由于整个设备的数据的异质性。最近,Hanzely和Richt \'{A} Rik(2020)提出了一种新的配方,以培训个性化的FL模型,旨在平衡传统的全球模型与本地模型之间的权衡,该模型可以使用其私人数据对单个设备进行培训只要。他们得出了一种称为无环梯度下降(L2GD)的新算法,以解决该算法,并表明该算法会在需要更多个性化的情况下,可以改善沟通复杂性。在本文中,我们为其L2GD算法配备了双向压缩机制,以进一步减少本地设备和服务器之间的通信瓶颈。与FL设置中使用的其他基于压缩的算法不同,我们的压缩L2GD算法在概率通信协议上运行,在概率通信协议中,通信不会按固定的时间表进行。此外,我们的压缩L2GD算法在没有压缩的情况下保持与香草SGD相似的收敛速率。为了验证算法的效率,我们在凸和非凸问题上都进行了多种数值实验,并使用各种压缩技术。
translated by 谷歌翻译
许多组织使用配备有加速器的Compute集群,例如GPU和TPU,用于以分布式方式培训深入学习模型。培训是资源密集型的,消耗显着的计算,内存和网络资源。许多先前的作品探索如何减少培训资源占资源的占资源占用空间,而不会影响质量,但它们对瓶颈的子集(通常只有网络)限制了它们改善整体集群利用的能力。在这项工作中,我们利用深度学习工作负载的独特特征来提出结构化部分反向化(SPB),这是一种系统地控制分布式培训中个别工人的背包量的技术。这同时可以减少网络带宽,计算利用率和内存占用空间,同时保持模型质量。为了有效地利用SPB在集群层面的好处,我们介绍了一个SPB了解调度程序的jigsaw,它在深度学习培训(DLT)作业中进行迭代级别。我们发现拼图可以通过高达28 \%将大规模集群效率提高。
translated by 谷歌翻译
Large-scale distributed training requires significant communication bandwidth for gradient exchange that limits the scalability of multi-node training, and requires expensive high-bandwidth network infrastructure. The situation gets even worse with distributed training on mobile devices (federated learning), which suffers from higher latency, lower throughput, and intermittent poor connections. In this paper, we find 99.9% of the gradient exchange in distributed SGD are redundant, and propose Deep Gradient Compression (DGC) to greatly reduce the communication bandwidth. To preserve accuracy during this compression, DGC employs four methods: momentum correction, local gradient clipping, momentum factor masking, and warm-up training. We have applied Deep Gradient Compression to image classification, speech recognition, and language modeling with multiple datasets including Cifar10, ImageNet, Penn Treebank, and Librispeech Corpus. On these scenarios, Deep Gradient Compression achieves a gradient compression ratio from 270× to 600× without losing accuracy, cutting the gradient size of ResNet-50 from 97MB to 0.35MB, and for DeepSpeech from 488MB to 0.74MB. Deep gradient compression enables large-scale distributed training on inexpensive commodity 1Gbps Ethernet and facilitates distributed training on mobile. The code is available at: https://github.com/synxlin/ deep-gradient-compression.
translated by 谷歌翻译