提出可安全压缩大模型激活值的理论与高效算法,兼顾精度与内存效率。
Activation Compression in LLMs: Theoretical Analysis and Efficient Algorithm

- 基于无偏压缩理论,证明线性层激活可安全压缩
- 新方法在不增加计算量前提下实现激活与梯度联合压缩
- 实测在Qwen和LLaMA上保持高精度且压缩率显著提升
训练大语言模型(LLMs)极为消耗内存,需存储权重、优化器状态及反向传播所需的中间激活值。现有内存优化方法多聚焦于梯度与优化器状态,而激活值压缩因缺乏针对LLM的理论支撑而进展缓慢。本文构建理论框架,表明当压缩无偏时,线性操作符上的激活压缩是安全的,但非线性操作符存在风险。进一步推导出梯度方差界,在标准L-光滑性假设下,为所有线性操作符应用激活压缩建立了收敛性保证,且不影响收敛速率。基于此理论,提出激活-梯度协同压缩方法,利用低秩激活因子复用以压缩线性层梯度,无需额外计算或引入额外梯度误差。在Qwen与LLaMA模型上,通过预训练与多个微调基准的广泛实验验证了理论正确性,并展示了方法在精度与压缩效率上的竞争力。代码已附于补充材料以供复现。
原文摘要 · Abstract (English)
Training large language models (LLMs) is highly memory-intensive, as training must store not only weights and optimizer states but also intermediate activations for backpropagation. While existing memory-efficient methods largely focus on gradients and optimizer states, activation compression is less well established due to the lack of LLM-tailored theory and guarantees. In this work, we develop a theoretical framework showing that activation compression is safe for linear operators when activation compression is unbiased, but problematic for nonlinear ones. We further derive gradient variance bound and establish convergence guarantees for applying activation compression to all linear operators under the standard $L$-smoothness assumption, showing that it does not change the convergence rate. Guided by the theory, we propose an activation-gradient co-compression method that reuses low-rank activation factors to compress linear-layer gradients without extra computation or additional gradient error. We conduct extensive experiments on Qwen and LLaMA models using a pretraining benchmark and multiple fine-tuning benchmarks to validate our theory and demonstrate competitive performance of our method in both accuracy and compression efficiency. We provide our code in the supplementary material for reproducibility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。