An Efficient 2D Method for Training Super-Large Deep Learning Models

Qifan Xu, Shenggui Li, Chaoyu Gong, Yang You
4/12/2021
cs.LGcs.DC

Official code: xuqifan897/Optimus (28 stars, Python, last commit 2021-07-11).

Abstract

Huge neural network models have shown unprecedented performance in real-world applications. However, due to memory constraints, model parallelism must be utilized to host large models that would otherwise not fit into the memory of a single device.

Show full abstract

Previous methods like Megatron partition the parameters of the entire model among multiple devices, while each device has to accommodate the redundant activations in forward and backward pass. In this work, we propose Optimus, a highly efficient and scalable 2D-partition paradigm of model parallelism that would facilitate the training of infinitely large language models. In Optimus, activations are partitioned and distributed among devices, further reducing redundancy. In terms of isoefficiency, Optimus significantly outperforms Megatron. On 64 GPUs of TACC Frontera, Optimus achieves 1.48X speedup for training, 1.78X speedup for inference, and 8X increase in maximum batch size over Megatron. Optimus surpasses Megatron in scaling efficiency by a great margin. The code is available at https://github.com/xuqifan897/Optimus.

View on arXivView PDF

Code Implementations(1)

xuqifan897/OptimusOfficial100%
280Python, C++Mar 27, 20215 years ago

Similar Papers

Cite this paper

@article{xu2021efficient,
  title  = {An Efficient 2D Method for Training Super-Large Deep Learning Models},
  author = {Qifan Xu and Shenggui Li and Chaoyu Gong and Yang You},
  year   = {2021},
  eprint = {2104.05343},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.05343}
}

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/2104.05343.svg)](https://codeofpaper.com/paper/2104.05343)

Discussion