Papers › Efficient Language Modeling with Sparse all-MLP

Efficient Language Modeling with Sparse all-MLP

14 Mar 2022arXiv:2203.06850archive 2025-07-28

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

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× 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.

PaperPDF

Code

No code repository is listed for this paper in the archive or in Syntology's graph.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

AllCommon Sense ReasoningIn-Context LearningLanguage ModelingLanguage ModellingMixture-of-ExpertsQuestion AnsweringSentence CompletionZero-Shot Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Common Sense Reasoning ReCoRD Switch Transformer 9B EM 79.9 #19 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD sMLP – deterministic 9.4B (0-shot) EM 73.4 #22 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD Gshard 9B EM 72.4 #24 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD HASH Layers 10B (0-shot) EM 67.2 #28 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD Base Layers 10B (0-shot) EM 60.7 #30 of 45 Archive leaderboard report
Common Sense Reasoning WinoGrande sMLP – deterministic 9.4B (0-shot) Accuracy 54.3 #67 of 77 Archive leaderboard report
Common Sense Reasoning WinoGrande Switch Transformer 9B (0-shot) Accuracy 53.4 #68 of 77 Archive leaderboard report
Common Sense Reasoning WinoGrande HASH Layers 10B (0-shot) Accuracy 51.7 #72 of 77 Archive leaderboard report
Common Sense Reasoning WinoGrande Gshard 9B (0-shot) Accuracy 51.1 #73 of 77 Archive leaderboard report
Common Sense Reasoning WinoGrande Base Layers 10B (0-shot) Accuracy 51 #74 of 77 Archive leaderboard report
Question Answering COPA sMLP – deterministic 9.4B (0-shot) Accuracy 79 #38 of 60 Archive leaderboard report
Question Answering COPA Gshard 9B Accuracy 76 #44 of 60 Archive leaderboard report
Question Answering COPA Switch Transformer 9B Accuracy 75 #45 of 60 Archive leaderboard report
Question Answering COPA HASH Layers 10B (0-shot) Accuracy 64 #54 of 60 Archive leaderboard report
Question Answering COPA Base Layers 10B (0-shot) Accuracy 63 #55 of 60 Archive leaderboard report
Question Answering PIQA sMLP - deterministic 9.4B (0-shot) Accuracy 73 #51 of 67 Archive leaderboard report
Question Answering PIQA Gshard 9B Accuracy 68.1 #59 of 67 Archive leaderboard report
Question Answering PIQA Base Layers 10B (0-shot) Accuracy 63.8 #63 of 67 Archive leaderboard report
Question Answering PIQA HASH Layers 10B (0-shot) Accuracy 63.8 #64 of 67 Archive leaderboard report
Question Answering StoryCloze sMLP – deterministic 9.4B (0-shot) Accuracy 74.7 #17 of 23 Archive leaderboard report
Question Answering StoryCloze Switch Transformer 9B Accuracy 73.3 #18 of 23 Archive leaderboard report
Question Answering StoryCloze Gshard 9B Accuracy 67.9 #20 of 23 Archive leaderboard report
Question Answering StoryCloze HASH Layers 10B (0-shot) Accuracy 64.7 #21 of 23 Archive leaderboard report
Question Answering StoryCloze Base Layers 10B (0-shot) Accuracy 61.4 #22 of 23 Archive leaderboard report
Sentence Completion HellaSwag sMLP – deterministic 9.4B (0-shot) Accuracy 54.5 #63 of 89 Archive leaderboard report
Sentence Completion HellaSwag Switch Transformer 9B Accuracy 52.5 #64 of 89 Archive leaderboard report
Sentence Completion HellaSwag Gshard 9B Accuracy 38 #79 of 89 Archive leaderboard report
Sentence Completion HellaSwag HASH Layers 10B (0-shot) Accuracy 33 #83 of 89 Archive leaderboard report
Sentence Completion HellaSwag Base Layers 10B (0-shot) Accuracy 30.2 #87 of 89 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBASEBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxSpatial Gating UnitSwitch FFNSwitch TransformerTransformergMLP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections