[论文解读] Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer
论文提出 Mu Transfer,使用 Maximal Update Parametrization (μP) 将超参数从一个小的代理模型转移到一个更大的目标模型,并进行零-shot 调优,实现大幅提速和具有竞争力的性能。
Hyperparameter (HP) tuning in deep learning is an expensive process, prohibitively so for neural networks (NNs) with billions of parameters. We show that, in the recently discovered Maximal Update Parametrization (muP), many optimal HPs remain stable even as model size changes. This leads to a new HP tuning paradigm we call muTransfer: parametrize the target model in muP, tune the HP indirectly on a smaller model, and zero-shot transfer them to the full-sized model, i.e., without directly tuning the latter at all. We verify muTransfer on Transformer and ResNet. For example, 1) by transferring pretraining HPs from a model of 13M parameters, we outperform published numbers of BERT-large (350M parameters), with a total tuning cost equivalent to pretraining BERT-large once; 2) by transferring from 40M parameters, we outperform published numbers of the 6.7B GPT-3 model, with tuning cost only 7% of total pretraining cost. A Pytorch implementation of our technique can be found at github.com/microsoft/mup and installable via `pip install mup`.
研究动机与目标
- 将超参数调优视为极大规模神经网络的主要瓶颈之一。
- 介绍并利用 Maximal Update Parametrization (μP),以在训练过程中实现稳定、对宽度不变的更新。
- 开发并验证一种从小型代理模型到大型目标模型的零-shot 超参数传输技术(μ Transfer)。
- 在 Transformer 和 ResNet 上展示显著的调优加速和性能提升,包括大规模语言模型和视觉模型。
提出的方法
- 为目标模型采用 Maximal Update Parametrization (μP),以确保宽度稳定的更新。
- 对目标模型的较小代理版本进行调优,以识别超参数。
- 将从代理模型调优得到的超参数复制到全规模目标模型(零-shot 转移)。
- 在 Transformer 与 ResNet 架构上对 μ Transfer 进行经验验证,覆盖宽度、深度、批量大小、序列长度和训练时间。
- 提供一个可供实际使用的 μ Transfer 的 PyTorch 实现。
实验结果
研究问题
- RQ1在一个小型 μP 参数化模型上调优的超参数,能否有效传递到一个更大规模的 μP 参数化目标模型?
- RQ2在 μP 下哪些超参数是可传递的,以及跨宽度、深度、批量大小、序列长度和训练时间的传递边界在哪?
- RQ3在标准参数化(SP)下的宽度相关失败是否会在 μP 下消失,从而实现可靠的放缩规则?
- RQ4通过 μ Transfer,在实际任务(如机器翻译、语言模型预训练、图像分类)中可以实现哪些实际的加速和性能提升?
主要发现
- μP 产生稳定、对宽度不敏感的最优学习率,从而实现从小模型到大模型的超参数的有效零-shot 传递。
- 经验结果显示大规模加速:以与预训练单个 BERT-large 相似的调优成本超越已发表的 BERT-large 数据,同时以仅占总预训练成本 7% 的成本超越 GPT-3 规模的结果。
- μ Transfer 在宽度上适用,并在有条件的情况下在深度、批量大小、序列长度和训练时间上对 Transformer 适用,并对 ResNet 也有益处。
- 在 IWSLT14 De-En 与 WMT14 En-De 实验中,从小代理得到的 μ Transfer 以显著更低的计算量实现具有竞争力的 BLEU 分数;使用 SP 的盲目传输失败。
- 在 BERT 预训练实验中,从约 13M 参数的代理进行的 μ Transfer,在相同总调优成本下恢复或超过已发表的基线,表明对非常大模型具有实际可行性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。