按年被提到
20212021 · 6 次2026
大模型与语言模型›混合专家与高效训练·arXiv:2101.03961 · cs.LG

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

Switch Transformer:用简单高效的稀疏性扩展到万亿参数模型
William Fedus, Barret Zoph, Noam Shazeer · 2021

简化 MoE 路由,用稀疏激活把预训练速度提升至 7 倍

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 11 人首次 2021-01-12 · 最近 2026-05-01
11不同的人
7活跃月份
11讨论串
1,210被引(OpenAlex)

混合专家(MoE)对每个输入选择不同参数,得到参数极多但计算量恒定的稀疏激活模型,但复杂性、通信开销和训练不稳定阻碍了广泛采用。Switch Transformer 简化了 MoE 路由算法,设计出通信与计算成本更低的改进模型,并提出稳定训练的技术,首次表明大型稀疏模型可用低精度(bfloat16)训练。基于 T5-Base 和 T5-Large 设计的模型在相同计算资源下预训练速度最高提升 7 倍,在 mT5-Base 的 101 种语言上都有提升;作者还在 C4 语料上预训练了万亿参数模型,相比 T5-XXL 实现 4 倍加速。

HN 为什么提它

评论者把它当作稀疏混合专家路由与万亿参数规模的代表,用来猜测闭源大模型的结构;也有人指出参数量大并不等于性能成比例提升。

方法难度 4 / 5约 60 分钟经得起时间
读之前最好知道
1Transformer 架构
2混合专家模型(MoE)与路由
3T5 预训练
4低精度训练(bfloat16)

学习路径

读这篇之前,按顺序读书架上的 7 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出

先看 Transformer 与 T5 这条主干,再看缩放定律和大模型并行与 MoE 的工程基础,最后读 Switch 如何简化路由。

  1. 1
    Attention Is All You Need注意力就是你所需要的一切 · 2017

    Switch 的模块都是 Transformer 的前馈层替换

    读编码器层里自注意力与前馈层的结构,之后 Switch 替换的是前馈层

  2. 2
    Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer探索迁移学习的极限:统一的文本到文本 Transformer · 2019

    Switch 以 T5 为基线与架构

    读T5 的文本到文本框架与模型规模设置,作为对比基线

  3. 3
    Scaling Laws for Neural Language Models神经语言模型的缩放定律 · 2020

    提供扩展参数规模的动机:损失随规模按幂律下降

    读参数量、数据量与算力的幂律关系

  4. 4
    GPipe: Efficient Training of Giant Neural Networks using Pipeline ParallelismGPipe:用流水线并行高效训练巨型神经网络 · 2018

    巨型网络的流水线并行,是训练大模型的并行手段之一

    读按层切分与微批次流水线的思路

  5. 5

    Switch 的实现依赖的并行框架,用于切分模型与数据

    读用命名维度描述分布式切分的思路

  6. 6
    GShard: Scaling Giant Models with Conditional Computation and Automatic ShardingGShard:用条件计算与自动分片扩展巨型模型 · 2020

    Switch 之前最直接的大规模 MoE 工作,路由方式是它要简化的对象

    读top-2 路由、专家容量与自动分片,理解 Switch 简化了什么

  7. 7
    Distilling the Knowledge in a Neural Network蒸馏神经网络中的知识 · 2015

    Switch 用蒸馏把稀疏大模型压回小的稠密模型

    读软标签蒸馏的基本做法

  8. 8
    Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient SparsitySwitch Transformer:用简单高效的稀疏性扩展到万亿参数模型 · 2021 · 就是这篇

    目标论文:简化 MoE 路由的 Switch Transformer

    读单专家路由、负载均衡损失与训练稳定技巧

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用criticaltinker · 2021-08

“will techniques to scale up model size continue to be a primary focus (eg as in [4])”

拿它作为通过稀疏性把模型规模扩到万亿参数的例子,问扩规模是否仍是重点
Program Synthesis with Large Language Models原评论 ↗
引用jayalammar · 2022-01

“Mixture of Expert models like the Switch Transformer [2] can be 1 trillion parameters in size, but are not 5X the performance, for example.”

指出 Switch Transformer 这类 MoE 模型虽有万亿参数,性能并未提升 5 倍
The Illustrated Retrieval Transformer原评论 ↗
引用espadrine · 2023-03

“My educated guess is that they use a MoE-style model similar to the Switch transformer[0]”

猜测所说模型采用类似 Switch Transformer 的 MoE 结构
引用radq · 2023-06

“If it's similar to the switch transformer architecture [1], which I suspect it is, then the models are all trained on the same corpus and the routing model learns automatically which experts to route to.”

推测类似 Switch Transformer 架构:路由模型自动学习把输入交给哪些专家
GPT4 is 8 x 220B params = 1.7T params原评论 ↗
引用brandall10 · 2023-07

“Mixture of Experts* approach comprised of 8 220B parameter models.”

把它作为混合专家方法的参考出处
GPT-4 is getting worse over time, not better原评论 ↗
引用agunapal · 2026-05

“Here is a paper from few years ago where they talk about 7x speed increase, which equates to savings.”

引用数年前的论文,称其报告了 7 倍提速,意味着节省成本
Granite 4.1: IBM's 8B Model Matching 32B MoE原评论 ↗
被提交为 story · 5 次