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

面向内存高效训练的低秩动量分解

Low-rank Momentum Factorization for Memory Efficient Training

Department of Computer Science and Engineering(计算机科学与工程系);The Pennsylvania State University(宾夕法尼亚州立大学)

Pouria Mahdavinia, Mehrdad Mahdavi

AI总结:

提出MoFaSGD方法,通过动态维护一阶动量的低秩SVD表示实现内存高效微调,在理论上保证最优收敛速率,并在大模型对齐基准上实现了内存与性能的优异权衡。

摘要:

微调大型基础模型带来了巨大的内存挑战,这归因于像AdamW这样有状态的优化器,其所需的GPU内存通常是推理的数倍。尽管存在参数高效微调(如LoRA)和优化器状态压缩等内存高效方法,但最近像GaLore这样的方法通过使用低秩梯度投影和子空间动量积累将两者联系起来。然而,此类方法可能会在固定子空间或计算成本高昂的离线重采样(例如,需要全矩阵SVD)上遇到困难。我们提出了动量分解SGD(MoFaSGD),它维护着一阶动量的动态更新低秩SVD表示,在整个训练过程中紧密近似其全秩对应物。这种分解实现了一种内存高效的微调方法,能够在每次迭代中自适应地更新优化子空间。关键的是,MoFaSGD利用计算出的低秩动量因子来执行高效的谱归一化更新,为子空间动量积累提供了替代方案。我们为MoFaSGD建立了理论收敛保证,证明其在标准假设下实现了非凸随机优化的最优收敛速率。在实验上,我们在大语言模型对齐基准上证明了MoFaSGD的有效性,与最先进的低秩优化方法相比,在内存减少(与LoRA相当)和性能之间实现了具有竞争力的权衡。我们的实现可在https://github.com/pmahdavi/MoFaSGD获取。

英文摘要:

Fine-tuning large foundation models presents significant memory challenges due to stateful optimizers like AdamW, often requiring several times more GPU memory than inference. While memory-efficient methods like parameter-efficient fine-tuning (e.g., LoRA) and optimizer state compression exist, recent approaches like GaLore bridge these by using low-rank gradient projections and subspace moment accumulation. However, such methods may struggle with fixed subspaces or computationally costly offline resampling (e.g., requiring full-matrix SVDs). We propose Momentum Factorized SGD (MoFaSGD), which maintains a dynamically updated low-rank SVD representation of the first-order momentum, closely approximating its full-rank counterpart throughout training. This factorization enables a memory-efficient fine-tuning method that adaptively updates the optimization subspace at each iteration. Crucially, MoFaSGD leverages the computed low-rank momentum factors to perform efficient spectrally normalized updates, offering an alternative to subspace moment accumulation. We establish theoretical convergence guarantees for MoFaSGD, proving it achieves an optimal rate for non-convex stochastic optimization under standard assumptions. Empirically, we demonstrate MoFaSGD's effectiveness on large language model alignment benchmarks, achieving a competitive trade-off between memory reduction (comparable to LoRA) and performance compared to state-of-the-art low-rank optimization methods. Our implementation is available at https://github.com/pmahdavi/MoFaSGD.

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

↑