GPipe:利用流水线并行高效训练巨型神经网络
GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism
摘要:
扩展深度神经网络容量已被认为是提高几种不同机器学习任务的模型质量的有效方法。在许多情况下,增加模型容量超过单个加速器的内存限制,需要开发特殊的算法或基础设施。这些解决方案通常是特定于体系结构的,不会转移到其他任务。为了解决高效和任务无关的模型并行性的需要,我们引入GPipe,一个流水线并行库,允许扩展任何网络,可以表示为一个序列的层。通过在不同的加速器上流水线化不同的子序列,GPipe提供了将各种不同的网络有效地扩展到巨大规模的灵活性。此外,GPipe采用了一种新的批分割流水线算法,当模型在多个加速器上分区时,几乎可以实现线性加速。我们通过在具有不同网络架构的两个不同任务上训练大规模神经网络来展示GPipe的优势:(i)图像分类:我们训练了一个5.57亿参数的AmoebaNet模型,并在ImageNet-2012上达到了84.4%的top-1准确率,(ii)多语言神经机器翻译:我们训练了一个60亿参数、128层的Transformer模型,该模型使用了100多种语言的语料库,并且比所有双语模型都获得了更好的质量。
英文摘要:
Scaling up deep neural network capacity has been known as an effective approach to improving model quality for several different machine learning tasks. In many cases, increasing model capacity beyond the memory limit of a single accelerator has required developing special algorithms or infrastructure. These solutions are often architecture-specific and do not transfer to other tasks. To address the need for efficient and task-independent model parallelism, we introduce GPipe, a pipeline parallelism library that allows scaling any network that can be expressed as a sequence of layers. By pipelining different sub-sequences of layers on separate accelerators, GPipe provides the flexibility of scaling a variety of different networks to gigantic sizes efficiently. Moreover, GPipe utilizes a novel batch-splitting pipelining algorithm, resulting in almost linear speedup when a model is partitioned across multiple accelerators. We demonstrate the advantages of GPipe by training large-scale neural networks on two different tasks with distinct network architectures: (i) Image Classification: We train a 557-million-parameter AmoebaNet model and attain a top-1 accuracy of 84.4% on ImageNet-2012, (ii) Multilingual Neural Machine Translation: We train a single 6-billion-parameter, 128-layer Transformer model on a corpus spanning over 100 languages and achieve better quality than all bilingual models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。