inference/research
verifiedhigh · 0.90updated 2026-10-10

Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity

moe · jmlr

Fields

id
papers/switch-transformers
arXiv
2101.03961
Venue
jmlr
Venue track
main
Year
2022
Category
moe
Adoption
in-upstream-engine
Authors
William FedusBarret ZophNoam Shazeer
Affiliations
Google Brain
Problem
MoE scales parameters at constant FLOPs, but adoption was blocked by routing complexity, expert communication cost, and training instability.
Mechanism
Sparse encoder-decoder (T5) where each Transformer FFN block is replaced by N experts and a single scalar gating network sends each token to the top-1 expert only. Gating computes a router projection followed by softmax over N experts, and the layer dispatches the token to argmax only; dropping the second expert halves the expert-weight bytes read per token versus top-2 MoE. Load balance is an auxiliary loss f = N * sum_i f_i * P_i (importance probability P, routed-token fraction f) added to the LM loss at alpha=1e-2, plus a z-loss on the logits. Enables bfloat16 mixed precision at scale via stochastic rounding of the residual add. Active-vs-total: Switch-Base 15B total / 11B active (about 73 percent); Switch-Extra Huge 1.6T total / roughly 140B active. Serving consequence: only the active experts are computed, but all expert weights must stay resident in HBM, so the 1.6T model cannot be served on a single device regardless of the low active count; weights are expert-sharded and activations move all-to-all each layer.
Speedup reported
Up to 7x faster pre-training than T5-Base at matched compute and step count, and 4x faster than T5-XXL at matched compute; switching from top-2 to top-1 gating also roughly doubled training throughput at matched quality in the authors' own ablation. Original experiments ran on TPU pods (32 TPU v3/v4 devices in the reported configurations). These are compute-matched rather than wall-clock-matched comparisons, so 7x is not 7x less wall time.
Open weights
yes
notes
Venue is JMLR 2022, confirmed via Semantic Scholar ('Journal of machine learning research'), but the paper schema's venue enum has no JMLR entry so this is recorded as 'other'; the authoritative venue is in notes. Load balancing here is auxiliary-loss based, NOT auxiliary-loss-free; DeepSeek-V3's bias-term contribution is explicitly contrasted against this. Token-choice top-1 gating of this form is the shape vLLM's sparse MoE block expects: an experts module receiving hidden_states, top_k_index and top_k_weights. VENUE_TRACK BACKFILL 2026-10-04 (paper-fields pass, agent w3p): venue_track 'main'. Peer-reviewed venue confirmed as JMLR 2022 (same). This is an additive track annotation; `venue` is unchanged at 'other' and no status change is implied by the track alone. VENUE RECLASSIFIED 2026-10-10 (crawler/w11-venue-enum): venue 'other' -> 'jmlr', venue_kind 'journal'. Confirmed by record notes and agreeing publisher/index deposit in data/sources/.
venue kind
journal

Notes

Venue is JMLR 2022, confirmed via Semantic Scholar ('Journal of machine learning research'), but the paper schema's venue enum has no JMLR entry so this is recorded as 'other'; the authoritative venue is in notes. Load balancing here is auxiliary-loss based, NOT auxiliary-loss-free; DeepSeek-V3's bias-term contribution is explicitly contrasted against this. Token-choice top-1 gating of this form is the shape vLLM's sparse MoE block expects: an experts module receiving hidden_states, top_k_index and top_k_weights.

VENUE_TRACK BACKFILL 2026-10-04 (paper-fields pass, agent w3p): venue_track 'main'. Peer-reviewed venue confirmed as JMLR 2022 (same). This is an additive track annotation; `venue` is unchanged at 'other' and no status change is implied by the track alone.

VENUE RECLASSIFIED 2026-10-10 (crawler/w11-venue-enum): venue 'other' -> 'jmlr', venue_kind 'journal'. Confirmed by record notes and agreeing publisher/index deposit in data/sources/.

Cross-references