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

一种训练超大型深度学习模型的高效二维方法

An Efficient 2D Method for Training Super-Large Deep Learning Models

University of California, Los Angeles(加州大学洛杉矶分校);National University of Singapore(新加坡国立大学)

Qifan Xu, Shenggui Li, Chaoyu Gong, Yang You

摘要:

巨大的神经网络模型在现实应用中表现出了前所未有的性能。然而,由于内存限制,必须利用模型并行来托管大型模型,否则这些模型将不适合单个设备的内存。以前的方法如Megatron将整个模型的参数划分到多个设备中,而每个设备必须容纳前向和后向传递中的冗余激活。在这项工作中,我们提出了Optimus,一个高效的和可扩展的2D分区模式的模型并行性,这将有利于无限大的大语言模型的训练。在Optimus中,激活在设备之间进行分区和分布,进一步减少冗余。在等效率方面,擎天柱明显优于威震天。在TACC Frontera的64个GPU上,Optimus实现了1.48倍的训练加速,1.78倍的推理加速,以及8倍于Megatron的最大批量大小。擎天柱在缩放效率上远远超过威震天。该代码可在https://github.com/xuqifan897/Optimus上获得。

英文摘要:

Huge neural network models have shown unprecedented performance in real-world applications. However, due to memory constraints, model parallelism must be utilized to host large models that would otherwise not fit into the memory of a single device. Previous methods like Megatron partition the parameters of the entire model among multiple devices, while each device has to accommodate the redundant activations in forward and backward pass. In this work, we propose Optimus, a highly efficient and scalable 2D-partition paradigm of model parallelism that would facilitate the training of infinitely large language models. In Optimus, activations are partitioned and distributed among devices, further reducing redundancy. In terms of isoefficiency, Optimus significantly outperforms Megatron. On 64 GPUs of TACC Frontera, Optimus achieves 1.48X speedup for training, 1.78X speedup for inference, and 8X increase in maximum batch size over Megatron. Optimus surpasses Megatron in scaling efficiency by a great margin. The code is available at https://github.com/xuqifan897/Optimus.

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

↑