训练计算最优的大型语言模型

Training Compute-Optimal Large Language Models

乔丹·霍夫曼 Jordan Hoffmann · Google DeepMind · 2022-03-29 · arXiv:2203.15556 ↗ · 被引 3461

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

摘要 · Abstract

我们研究了在给定计算预算下训练 Transformer 语言模型的最佳模型大小和令牌数量。我们发现当前的大型语言模型明显训练不足,这是由于近期专注于扩大语言模型规模而保持训练数据量不变的结果。通过训练超过 400 个语言模型,参数范围从 7000 万到超过 160 亿,令牌数从 50 亿到 5000 亿,我们发现对于计算最优训练,模型大小和训练令牌数应等比例缩放:模型大小每翻倍,训练令牌数也应翻倍。我们通过训练一个预测的计算最优模型 Chinchilla 来验证这一假设,该模型使用与 Gopher 相同的计算预算,但拥有 700 亿参数和 4 倍多的数据。Chinchilla 在大量下游评估任务上一致且显著地优于 Gopher(2800 亿)、GPT-3(1750 亿)、Jurassic-1(1780 亿)和 Megatron-Turing NLG(5300 亿)。这也意味着 Chinchilla 在微调和推理时使用的计算量大大减少,极大地方便了下游使用。值得一提的是,Chinchilla 在 MMLU 基准测试上达到了 67.5%的平均准确率,比 Gopher 提高了 7%以上。

We investigate the optimal model size and number of tokens for training a transformer language model under a given compute budget. We find that current large language models are significantly undertrained, a consequence of the recent focus on scaling language models whilst keeping the amount of training data constant. By training over 400 language models ranging from 70 million to over 16 billion parameters on 5 to 500 billion tokens, we find that for compute-optimal training, the model size and the number of training tokens should be scaled equally: for every doubling of model size the number of training tokens should also be doubled. We test this hypothesis by training a predicted compute-optimal model, Chinchilla, that uses the same compute budget as Gopher but with 70B parameters and 4$\times$ more more data. Chinchilla uniformly and significantly outperforms Gopher (280B), GPT-3 (175B), Jurassic-1 (178B), and Megatron-Turing NLG (530B) on a large range of downstream evaluation tasks. This also means that Chinchilla uses substantially less compute for fine-tuning and inference, greatly facilitating downstream usage. As a highlight, Chinchilla reaches a state-of-the-art average accuracy of 67.5% on the MMLU benchmark, greater than a 7% improvement over Gopher.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 13)

阅读逐段中英对照全文 →