Mesh-TensorFlow:超级计算机的深度学习
Mesh-TensorFlow: Deep Learning for Supercomputers
摘要:
批量拆分(数据并行)是主要的分布式深度神经网络(DNN)训练策略,由于其普遍适用性和对单程序多数据(SPMD)编程的适应性。然而,批量拆分存在一些问题,包括无法训练非常大的模型(由于内存限制),高延迟和小批量时的低效率。所有这些都可以通过更一般的分布策略(模型并行)来解决。不幸的是,有效的模型并行算法往往是复杂的发现,描述和实现,特别是在大型集群。我们介绍Mesh-TensorFlow,一种用于指定分布式张量计算的通用语言。数据并行性可以被视为沿着“批处理”维度拆分张量和操作,在Mesh-TensorFlow中,用户可以指定任何张量维度在处理器的多维网格的任何维度上拆分。Mesh-TensorFlow图编译成SPMD程序,该程序由并行操作和集合通信原语(如Allreduce)组成。我们使用Mesh-TensorFlow来实现Transformer序列到序列模型的高效数据并行、模型并行版本。使用多达512个核心的TPU网格,我们训练具有多达50亿个参数的Transformer模型,超越了WMT'14英法翻译任务和10亿字语言建模基准的最新成果。Mesh-Tensorflow可在https://github.com/tensorflow/mesh上获得。
英文摘要:
Batch-splitting (data-parallelism) is the dominant distributed Deep Neural Network (DNN) training strategy, due to its universal applicability and its amenability to Single-Program-Multiple-Data (SPMD) programming. However, batch-splitting suffers from problems including the inability to train very large models (due to memory constraints), high latency, and inefficiency at small batch sizes. All of these can be solved by more general distribution strategies (model-parallelism). Unfortunately, efficient model-parallel algorithms tend to be complicated to discover, describe, and to implement, particularly on large clusters. We introduce Mesh-TensorFlow, a language for specifying a general class of distributed tensor computations. Where data-parallelism can be viewed as splitting tensors and operations along the "batch" dimension, in Mesh-TensorFlow, the user can specify any tensor-dimensions to be split across any dimensions of a multi-dimensional mesh of processors. A Mesh-TensorFlow graph compiles into a SPMD program consisting of parallel operations coupled with collective communication primitives such as Allreduce. We use Mesh-TensorFlow to implement an efficient data-parallel, model-parallel version of the Transformer sequence-to-sequence model. Using TPU meshes of up to 512 cores, we train Transformer models with up to 5 billion parameters, surpassing state of the art results on WMT'14 English-to-French translation task and the one-billion-word language modeling benchmark. Mesh-Tensorflow is available at https://github.com/tensorflow/mesh .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。