Efficient Large Scale Language Modeling with Mixtures of Experts
Authors:
- Mikel ArtetxeMAMikel Artetxe
- Shruti BhosaleSBShruti Bhosale
- Naman GoyalNGNaman Goyal
- Todor MihaylovTMTodor Mihaylov
- Myle OttMOMyle Ott
- Sam ShleiferSSSam Shleifer
- Xi Victoria LinXLXi Victoria Lin
- Jingfei DuJDJingfei Du
- Srinivasan IyerSISrinivasan Iyer
- Ramakanth PasunuruRPRamakanth Pasunuru
- Giri AnantharamanGAGiri Anantharaman
- Xian LiXLXian Li
Preprint
Abstract
Mixture of Experts layers (MoEs) enable efficient scaling of language models through conditional computation. This paper presents a detailed empirical study of how autoregressive MoE language models scale in comparison with dense models in a wide range of settings: in- and out-of-domain language modeling, zero- and few-shot priming, and full-shot fine-tuning. With the exception of fine-tuning, we find MoEs to be substantially more compute efficient. At more modest training budgets, MoEs can match the performance of dense models using $\sim$4 times less compute. This gap narrows at scale, but our largest MoE model (1.1T parameters) consistently outperforms a compute-equivalent dense model (6.7B parameters). Overall, this performance gap varies greatly across tasks and domains, suggesting that MoE and dense models generalize differently in ways that are worthy of future study. We make our code and models publicly available for research use.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- Efficient large-scale language model training on GPU clusters using megatron-LM2021
- Shortformer: Better Language Modeling using Shorter Inputs2021
- WinoGrande: An Adversarial Winograd Schema Challenge at ScaleProceedings of the AAAI Conference on Artificial Intelligence, 2020
- PIQA: Reasoning about Physical Commonsense in Natural LanguageProceedings of the AAAI Conference on Artificial Intelligence, 2020
- CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models2020
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension2020
- Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering2018
- A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference2018
- A Corpus and Cloze Evaluation for Deeper Understanding of Commonsense Stories2016
- Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books2015