paper-with-me

홈 › Papers

SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention

2023-12-13 · Róbert Csordás, Piotr Piękos, 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.

📄 PDF Abstract BibTeX arXiv:2312.07987

Code (2)

robertcsordas/moe_attention 공식 구현 pytorch
robertcsordas/switchhead 공식 구현 pytorch

Tasks

Language ModelingLanguage ModellingMixture-of-Experts

Methods 이 논문이 사용한 방법론

Focus 설명 없음
Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Residual Connection 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…

Similar Papers 제목 키워드 기반

Towards 3D Acceleration for low-power Mixture-of-Experts and Multi-Head Attention Spiking Transformers

2024-12-07 · Boxun Xu, Junyoung Hwang, Pruek Vanna-iampikul, Yuxuan Yin 외

Spiking Neural Networks(SNNs) provide a brain-inspired and event-driven mechanism that is believed to be critical to unlock energy-efficient deep learning. The mixture-of-experts approach mirrors the parallel distributed…

Mixture-of-Experts

Mixture of Layers with Hybrid Attention

2026-05-10 · Ivan Ternovtsii, Yurii Bilak arxiv

Standard Mixture-of-Experts (MoE) transformers route tokens to expert subnetworks within each layer, but the layer structure itself remains monolithic. We introduce Mixture of Layers (MoL), which replaces full-width tran…

Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights

2026-02-01 · Qishuai Wen, Zhiyuan Huang, Xianghan Meng, Wei He 외 arxiv

The vanilla self-attention mechanism in Transformers can be viewed as a two-layer fast-weight MLP, whose weights are dynamically induced by inputs and whose hidden dimension is equal to the sequence length $N$. As the co…

MoEUT: Mixture-of-Experts Universal Transformers

2024-05-25 · Róbert Csordás, Kazuki Irie, Jürgen Schmidhuber, Christopher Potts 외

Previous work on Universal Transformers (UTs) has demonstrated the importance of parameter sharing across layers. By allowing recurrence in depth, UTs have advantages over standard Transformers in learning compositional …

Language ModelingLanguage ModellingMixture-of-Experts

Sparse Mixture-of-Experts for Multi-Channel Imaging: Are All Channel Interactions Required?

2025-11-21 · Sukwon Yun, Heming Yao, Burkhard Hoeckendorf, David Richmond 외 arxiv

Vision Transformers ($\text{ViTs}$) have become the backbone of vision foundation models, yet their optimization for multi-channel domains - such as cell painting or satellite imagery - remains underexplored. A key chall…