Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity
William Fedus, Barret Zoph, Noam Shazeer
JMLR 2022 · arXiv 2101.03961 · Read the paper ↗
Mixture of experts with one expert per token: many more parameters, the same compute per token.
3 steps + 1 beyond the paper · 0 solved
Start: Total versus active parameters →- 1Total versus active parametersWhy sparse models are cheap to run.Count total and active parameters of an MoE layer
- 2Expert capacityCap each expert and drop the overflow.Route tokens with expert capacity and drop the overflow
- 3Load-balancing lossThe auxiliary loss that keeps experts busy.Compute the Switch Transformer load-balancing loss
Beyond the paper
Follow-up ideas that build on this paper. Each blurb names the follow-up work.
More transformers and llms papers
- Attention Is All You Need 2017
- LoRA: Low-Rank Adaptation of Large Language Models 2021
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 2022
- RoFormer: Enhanced Transformer with Rotary Position Embedding 2021
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model 2023
- Fast Inference from Transformers via Speculative Decoding 2022
- LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale 2022