arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.01255cs.LG
收藏

LLMs中的激活压缩:理论分析与高效算法

Activation Compression in LLMs: Theoretical Analysis and Efficient Algorithm

Nanjing University(南京大学);Tsinghua University(清华大学);Huazhong University of Science and Technology(华中科技大学);Hong Kong University of Science and Technology(香港科学大学)

Wen-Da Wei, Han-Bin Fang, Yang-Di Liu, Jiang-Xin Shi, James Kwok, Yu-Feng Li

AI总结:

本文提出一种激活-梯度联合压缩方法,通过低秩因子压缩线性层梯度,无需额外计算,提升LLM训练效率与压缩性能。

摘要:

训练大型语言模型(LLMs)极具内存需求,因为训练必须存储权重、优化器状态和反向传播的中间激活。现有内存高效方法主要关注梯度和优化器状态,而激活压缩因缺乏针对LLM的理论和保证而发展不足。本文提出一个理论框架,证明在线性算子中,无偏的激活压缩是安全的,但在非线性算子中存在问题。我们进一步推导梯度方差界,并在标准L-光滑性假设下建立应用激活压缩到所有线性算子的收敛保证,显示其不改变收敛速度。受理论指导,我们提出激活-梯度联合压缩方法,利用低秩激活因子压缩线性层梯度,无需额外计算或额外梯度误差。我们在Qwen和LLaMA模型上进行广泛实验,使用预训练基准和多个微调基准验证理论,并展示方法在准确性和压缩效率上的竞争力。我们提供补充材料中的代码以确保可重复性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑