通过低秩压缩激活值,实现高效微调并减少80%内存占用。
Memory-Efficient Fine-Tuning via Low-Rank Activation Compression
- 利用低秩激活压缩,在前向传播中在线压缩中间数据。
- 相比LoRA,激活内存降低约80%,性能保持相当。
- 无需校准数据,适合资源受限场景的模型微调。
参数高效的微调范式随着基础模型的发展受到广泛关注。尽管已有多种方法减少了可训练参数数量,但其显著的内存开销仍是实际部署的关键瓶颈。本文观察到,在大批次和长上下文长度下,模型激活值是主要的内存消耗来源,但其秩始终较低。受此启发,我们提出一种内存高效的微调方法——低秩激活压缩(LoRAct)。与以往工作不同,LoRAct 提供了一种更灵活、通用的压缩策略,可在前向传播中在线应用,无需任何校准数据。此外,LoRAct 引入一种基于采样的正交分解算法,专为低秩矩阵设计,相比广泛使用的RSVD具有更高的计算效率和更紧的误差界。在视觉与语言任务上的实验表明,该方法有效。值得注意的是,与广泛应用的LoRA相比,LoRAct将激活内存进一步降低了约80%,同时保持了竞争力的性能。源代码已公开于 https://github.com/shijxcs/meft。
原文摘要 · Abstract (English)
The parameter-efficient fine-tuning paradigm has garnered significant attention with the advancement of foundation models. Although numerous methods have been proposed to reduce the number of trainable parameters, their substantial memory overhead remains a critical bottleneck that hinders practical deployment. In this paper, we observe that model activations constitute a major source of memory consumption, especially under large batch sizes and long context lengths; however, the rank of the activations remains consistently low. Motivated by this insight, we propose a memory-efficient fine-tuning approach Low-Rank Activation Compression (LoRAct). Unlike prior work, LoRAct provides a more flexible and versatile compressing strategy that can be applied online during the forward pass without the need for any calibration data. Moreover, LoRAct incorporates a novel sampling-based orthogonal decomposition algorithm specifically designed for low-rank matrices, offering improved computational efficiency and a tighter error bound compared to the widely used RSVD. Experiments on both vision and language tasks demonstrate the effectiveness of LoRAct. Notably, LoRAct further reduces activation memory by approximately 80% in comparison with the widely adopted LoRA method, while maintaining competitive performance. The source code is available at https://github.com/shijxcs/meft.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。