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