Switch Transformers:通过简单高效的稀疏性扩展到万亿参数模型

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

利亚姆·费杜斯 Liam Fedus · Google · 2021-01-11 · arXiv:2101.03961 ↗ · 被引 4212

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

在深度学习中,模型通常对所有输入重用相同的参数。混合专家(MoE)打破了这一惯例,为每个输入示例选择不同的参数。结果是一个稀疏激活的模型——参数数量惊人——但计算成本恒定。然而,尽管 MoE 取得了一些显著的成功,但其复杂性、通信成本和训练不稳定性阻碍了广泛采用——我们通过 Switch Transformer 解决了这些问题。我们简化了 MoE 路由算法,并设计了直观的改进模型,减少了通信和计算成本。我们提出的训练技术有助于控制不稳定性,并首次展示了可以使用较低精度(bfloat16)格式训练大型稀疏模型。我们基于 T5-Base 和 T5-Large 设计的模型在相同计算资源下实现了高达 7 倍的预训练速度提升。这些改进扩展到多语言设置,我们在所有 101 种语言上测量了相对于 mT5-Base 版本的增益。最后,我们通过在“Colossal Clean Crawled Corpus”上预训练高达万亿参数的模型,推进了当前语言模型的规模,并实现了比 T5-XXL 模型快 4 倍的速度。

In deep learning, models typically reuse the same parameters for all inputs. Mixture of Experts (MoE) defies this and instead selects different parameters for each incoming example. The result is a sparsely-activated model -- with outrageous numbers of parameters -- but a constant computational cost. However, despite several notable successes of MoE, widespread adoption has been hindered by complexity, communication costs and training instability -- we address these with the Switch Transformer. We simplify the MoE routing algorithm and design intuitive improved models with reduced communication and computational costs. Our proposed training techniques help wrangle the instabilities and we show large sparse models may be trained, for the first time, with lower precision (bfloat16) formats. We design models based off T5-Base and T5-Large to obtain up to 7x increases in pre-training speed with the same computational resources. These improvements extend into multilingual settings where we measure gains over the mT5-Base version across all 101 languages. Finally, we advance the current scale of language models by pre-training up to trillion parameter models on the "Colossal Clean Crawled Corpus" and achieve a 4x speedup over the T5-XXL model.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 32)

阅读逐段中英对照全文 →