Brainformers: Trading Simplicity for Efficiency
Yanqi Zhou, Nan Du, Yanping Huang, Daiyi Peng, Chang Lan, Da Huang, Siamak Shakeri, David R. So, Andrew M. Dai, Yifeng Lu, Zhifeng Chen, Quoc V. Le
Abstract
Transformers are central to recent successes in natural language processing and computer vision. Transformers have a mostly uniform backbone where layers alternate between feed-forward and self-attention in order to build a deep network. Here we investigate this design choice and find that more complex blocks that have different permutations of layer primitives can be more efficient. Using this insight, we develop a complex block, named Brainformer, that consists of a diverse sets of layers such as sparsely gated feed-forward layers, dense feed-forward layers, attention layers, and various forms of layer normalization and activation functions. Brainformer consistently outperforms the state-of-the-art dense and sparse Transformers, in terms of both quality and efficiency. A Brainformer model with 8 billion activated parameters per token demonstrates 2x faster training convergence and 5x faster step time compared to its GLaM counterpart. In downstream task evaluation, Brainformer also demonstrates a 3% higher SuperGLUE score with fine-tuning compared to GLaM with a similar number of activated parameters. Finally, Brainformer largely outperforms a Primer dense model derived with NAS with similar computation per token on fewshot evaluations.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
16 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CoAtNet: Marrying Convolution and Attention for All Data Sizes cites Language Models are Few-Shot Learners
- Statistical Perspective of Top-K Sparse Softmax Gating Mixture of Experts cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
- Statistical Perspective of Top-K Sparse Softmax Gating Mixture of Experts cites FuseMoE: Mixture-of-Experts Transformers for Fleximodal Fusion
- FuseMoE: Mixture-of-Experts Transformers for Fleximodal Fusion cites Statistical Perspective of Top-K Sparse Softmax Gating Mixture of Experts
- OpenMoE: An Early Effort on Open Mixture-of-Experts Language Models cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
- OpenMoE: An Early Effort on Open Mixture-of-Experts Language Models cites Language Models are Few-Shot Learners
- OpenMoE: An Early Effort on Open Mixture-of-Experts Language Models cites Mixture-of-Experts with Expert Choice Routing
- On Least Square Estimation in Softmax Gating Mixture of Experts cites Statistical Perspective of Top-K Sparse Softmax Gating Mixture of Experts
- FuseMoE: Mixture-of-Experts Transformers for Fleximodal Fusion cites Mixture-of-Experts with Expert Choice Routing
- Mixture-of-Experts with Expert Choice Routing cites CoAtNet: Marrying Convolution and Attention for All Data Sizes
- Sigmoid Gating is More Sample Efficient than Softmax Gating in Mixture of Experts cites Statistical Perspective of Top-K Sparse Softmax Gating Mixture of Experts
- Sigmoid Gating is More Sample Efficient than Softmax Gating in Mixture of Experts cites On Least Square Estimation in Softmax Gating Mixture of Experts
- Sigmoid Gating is More Sample Efficient than Softmax Gating in Mixture of Experts cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
- Sigmoid Gating is More Sample Efficient than Softmax Gating in Mixture of Experts cites FuseMoE: Mixture-of-Experts Transformers for Fleximodal Fusion
Cited by top-tier papers16
- OpenMoE: An Early Effort on Open Mixture-of-Experts Language ModelsFuzhao Xue, Zian Zheng, Yao Fu, Jinjie Ni et al.ICML 2024 · 183 citations
- FuseMoE: Mixture-of-Experts Transformers for Fleximodal FusionXing Han, Huy Nguyen, Carl Harris, Nhat Ho et al.NeurIPS 2024 · 129 citations
- Sigmoid Gating is More Sample Efficient than Softmax Gating in Mixture of ExpertsHuy Nguyen, Nhat Ho, Alessandro RinaldoNeurIPS 2024 · 35 citations
- Statistical Perspective of Top-K Sparse Softmax Gating Mixture of ExpertsHuy Nguyen, Pedram Akbarian, Fanqi Yan, Nhat HoICLR 2024 · 29 citations
- On Least Square Estimation in Softmax Gating Mixture of ExpertsHuy Nguyen, Nhat Ho, Alessandro RinaldoICML 2024 · 25 citations
Builds on15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer et al.NeurIPS 2021 · 3,862 citations
- CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
- GLaM: Efficient Scaling of Language Models with Mixture-of-ExpertsNan Du, Yanping Huang, Andrew M. Dai, Simon Tong et al.ICML 2022 · 1,173 citations
- Mixture-of-Experts with Expert Choice RoutingYanqi Zhou, Tao Lei, Hanxiao Liu, Nan Du et al.NeurIPS 2022 · 933 citations
Related papers
- DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted AveragingMatteo Pagliardini, Amirkeivan Mohtashami, François Fleuret, Martin JaggiNeurIPS 2024 · 60 citations
- RealFormer: Transformer Likes Residual AttentionRuining He, Anirudh Ravula, Bhargav Kanagal, Joshua AinslieACL Findings 2021 · 104 citations
- Efficient Long-Range Transformers: You Need to Attend More, but Not Necessarily at Every LayerQingru Zhang, Dhananjay Ram, Cole Hawkins, Sheng Zha et al.EMNLP Findings 2023 · 18 citations
- BiFormer: Vision Transformer with Bi-Level Routing AttentionLei Zhu, Xinjiang Wang, Zhanghan Ke, Wayne Zhang et al.CVPR 2023
- Scaling Vision with Sparse Mixture of ExpertsCarlos Riquelme, Joan Puigcerver, Basil Mustafa, Maxim Neumann et al.NeurIPS 2021 · 1,213 citations
