mlsanityData to 7 Oct 2026

Lowering PyTorch's Memory Consumption for Selective Differentiation

arXiv 2404.12406 ↗First posted 15 Apr 2024cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Memory is a limiting resource for many deep learning tasks. Beside the neural network weights, one main memory consumer is the computation graph built up by automatic differentiation (AD) for backpropagation. We observe that PyTorch's current AD implementation neglects information about parameter differentiability when storing the computation graph. This information is useful though to reduce memory whenever gradients are requested for a parameter subset, as is the case in many modern fine-tuning tasks. Specifically, inputs to layers that act linearly in their parameters (dense, convolution, or normalization layers) can be discarded whenever the parameters are marked as non-differentiable. We provide a drop-in, differentiability-agnostic implementation of such layers and demonstrate its ability to reduce memory without affecting run time.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 30 of its 46 references that are in the map. First posted on arXiv 15 Apr 2024.

Builds on

30 of 46 references.

References · 30

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  5. 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
  6. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  7. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  8. 2015Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networkscited by 9,617
  9. 2023Visual Instruction Tuningcited by 7,792
  10. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  11. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
  12. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
18 more
  1. 2014Fully Convolutional Networks for Semantic Segmentationcited by 4,845
  2. 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,773
  3. 2016Aggregated Residual Transformations for Deep Neural Networkscited by 2,540
  4. 2017Rethinking Atrous Convolution for Semantic Image Segmentationcited by 2,154
  5. 2019Searching for MobileNetV3cited by 1,984
  6. 2018Group Normalizationcited by 1,514
  7. 2021EfficientNetV2: Smaller Models and Faster Trainingcited by 1,127
  8. 2016Training Deep Nets with Sublinear Memory Costcited by 825
  9. 2022PaLI: A Jointly-Scaled Multilingual Language-Image Modelcited by 762
  10. 2016Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activationscited by 413
  11. 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 339
  12. 2022Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruningcited by 317
  13. 2022Surgical Fine-Tuning Improves Adaptation to Distribution Shiftscited by 205
  14. 2020The Computational Limits of Deep Learningcited by 188
  15. 2017Training Quantized Nets: A Deeper Understandingcited by 74
  16. 2023Tuning LayerNorm in Attention: Towards Efficient Multi-Modal LLM Finetuningcited by 63
  17. 2021ActNN: Reducing Training Memory Footprint via 2-Bit Activation Compressed Trainingcited by 61
  18. 2020Randomized Automatic Differentiationcited by 23

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 1.

2 papers.