Skip to main content
QUICK REVIEW

[Paper Review] Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer

Greg Yang, J. Edward Hu|arXiv (Cornell University)|Mar 7, 2022
Parallel Computing and Optimization TechniquesComputer Science22 citations
TL;DR

The paper proposes Mu Transfer, using Maximal Update Parametrization (μP) to transfer hyperparameters from a small proxy model to a much larger target model with zero-shot tuning, achieving large-speedup and competitive performance.

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

Motivation & Objective

  • Motivate hyperparameter tuning as a major bottleneck for very large neural networks.
  • Introduce and exploit the Maximal Update Parametrization (μP) to enable stable, width-invariant updates during training.
  • Develop and validate a zero-shot hyperparameter transfer technique (μ Transfer) from small proxy models to large target models.
  • Demonstrate substantial tuning speedups and performance gains on Transformers and ResNet, including large-scale language models and vision models.

Proposed method

  • Adopt the Maximal Update Parametrization (μP) for target models to ensure width-stable updates.
  • Tune a smaller proxy version of the target model to identify hyperparameters.
  • Copy the tuned hyperparameters from the proxy to the full-scale target model (zero-shot transfer).
  • Empirically verify μ Transfer on Transformer and ResNet architectures across width, depth, batch size, sequence length, and training time.
  • Provide a PyTorch implementation of μ Transfer for practical use.

Experimental results

Research questions

  • RQ1Can hyperparameters tuned on a small μP-parametrized model transfer effectively to a much larger μP-parametrized target model?
  • RQ2Which hyperparameters are transferable under μP, and what are the limits of transfer across width, depth, batch size, sequence length, and training time?
  • RQ3Do width-dependent failures under standard parametrization (SP) disappear under μP, enabling reliable scaling rules?
  • RQ4What practical speedups and performance gains can be achieved in real-world tasks (e.g., machine translation, language model pretraining, image classification) by μ Transfer?

Key findings

  • μP yields stable, width-insensitive optimal learning rates, enabling effective zero-shot transfer of HPs from small to large models.
  • Empirical results show large-scale speedups: outperforming published BERT-large numbers with tuning cost similar to pretraining a single BERT-large, and outperforming GPT-3-scale results with only 7% of total pretraining cost.
  • μ Transfer works across width and, with caveats, across depth, batch size, sequence length, and training time for Transformers, and shows benefits for ResNet as well.
  • Across IWSLT14 De-En and WMT14 En-De experiments, μ Transfer from small proxies achieves competitive BLEU scores with substantially lower compute compared to conventional tuning; naive transfer with SP fails.
  • In BERT pretraining experiments, μ Transfer from a ~13M parameter proxy recovers or exceeds published baselines at the same overall tuning cost, demonstrating practical feasibility for very large models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.