Mesa: A Memory-saving Training Framework for Transformers
Not on the map. Why?
Abstract (arXiv)
There has been an explosion of interest in designing high-performance Transformers. While Transformers have delivered significant performance improvements, training such networks is extremely memory intensive owing to storing all intermediate activations that are needed for gradient computation during backpropagation, especially for long sequences. To this end, we present Mesa, a memory-saving training framework for Transformers. Specifically, Mesa uses exact activations during forward pass while storing a low-precision version of activations to reduce memory consumption during training. The low-precision activations are then dequantized during back-propagation to compute gradients. Besides, to address the heterogeneous activation distributions in the multi-head self-attention layers, we propose a head-wise activation quantization strategy, which quantizes activations based on the statistics of each head to minimize the approximation error. To further boost training efficiency, we learn quantization parameters by running estimates. More importantly, by re-investing the saved memory in employing a larger batch size or scaling up model size, we may further improve the performance under constrained computational resources. Extensive experiments on ImageNet, CIFAR-100 and ADE20K demonstrate that Mesa can achieve flexible memory-savings (up to 50%) during training while achieving comparable or even better performance. Code is available at https://github.com/ziplab/Mesa.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 43 of its 54 references that are in the map. First posted on arXiv 22 Nov 2021.
Builds on
43 of 54 references.
References · 43
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2020End-to-End Object Detection with Transformerscited by 7,384
- 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
- 2016Layer Normalizationcited by 5,579
31 more
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2016Gaussian Error Linear Units (GELUs)cited by 3,431
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
- 2017Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inferencecited by 1,548
- 2020Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformerscited by 1,368
- 2017Mixed Precision Trainingcited by 1,135
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
- 2016Semantic Understanding of Scenes through the ADE20K Datasetcited by 1,063
- 2016XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networkscited by 829
- 2016Training Deep Nets with Sublinear Memory Costcited by 825
- 2019Panoptic Feature Pyramid Networkscited by 644
- 2019Learned Step Size Quantizationcited by 604
- 2015BinaryConnect: Training Deep Neural Networks with binary weights during propagationscited by 571
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2018PACT: Parameterized Clipping Activation for Quantized Neural Networkscited by 456
- 2018HAQ: Hardware-Aware Automated Quantization with Mixed Precisioncited by 426
- 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
- 2019Data-Free Quantization Through Weight Equalization and Bias Correctioncited by 328
- 2019On the Relationship between Self-Attention and Convolutional Layerscited by 299
- 2019Q8BERT: Quantized 8Bit BERTcited by 296
- 2017TernGrad: Ternary Gradients to Reduce Communication in Distributed Deep Learningcited by 253
- 2019Parameter Efficient Training of Deep Convolutional Neural Networks by Dynamic Sparse Reparameterizationcited by 187
- 2021AutoFormer: Searching Transformers for Visual Recognitioncited by 186
- 2020LSQ+: Improving low-bit quantization through learnable offsets and better initializationcited by 180
- 2020BinaryBERT: Pushing the Limit of BERT Quantizationcited by 175
- 2018Learning to Quantize Deep Networks by Optimizing Quantization Intervals with Task Losscited by 157
- 2020TernaryBERT: Distillation-aware Ultra-low Bit BERTcited by 145
- 2021ActNN: Reducing Training Memory Footprint via 2-Bit Activation Compressed Trainingcited by 61
- 2021GLiT: Neural Architecture Search for Global and Local Image Transformercited by 53
- 2019Backprop with Approximate Activations for Memory-efficient Network Trainingcited by 19
Built on by
Citing papers per year: 2022: 3; 2023: 5; 2024: 4; 2025: 3; 2026: 1.
16 papers.
Sort:
By area:
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Modelscited by 84
- 2023A Survey on Efficient Training of Transformerscited by 37
- 2022GACT: Activation Compressed Training for Generic Network Architecturescited by 31
- 2023TinyTrain: Resource-Aware Task-Adaptive Sparse Training of DNNs at the Data-Scarce Edgecited by 18
- 2024CompAct: Compressed Activations for Memory-Efficient LLM Trainingcited by 15
- 2023LifeLearner: Hardware-Aware Meta Continual Learning System for Embedded Computing Platformscited by 11
- 2022DropIT: Dropping Intermediate Tensors for Memory-Efficient DNN Trainingcited by 9
- 2024Reducing Fine-Tuning Memory Overhead by Approximate and Memory-Sharing Backpropagationcited by 5
- 2022DIVISION: Memory Efficient Training via Dual Activation Precisioncited by 4
- 2024Block Selective Reprogramming for On-device Training of Vision Transformerscited by 4
- 2025QKV Projections Require a Fraction of Their Memorycited by 2
4 more
- 2025Tin-Tin: Towards Tiny Learning on Tiny Devices with Integer-based Neural Network Trainingcited by 1
- 2023An Evaluation of Memory Optimization Methods for Training Neural Networkscited by 0
- 2025Memory Constrained Dynamic Subnetwork Update for Transfer Learningcited by 0
- 2026Are Candidate Models Really Needed for Active Learning?cited by 0
- 2026Are Candidate Models Really Needed for Active Learning?14 May 2026
- 2025Memory Constrained Dynamic Subnetwork Update for Transfer Learning23 Oct 2025
- 2025QKV Projections Require a Fraction of Their Memory3 Jun 2025
- 2025Tin-Tin: Towards Tiny Learning on Tiny Devices with Integer-based Neural Network Training13 Apr 2025
- 2024CompAct: Compressed Activations for Memory-Efficient LLM Training20 Oct 2024
- 2024Reducing Fine-Tuning Memory Overhead by Approximate and Memory-Sharing Backpropagation24 Jun 2024
- 2024Block Selective Reprogramming for On-device Training of Vision Transformers25 Mar 2024
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Models16 Jan 2024
- 2023Efficient Large Language Models: A Survey6 Dec 2023
- 2023LifeLearner: Hardware-Aware Meta Continual Learning System for Embedded Computing Platforms19 Nov 2023
- 2023TinyTrain: Resource-Aware Task-Adaptive Sparse Training of DNNs at the Data-Scarce Edge19 Jul 2023
- 2023An Evaluation of Memory Optimization Methods for Training Neural Networks26 Mar 2023
4 more
- 2023A Survey on Efficient Training of Transformers2 Feb 2023
- 2022DIVISION: Memory Efficient Training via Dual Activation Precision5 Aug 2022
- 2022GACT: Activation Compressed Training for Generic Network Architectures22 Jun 2022
- 2022DropIT: Dropping Intermediate Tensors for Memory-Efficient DNN Training28 Feb 2022
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Modelscited by 84
- 2023A Survey on Efficient Training of Transformerscited by 37
- 2022GACT: Activation Compressed Training for Generic Network Architecturescited by 31
- 2023TinyTrain: Resource-Aware Task-Adaptive Sparse Training of DNNs at the Data-Scarce Edgecited by 18
- 2024CompAct: Compressed Activations for Memory-Efficient LLM Trainingcited by 15
- 2023LifeLearner: Hardware-Aware Meta Continual Learning System for Embedded Computing Platformscited by 11
- 2022DropIT: Dropping Intermediate Tensors for Memory-Efficient DNN Trainingcited by 9
- 2024Reducing Fine-Tuning Memory Overhead by Approximate and Memory-Sharing Backpropagationcited by 5
- 2022DIVISION: Memory Efficient Training via Dual Activation Precisioncited by 4
- 2025QKV Projections Require a Fraction of Their Memorycited by 2
- 2025Tin-Tin: Towards Tiny Learning on Tiny Devices with Integer-based Neural Network Trainingcited by 1
12 most cited of 15 All 15 (JSON)
- 2026Are Candidate Models Really Needed for Active Learning?14 May 2026
- 2025Memory Constrained Dynamic Subnetwork Update for Transfer Learning23 Oct 2025
- 2025QKV Projections Require a Fraction of Their Memory3 Jun 2025
- 2025Tin-Tin: Towards Tiny Learning on Tiny Devices with Integer-based Neural Network Training13 Apr 2025
- 2024CompAct: Compressed Activations for Memory-Efficient LLM Training20 Oct 2024
- 2024Reducing Fine-Tuning Memory Overhead by Approximate and Memory-Sharing Backpropagation24 Jun 2024
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Models16 Jan 2024
- 2023Efficient Large Language Models: A Survey6 Dec 2023
- 2023LifeLearner: Hardware-Aware Meta Continual Learning System for Embedded Computing Platforms19 Nov 2023
- 2023TinyTrain: Resource-Aware Task-Adaptive Sparse Training of DNNs at the Data-Scarce Edge19 Jul 2023
- 2023An Evaluation of Memory Optimization Methods for Training Neural Networks26 Mar 2023
- 2023A Survey on Efficient Training of Transformers2 Feb 2023
12 newest of 15 All 15 (JSON)