arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.06850cs.CLcs.AI
收藏

基于稀疏全MLP的高效语言建模

Efficient Language Modeling with Sparse all-MLP

State University of New York at Buffalo(纽约州立大学布法罗分校);Meta AI

Ping Yu, Mikel Artetxe, Myle Ott, Sam Shleifer, Hongyu Gong, Ves Stoyanov, Xian Li

摘要:

全MLP架构作为基于注意力的模型的替代方案已经引起了越来越多的兴趣。在NLP中,最近的工作如gMLP表明,所有MLP在语言建模中可以与Transformers相匹配,但在下游任务中仍然落后。在这项工作中,我们分析了MLP的表现力的局限性,并提出了稀疏激活的MLP与混合专家(MoEs)在功能和输入(令牌)维度。这种稀疏的全MLP显著提高了模型容量和表达能力,同时保持计算恒定。我们解决关键的挑战,将条件计算与两个路由策略。与基于变换器的MoE(GShard、Switch Transformer、Base Layers和HASH Layers)以及密集的Transformers和全MLP相比,所提出的稀疏全MLP改善了语言建模的复杂性,并且在训练效率上获得了高达2个$\times$的改进。最后,我们评估了它的zero-shot在六个下游任务的上下文学习性能,并发现它优于基于transformer的MoE和密集的Transformers。

英文摘要:

All-MLP architectures have attracted increasing interest as an alternative to attention-based models. In NLP, recent work like gMLP shows that all-MLPs can match Transformers in language modeling, but still lag behind in downstream tasks. In this work, we analyze the limitations of MLPs in expressiveness, and propose sparsely activated MLPs with mixture-of-experts (MoEs) in both feature and input (token) dimensions. Such sparse all-MLPs significantly increase model capacity and expressiveness while keeping the compute constant. We address critical challenges in incorporating conditional computation with two routing strategies. The proposed sparse all-MLP improves language modeling perplexity and obtains up to 2$\times$ improvement in training efficiency compared to both Transformer-based MoEs (GShard, Switch Transformer, Base Layers and HASH Layers) as well as dense Transformers and all-MLPs. Finally, we evaluate its zero-shot in-context learning performance on six downstream tasks, and find that it surpasses Transformer-based MoEs and dense Transformers.

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

↑