The advent of the transformer has sparked a quick growth in the size of language models, far outpacing hardware improvements. (Dense) transformers are expected to reach the trillion-parameter scale in the near future, for which training requires thousands or even tens of thousands of GPUs. We investigate the challenges of training at this scale and beyond on commercially available hardware. In particular, we analyse the shortest possible training time for different configurations of distributed training, leveraging empirical scaling laws for language models to estimate the optimal (critical) batch size. Contrary to popular belief, we find no evidence for a memory wall, and instead argue that the real limitation -- other than the cost -- lies in the training duration. In addition to this analysis, we introduce two new methods, \textit{layered gradient accumulation} and \textit{modular pipeline parallelism}, which together cut the shortest training time by half. The methods also reduce data movement, lowering the network requirement to a point where a fast InfiniBand connection is not necessary. This increased network efficiency also improve on the methods introduced with the ZeRO optimizer, reducing the memory usage to a tiny fraction of the available GPU memory.


翻译:变压器的出现引发了语言模式规模的快速增长,硬件的改进速度远远超过了速度。 (强烈)变压器预计在不久的将来将达到万亿参数的尺度,为此培训需要数千甚至数万个GPU。 我们调查了在这种规模和范围以外就商业上可获得的硬件进行培训的挑战。 特别是, 我们分析了不同分布式培训配置的最短培训时间, 利用语言模型的经验化比例法来估计最佳( 关键) 批量大小。 与民众的信念相反, 我们没有发现记忆墙的证据, 相反, 我们发现真正的限制 -- -- 除了成本以外 -- 在于培训期限。 除了这一分析外, 我们引入了两种新方法, 即:\ textit{ 层梯度积累} 和\ textitit{ 管道平行 }, 将最短的培训时间减少一半。 方法还减少了数据移动, 将网络需求降低到一个不需要快速的点 。 这种提高的网络效率也提高了与 ZeRO 优化器所引入的方法, 将记忆使用率降低到微小的GPU。

0
下载
关闭预览

相关内容

专知会员服务
20+阅读 · 2021年2月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
斯坦福2020硬课《分布式算法与优化》
专知会员服务
117+阅读 · 2020年5月6日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
灾难性遗忘问题新视角:迁移-干扰平衡
CreateAMind
17+阅读 · 2019年7月6日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
计算机 | EMNLP 2019等国际会议信息6条
Call4Papers
18+阅读 · 2019年4月26日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Ray RLlib: Scalable 降龙十八掌
CreateAMind
8+阅读 · 2018年12月28日
(TensorFlow)实时语义分割比较研究
机器学习研究会
9+阅读 · 2018年3月12日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
Arxiv
0+阅读 · 2021年7月29日
Arxiv
7+阅读 · 2018年11月6日
Arxiv
5+阅读 · 2017年9月8日
VIP会员
相关VIP内容
专知会员服务
20+阅读 · 2021年2月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
斯坦福2020硬课《分布式算法与优化》
专知会员服务
117+阅读 · 2020年5月6日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
相关资讯
灾难性遗忘问题新视角:迁移-干扰平衡
CreateAMind
17+阅读 · 2019年7月6日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
计算机 | EMNLP 2019等国际会议信息6条
Call4Papers
18+阅读 · 2019年4月26日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Ray RLlib: Scalable 降龙十八掌
CreateAMind
8+阅读 · 2018年12月28日
(TensorFlow)实时语义分割比较研究
机器学习研究会
9+阅读 · 2018年3月12日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
Top
微信扫码咨询专知VIP会员