mental2008 / awesome-papers

Here are my personal paper reading notes (including cloud computing, resource management, systems, machine learning, deep learning, and other interesting stuffs).
https://paper.lingyunyang.com/
MIT License
38 stars 2 forks source link

arXiv '16 | Training Deep Nets with Sublinear Memory Cost #68

Closed mental2008 closed 2 years ago

mental2008 commented 2 years ago

URL: https://arxiv.org/abs/1604.06174

Authors: Tianqi Chen, Bing Xu, Chiyuan Zhang, Carlos Guestrin Unveristy of Washington, Dato. Inc, Massachusetts Institute of Technology

Code (memonger - memory monger)

mental2008 commented 2 years ago

Problem

How to reduce the memory consumption of DNN training (to enable bigger models or larger batch size)?

Solution

  1. Mainly focus on reducing the memory cost to store intermediate results (feature maps) and gradients.
  2. Design an algorithm to trade computation for memory. O(√n) memory cost with one extra forward computation per mini-batch.
    • Inplace operation: directly store the output values to memory of a input value.
    • Memory sharing: memory used by intermediate results that are no longer needed can be recycled and used in another node.
    • Re-computation: drop the results of low cost operations and re-compute the dropped intermediate results.

Guidelines for DL frameworks

  1. Enable option to drop result of low cost operations.
  2. Provide planning algorithms to give efficient memory plan.
  3. Enable user to set the mirror attribute (how many times a result can be recomputed) in the computation graph for memory optimization.