Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer

NeurIPS 2021 |

Publication

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 (\(μ\)P), many optimal HPs remain stable even as model size changes. This leads to a new HP tuning paradigm we call *\(μ\)Transfer*: parametrize the target model in \(μ\)P, 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 \(μ\)Transfer 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 (opens in new tab) and installable via pip install mup.

Publication Downloads

Maximal Update Parametrization (μP)

March 8, 2022

Maximal Update Parametrization (μP) and Hyperparameter Transfer (μTransfer), in association with the paper: Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer