Introduction
Training Large Language Models (LLMs) with hundreds of billions of parameters is increasingly constrained by GPU memory limits. Activations—intermediate data generated during the forward pass—can consume up to 76% of total memory, often exceeding the space required for model weights. Existing solutions typically rely on two mutually exclusive strategies: activation recomputation (checkpointing) and data compression (quantization).
Activation recomputation saves memory by discarding activations and recalculating them during the backward pass, but it introduces significant computational overhead, often exceeding 28% of training time. Conversely, data compression reduces activation size (e.g., from 16-bit to 4-bit) to save memory and time, but it frequently compromises model accuracy due to the presence of high-magnitude "outliers."
The Adacc Framework
Adacc (Adaptive Compression and Recomputation) is a unified framework designed to overcome these limitations by making fine-grained, tensor-level decisions. It treats the selection of training strategies as a mathematical optimization problem rather than a static configuration.
The framework consists of three primary components:
- Outlier-Separated Compression: Adacc employs a Z-Score method to identify and extract activation outliers, which are stored in high precision. The remaining values are compressed to 4-bit. This approach avoids expensive tensor transpositions, maintaining high throughput.
- MILP-based Scheduling: Adacc models the choice between recomputation, compression, and retention as a Mixed-Integer Linear Programming (MILP) problem. It optimizes the strategy for every tensor within a Transformer block to maximize speed while staying within memory constraints.
- Adaptive Policy Evolution: Recognizing that activation patterns shift during training, Adacc uses an Exponential Backoff algorithm to periodically monitor tensor metrics and update its optimization policy, ensuring efficiency throughout the training lifecycle.
Key Insights: Exploiting Heterogeneity
A fundamental insight driving Adacc is the inherent heterogeneity of model layers. Profiling reveals that some layers are "compute-intensive"—expensive to recalculate but relatively small—making them ideal candidates for compression or storage. Others are "memory-intensive"—large in size but cheap to recompute.
By exploiting this diversity, Adacc achieves a superior trade-off compared to uniform strategies. Furthermore, because LLMs are composed of repeated Transformer blocks, the MILP solver only needs to optimize a single block, reducing search time to under 0.5 seconds.
Experimental Evaluation
The authors evaluated Adacc using GPT-like models (117M to 4.7B parameters) trained on "The Pile" dataset. Performance was validated across downstream benchmarks including Lambada, Arc-e, Sciq, and Swag.
- Throughput and Memory: Adacc improved training throughput by 1.01× to 1.37× and enabled batch sizes up to 7.62× larger than unoptimized baselines like Megatron-LM.
- Accuracy Preservation: Adacc maintained accuracy within 0.5% of FP16 baselines, significantly outperforming standard quantization methods which saw up to 39% accuracy degradation in some tests.
- Efficiency: The framework's overhead is negligible; the MILP solver finds the optimal training strategy in less than half a second.
Conclusion and Future Work
Adacc demonstrates that unifying compression and recomputation through an adaptive, optimization-driven framework can effectively break the "memory wall" in LLM training. While currently optimized for standard Transformer layers on NVIDIA V100 GPUs, future work includes extending support to exotic architectures and deeper compiler-level integration to further enhance performance.
Summary updated