With the increasing data volume, there is a trend of using large-scale pre-trained models to store the knowledge into an enormous number of model parameters. The training of these models is composed of lots of dense algebras, requiring a huge amount of hardware resources. Recently, sparsely-gated Mixture-of-Experts (MoEs) are becoming more popular and have demonstrated impressive pretraining scalability in various downstream tasks. However, such a sparse conditional computation may not be effective as expected in practical systems due to the routing imbalance and fluctuation problems. Generally, MoEs are becoming a new data analytics paradigm in the data life cycle and suffering from unique challenges at scales, complexities, and granularities never before possible. In this paper, we propose a novel DNN training framework, FlexMoE, which systematically and transparently address the inefficiency caused by dynamic dataflow. We first present an empirical analysis on the problems and opportunities of training MoE models, which motivates us to overcome the routing imbalance and fluctuation problems by a dynamic expert management and device placement mechanism. Then we introduce a novel scheduling module over the existing DNN runtime to monitor the data flow, make the scheduling plans, and dynamically adjust the model-to-hardware mapping guided by the real-time data traffic. A simple but efficient heuristic algorithm is exploited to dynamically optimize the device placement during training. We have conducted experiments on both NLP models (e.g., BERT and GPT) and vision models (e.g., Swin). And results show FlexMoE can achieve superior performance compared with existing systems on real-world workloads -- FlexMoE outperforms DeepSpeed by 1.70x on average and up to 2.10x, and outperforms FasterMoE by 1.30x on average and up to 1.45x.


翻译:随着数据量的增加,使用大规模预训练模型将知识存储至大量的模型参数中成为一种趋势。这些模型的训练由大量的稠密代数构成,需要大量的硬件资源。最近,稀疏门限混合专家(MoE)越来越流行,并在各种下游任务中展示了惊人的预训练可扩展性。然而,在实用系统中,这种稀疏条件计算可能不如预期的有效,因为存在路由不平衡和波动问题。通常,MoEs正在成为数据生命周期中的一种新的数据分析范式,并面临空前的规模、复杂性和粒度方面的独特挑战。在本文中,我们提出了一种新的DNN训练框架FlexMoE,以系统性和透明性地解决动态数据流引起的低效问题。我们首先对MoE模型的问题和机会进行了实证分析,这促使我们通过动态专家管理和设备分配机制来克服路由不平衡和波动问题。然后,我们在现有的DNN运行时上引入了一种新的调度模块,用于监视数据流量、制定调度计划和根据实时数据流量指导动态调整模型到硬件的映射。我们利用一种简单但高效的启发式算法来在训练过程中动态优化设备的放置。我们在自然语言处理模型(如BERT和GPT)和视觉模型(如Swin)上进行了实验。结果表明,在现实世界的工作负载上,FlexMoE表现优异,平均比现有系统DeepSpeed快1.70倍,最高可达2.10倍;平均比FasterMoE快1.30倍,最高可达1.45倍。

1
下载
关闭预览

相关内容

百篇论文纵览大型语言模型最新研究进展
专知会员服务
68+阅读 · 2023年3月31日
《多智能体任务规划》2022博士论文
专知会员服务
224+阅读 · 2022年11月20日
【CVPR2022】基于知识蒸馏的高效预训练
专知会员服务
31+阅读 · 2022年4月23日
【AAAI2022】基于双流更新的视觉Transformer动态加速方法
专知会员服务
23+阅读 · 2021年12月11日
【NeurIPS 2020】视觉和语言表示学习的大规模对抗性训练
专知会员服务
14+阅读 · 2020年10月27日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
强化学习三篇论文 避免遗忘等
CreateAMind
19+阅读 · 2019年5月24日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
TorchSeg:基于pytorch的语义分割算法开源了
极市平台
20+阅读 · 2019年1月28日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
0+阅读 · 2023年5月25日
Arxiv
19+阅读 · 2021年6月15日
VIP会员
相关VIP内容
相关资讯
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
强化学习三篇论文 避免遗忘等
CreateAMind
19+阅读 · 2019年5月24日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
TorchSeg:基于pytorch的语义分割算法开源了
极市平台
20+阅读 · 2019年1月28日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
相关基金
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员