“They trained a >600B parameter translation model (GPT-3 is 175B parameters).”
GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
标注 API 加 XLA 扩展,自动分片训练超 6000 亿参数的 MoE 翻译模型
GShard 由一组轻量标注 API 和对 XLA 编译器的扩展组成,只需极少改动现有模型代码就能表达各种并行计算模式。作者借此把带稀疏门控专家混合(Sparsely-Gated MoE)的多语言翻译 Transformer 扩展到超过 6000 亿参数,在 2048 块 TPU v3 上 4 天训练完成,100 种语言到英语的翻译质量远超此前水平。
评论者用它来说明谷歌早就训练过超过 6000 亿参数的翻译模型(对照 GPT-3 的 1750 亿),也借它讨论 MoE 与并行 API,并推测 GPT-4 未必有谷歌不知道的秘密。
学习路径
读这篇之前,按顺序读书架上的 4 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出先建立 Transformer 与缩放定律的动机,再看 GPipe 和 Mesh-TensorFlow 这两种并行化前驱,最后读 GShard 如何用条件计算加自动分片扩展到超大模型。
- 1
- 2
- 3
GShard 要对比并超越的另一种扩展方式:流水线并行。
读按层切分、micro-batch 流水线与 bubble 开销的概念。
- 4
先行的张量切分框架,GShard 的标注式分片思路与它相关。
读如何把张量维度映射到计算资源网格;对比它与 GShard 的差别。
- 5GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
目标论文:条件计算(MoE)加自动分片,训练超 6000 亿参数的翻译模型。
读稀疏门控 MoE 的路由与负载均衡;分片标注 API 与 XLA 编译器扩展。
HN 书评
推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及“The contribution on parallel APIs is outlined clearly in the abstract of the paper:”
“If this is true, then there's a chance that there's no secret sauce to GPT4 that [Google doesn't already know about].”
- GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding ↗baylearn · 2020-07-01 · 2 分
- GShard: Scaling giant models with conditional computation and automatic sharding ↗MrUssek · 2020-07-02 · 112 分
- 600B Parameters Model – GShard: Scaling Giant Models ↗blopeur · 2020-07-02 · 3 分