Sparse Mixers: Combining MoE and Mixing to build a more efficient BERT

James Lee-Thorp, Joshua Ainslie


Abstract
We combine the capacity of sparsely gated Mixture-of-Experts (MoE) with the speed and stability of linear, mixing transformations to design the Sparse Mixer encoder model. Sparse Mixer slightly outperforms BERT on GLUE and SuperGLUE, but more importantly trains 65% faster and runs inference 61% faster. We also present a faster variant, prosaically named Fast Sparse Mixer, that marginally underperforms BERT on SuperGLUE, but trains and runs nearly twice as fast. We justify the design of these two models by carefully ablating through various mixing mechanisms, MoE configurations, and hyperparameters. Sparse Mixer overcomes many of the latency and stability concerns of MoE models and offers the prospect of serving sparse student models, without resorting to distilling them to dense variants.
Anthology ID:
2022.findings-emnlp.5
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2022
Month:
December
Year:
2022
Address:
Abu Dhabi, United Arab Emirates
Editors:
Yoav Goldberg, Zornitsa Kozareva, Yue Zhang
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
58–75
Language:
URL:
https://aclanthology.org/2022.findings-emnlp.5
DOI:
10.18653/v1/2022.findings-emnlp.5
Bibkey:
Cite (ACL):
James Lee-Thorp and Joshua Ainslie. 2022. Sparse Mixers: Combining MoE and Mixing to build a more efficient BERT. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 58–75, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
Cite (Informal):
Sparse Mixers: Combining MoE and Mixing to build a more efficient BERT (Lee-Thorp & Ainslie, Findings 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.findings-emnlp.5.pdf
Video:
 https://aclanthology.org/2022.findings-emnlp.5.mp4