SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention
Róbert Csordás, Piotr Piekos, Kazuki Irie, Jürgen Schmidhuber
摘要
Despite many recent works on Mixture of Experts (MoEs) for resource-efficient Transformer language models, existing methods mostly focus on MoEs for feedforward layers. Previous attempts at extending MoE to the self-attention layer fail to match the performance of the parameter-matched baseline. Our novel SwitchHead is an effective MoE method for the attention layer that successfully reduces both the compute and memory requirements, achieving wall-clock speedup, while matching the language modeling performance of the baseline Transformer. Our novel MoE mechanism allows SwitchHead to compute up to 8 times fewer attention matrices than the standard Transformer. SwitchHead can also be combined with MoE feedforward layers, resulting in fully-MoE"SwitchAll"Transformers. For our 262M parameter model trained on C4, SwitchHead matches the perplexity of standard models with only 44% compute and 27% memory usage. Zero-shot experiments on downstream tasks confirm the performance of SwitchHead, e.g., achieving more than 3.5% absolute improvements on BliMP compared to the baseline with an equal compute resource.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Unified Scaling Laws for Routed Language Models 引用了 Language Models are Few-Shot Learners
- Unified Scaling Laws for Routed Language Models 引用了 BASE Layers: Simplifying Training of Large, Sparse Models
- Unified Scaling Laws for Routed Language Models 引用了 GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- MoEUT: Mixture-of-Experts Universal Transformers 引用了 Unified Scaling Laws for Routed Language Models
- MoEUT: Mixture-of-Experts Universal Transformers 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- MoEUT: Mixture-of-Experts Universal Transformers 引用了 Language Models are Few-Shot Learners
- MoEUT: Mixture-of-Experts Universal Transformers 引用了 GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
- Routing Mamba: Scaling State Space Models with Mixture-of-Experts Projection 引用了 GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
- Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free 引用了 MoEUT: Mixture-of-Experts Universal Transformers
- UMoE: Unifying Attention and FFN with Shared Experts 引用了 MoEUT: Mixture-of-Experts Universal Transformers
- UMoE: Unifying Attention and FFN with Shared Experts 引用了 BASE Layers: Simplifying Training of Large, Sparse Models
- BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of Experts 引用了 Language Models are Few-Shot Learners
- BASE Layers: Simplifying Training of Large, Sparse Models 引用了 Language Models are Few-Shot Learners
- GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper8
- Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-FreeZihan Qiu, Zekun Wang, Bo Zheng, Zeyu Huang 等NeurIPS 2025 · 336 次引用
- MoEUT: Mixture-of-Experts Universal TransformersRóbert Csordás, Kazuki Irie, Jürgen Schmidhuber, Christopher Potts 等NeurIPS 2024 · 65 次引用
- BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of ExpertsQizhen (Irene) Zhang, Nikolas Gritsch, Dwaraknath Gnaneshwar, Simon Guo 等NeurIPS 2024 · 18 次引用
- Routing Mamba: Scaling State Space Models with Mixture-of-Experts ProjectionZheng Zhan, Liliang Ren, Shuohang Wang, Liyuan Liu 等NeurIPS 2025 · 4 次引用
- UMoE: Unifying Attention and FFN with Shared ExpertsYuanhang Yang, Chaozheng Wang, Jing LiNeurIPS 2025 · 4 次引用
它引用的 Paper11
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- GShard: Scaling Giant Models with Conditional Computation and Automatic ShardingDmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen 等ICLR 2021 · 1,954 次引用
- BASE Layers: Simplifying Training of Large, Sparse ModelsMike Lewis, Shruti Bhosale, Tim Dettmers, Naman Goyal 等ICML 2021 · 382 次引用
- Unified Scaling Laws for Routed Language ModelsAidan Clark, Diego de Las Casas, Aurelia Guy, Arthur Mensch 等ICML 2022 · 266 次引用
相关 Paper
- XMoE: Sparse Models with Fine-grained and Adaptive Expert SelectionYuanhang Yang, Shiyi Qi, Wenchao Gu, Chaozheng Wang 等ACL Findings 2024 · 10 次引用
- MoH: Multi-Head Attention as Mixture-of-Head AttentionPeng Jin, Bo Zhu, Li Yuan, Shuicheng YanICML 2025 · 2 次引用
- AutoMoE: Heterogeneous Mixture-of-Experts with Adaptive Computation for Efficient Neural Machine TranslationGanesh Jawahar, Subhabrata Mukherjee, Xiaodong Liu, Young Jin Kim 等ACL Findings 2023 · 5 次引用
- MoE++: Accelerating Mixture-of-Experts Methods with Zero-Computation ExpertsPeng Jin, Bo Zhu, Li Yuan, Shuicheng YanICLR 2025
- Pushing Mixture of Experts to the Limit: Extremely Parameter Efficient MoE for Instruction TuningTed Zadouri, Ahmet Üstün, Arash Ahmadian, Beyza Ermis 等ICLR 2024 · 169 次引用
