Memory-Efficient LLM Training by Various-Grained Low-Rank Projection of Gradients
Yezhen Wang, Zhouhao Yang, Brian K Chen, Fanyi Pu, Bo Li, Tianyu Gao, Kenji Kawaguchi
TL;DR
Memory constraints hinder fine-tuning large language models, motivating low-rank gradient projection (LoRP) as a memory-efficient alternative. The paper introduces VLoRP, which adds a Projection Granularity parameter $c$ alongside rank $r$ with memory budget $\mathcal{M}=cr$, and proposes ProjFactor, a memory-efficient optimizer for this framework. Theoretical results establish $G^o$ as an unbiased gradient estimate with variance bounded by $\mathcal{O}((m+c)/\mathcal{M})$, and an $O(1/T)$ convergence rate under SGD, with Hamiltonian-descent guarantees for ProjFactor. Empirically, finer granularity under a fixed budget improves performance and stability across multiple tasks (commonsense, MMLU, GSM8K) with competitive memory usage and throughput, demonstrating practical gains for memory-constrained LLM fine-tuning.
Abstract
Building upon the success of low-rank adapter (LoRA), low-rank gradient projection (LoRP) has emerged as a promising solution for memory-efficient fine-tuning. However, existing LoRP methods typically treat each row of the gradient matrix as the default projection unit, leaving the role of projection granularity underexplored. In this work, we propose a novel framework, VLoRP, that extends low-rank gradient projection by introducing an additional degree of freedom for controlling the trade-off between memory efficiency and performance, beyond the rank hyper-parameter. Through this framework, we systematically explore the impact of projection granularity, demonstrating that finer-grained projections lead to enhanced stability and efficiency even under a fixed memory budget. Regarding the optimization for VLoRP, we present ProjFactor, an adaptive memory-efficient optimizer, that significantly reduces memory requirement while ensuring competitive performance, even in the presence of gradient accumulation. Additionally, we provide a theoretical analysis of VLoRP, demonstrating the descent and convergence of its optimization trajectory under both SGD and ProjFactor. Extensive experiments are conducted to validate our findings, covering tasks such as commonsense reasoning, MMLU, and GSM8K.
