Abstract
Training Large Language Models (LLMs) is constrained by the "memory wall," where optimizer states and gradients often exceed the capacity of consumer-grade hardware. We present VLoRP (Various-Grained Low-Rank Projection), a framework that introduces "projection granularity" as a novel dimension for memory efficiency. By reshaping gradient matrices before low-rank projection, VLoRP demonstrates that finer-grained projections achieve superior performance over traditional high-rank methods under identical memory constraints. Coupled with the ProjFactor optimizer, which utilizes rank-1 decomposition for second-moment states, our approach significantly reduces memory overhead below standard LoRA and Adam while maintaining high training throughput and performance.
Introduction: Overcoming the Memory Wall
The primary bottleneck in scaling LLM training is the massive memory footprint required for parameters, gradients, and optimizer states. For a 7B parameter model, standard Adam optimization can require over 60 GB of VRAM, making it inaccessible for many researchers. While Parameter-Efficient Fine-Tuning (PeFT) and Low-Rank Gradient Projection (LoRP) methods like GaLore have made strides, they often treat gradient rows as fixed units. VLoRP challenges this by investigating the impact of projection granularity—the "shape" of the matrix before it enters the low-rank subspace.
Methodology: VLoRP and ProjFactor
The VLoRP framework introduces two core innovations to optimize memory and performance.
1. Various-Grained Low-Rank Projection (VLoRP)
VLoRP introduces a granularity factor ($c$) to the projection process. Instead of projecting the gradient matrix $G$ directly, it is reshaped into $\tilde{G}$, increasing the row count while decreasing columns. This allows for a flexible trade-off: under a fixed memory budget $M$, one can choose a high rank $r$ with coarse granularity ($c=1$) or a minimal rank $r=1$ with fine granularity ($c=M$).
2. The ProjFactor Optimizer
To further reduce memory, the authors developed ProjFactor. While updating in the "Original Space" (OS) is more effective than the "Subspace" (SS), it typically requires full-rank optimizer states. ProjFactor applies a rank-1 decomposition to the second-moment states of projected gradients, enabling high-performance OS updates with minimal memory footprint.
Experimental Setup
The framework was evaluated using LLaMA2-7B, GPT2-XL, and LLaMA3.2-3B across several benchmarks:
- Commonsense Reasoning: 8 tasks including BoolQ, HellaSwag, and ARC.
- MMLU: Multi-subject language understanding.
- GSM8K: Grade school math word problems.
Key Insights
- Granularity vs. Rank: A pivotal finding is that finer granularity (larger $c$) consistently outperforms larger rank ($r$) for a given memory budget. For instance, $r=1$ with $c=256$ frequently surpasses $r=256$ with $c=1$.
- Numerical Stability: Finer granularity reduces the number of operations per dot product, mitigating numerical error accumulation in low-precision (bfloat16) training.
- Original Space Advantage: Parameter updates in the original space (OS) track vanilla Adam's performance more closely than subspace (SS) updates.
Results: Performance and Efficiency
VLoRP achieves state-of-the-art results with significantly lower resource requirements. On Commonsense Reasoning benchmarks, VLoRP ($c=256, r=1$) reached an average score of 61.40, exceeding LoRA (60.51) and GaLore (60.28).
In terms of memory, VLoRP + ProjFactor reduces the footprint for LLaMA2-7B to 24.13 GB, compared to 67.46 GB for Adam and 28.80 GB for LoRA. Furthermore, VLoRP maintains high throughput by avoiding the periodic SVD bottlenecks found in methods like GaLore.
Conclusion and Future Work
VLoRP demonstrates that projection granularity is a powerful lever for memory-efficient LLM training. While currently focused on fine-tuning, the theoretical foundations suggest VLoRP is a strong candidate for full-scale pre-training. Future research will explore optimal granularity settings for diverse architectures and non-power-of-two configurations.
Summary updated