OLLA: Optimizing the Lifetime and Location of Arrays to Reduce the Memory Usage of Neural Networks

Benoit Steiner, Mostafa Elhoushi, Jacob Kahn, James Hegarty
10/24/2022
cs.LG

Official code: facebookresearch/MODel_opt (121 stars, Python, MIT, last commit 2024-03-13).

Abstract

The size of deep neural networks has grown exponentially in recent years. Unfortunately, hardware devices have not kept pace with the rapidly increasing memory requirements.

Show full abstract

To cope with this, researchers have turned to techniques such as spilling and recomputation, which increase training time, or reduced precision and model pruning, which can affect model accuracy. We present OLLA, an algorithm that optimizes the lifetime and memory location of the tensors used to train neural networks. Our method reduces the memory usage of existing neural networks, without needing any modification to the models or their training procedures. We formulate the problem as a joint integer linear program (ILP). We present several techniques to simplify the encoding of the problem, and enable our approach to scale to the size of state-of-the-art neural networks using an off-the-shelf ILP solver. We experimentally demonstrate that OLLA only takes minutes if not seconds to allow the training of neural networks using one-third less memory on average.

View on arXivView PDF

Code Implementations(1)

MIT

Memory Optimizations for Deep Learning (ICML 2023)

12116Python, Jupyter NotebookOct 24, 20222 years agoMIT

Similar Papers

Cite this paper

@article{steiner2022olla,
  title  = {OLLA: Optimizing the Lifetime and Location of Arrays to Reduce the Memory Usage of Neural Networks},
  author = {Benoit Steiner and Mostafa Elhoushi and Jacob Kahn and James Hegarty},
  year   = {2022},
  eprint = {2210.12924},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.12924}
}

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

Discussion