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

Greg Yang, Edward J. Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu +5 more
3/7/2022
349 citations
cs.LGcond-mat.dis-nncs.NE

Official code: microsoft/mup (1,755 stars, Jupyter Notebook, MIT, PyTorch, last commit 2024-07-17).

Abstract

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.

Show full abstract

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`.

View on arXivView PDF

Code Implementations(1)

microsoft/mupOfficial100%
PyTorchMIT

maximal update parametrization (µP)

1,755105Jupyter Notebook, PythonNov 2, 20212 years agoMIT
deep-learningmachine-learningmupmutransferpython+2 more

Similar Papers

Cite this paper

@article{yang2022tensor,
  title  = {Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer},
  author = {Greg Yang and Edward J. Hu and Igor Babuschkin and Szymon Sidor and Xiaodong Liu and David Farhi and Nick Ryder and Jakub Pachocki and Weizhu Chen and Jianfeng Gao},
  year   = {2022},
  eprint = {2203.03466},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.03466}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.03466.svg)](https://codeofpaper.com/paper/2203.03466)

Discussion