Coder Social home page Coder Social logo

mostafaelhoushi / olla Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookresearch/model_opt

0.0 0.0 0.0 230 KB

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

License: MIT License

Python 99.57% Shell 0.43%

olla's Introduction

OLLA

CircleCI

OLLA (Optimizing the Lifetime and Location of Arrays) enables training larger deep neural networks on existing hardware. It accomplishes this with a few techniques:

  • Operator order optimization โ€” reodering tensor operators to reduce peak memory usage
  • Fragmentation reduction โ€” dynamic memory profiling and scheduling to better-utilize memory.

Our approach is described in detail on the OLLA arXiv paper. See citing below to attribute the work.

Quickstart

Installing OLLA in your Python environment is simple:

git clone https://github.com/facebookresearch/olla
pip install . [--extra-index-url <url>]

Note:

  • The above install will attempt to install torch, torchaudio, torchvision, and torchtext based on default distributions. To install for your CUDA version/OS, see the PyTorch Getting Started documentation, appending the --extra-index-url flag and value to the above install command as needed.
  • OLLA is tested with Gurobi 9.1.1; use your own license or version as needed.

Benchmarks

To run benchmarks:

python benchmarks.py

Running Tests

Run all unit tests with:

python -m unittest discover -s tests --pattern "*_test.py"

Run unit tests that are skipped with by setting RUN_SKIPPED=1 in the environment before the command.

Citation

If you use OLLA, please use the below BibTex for citing:

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

olla's People

Contributors

benoitsteiner avatar carolejeanwu avatar facebook-github-bot avatar jacobkahn avatar mostafaelhoushi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.