Abstract
Despite large neural networks demonstrating remarkable abilities to complete different tasks, they require excessive memory usage to store the optimization states for training. To alleviate this, the low-rank adaptation (LoRA) is proposed to reduce the optimization states by training fewer parameters. However, LoRA restricts overall weight update matrices to be low-rank, limiting the model performance. In this work, we investigate the dynamics of LoRA and identify that it can be approximated by a random projection. Based on this observation, we propose Flora, which is able to achieve high-rank updates by resampling the projection matrices while enjoying the sublinear space complexity of optimization states. We conduct experiments across different tasks and model architectures to verify the effectiveness of our approach.
Introduction
Training modern large-scale neural networks presents a significant "memory nightmare." Standard optimizers like Adam require storing first- and second-moment estimates for every parameter, often tripling the memory footprint. For a model like GPT-3 (175B parameters), these optimizer states alone can consume 1.4TB of VRAM.
To mitigate this, researchers frequently employ Low-Rank Adaptation (LoRA), which restricts weight updates to a low-rank space. While LoRA is exceptionally memory-efficient, it imposes a "low-rank tax": because updates are constrained to a tiny subspace, the model's expressive power is limited, often resulting in lower performance compared to full-parameter fine-tuning. This paper introduces FLORA (from LoRA to high-rank updates), a method that retains the memory benefits of LoRA while enabling high-rank updates.
LoRA as Gradient Compression
The authors begin by mathematically dissecting LoRA's dynamics, proving that a LoRA update is dominated by a random projection. Essentially, LoRA acts as a mechanism that compresses the gradient into a lower-dimensional space and then decompresses it back.
This insight reveals that LoRA’s success is not merely about having "fewer parameters," but rather its unintended role as a gradient compressor. However, because standard LoRA keeps its projection matrices fixed, it remains trapped in a low-rank subspace throughout the entire training process.
The FLORA Method: High-Rank Updates via Resampling
FLORA overcomes the limitations of LoRA by treating the projection as a temporary compression tool rather than a permanent constraint. The key innovation is resampling. Unlike LoRA, FLORA periodically changes the random projection matrix during training.
The FLORA Workflow:
- Compression: High-dimensional gradients are projected into a low-dimensional buffer, reducing space complexity from $O(nm)$ to $O(nr)$.
- Resampling: The random projection matrix is periodically reset using a new random seed.
- High-Rank Accumulation: Because the projection changes over time, the total weight update accumulated over many steps is no longer restricted to a single low-rank subspace. Eventually, the updates cover the full-rank space.
To ensure compatibility with standard training practices, the paper introduces specific algorithms for Sublinear Memory Gradient Accumulation and Sublinear Memory Momentum. These allow FLORA to maintain a small memory footprint even when using common optimization tricks.
Theoretical and Scalability Insights
A critical theoretical contribution (Theorem 2.4) shows that the rank $r$ of the projection only needs to scale logarithmically with the model width $m$ to preserve reconstruction accuracy. This logarithmic scaling makes FLORA exceptionally suitable for massive models, as the memory overhead grows much slower than the model size. Furthermore, FLORA is "orthogonal" to other memory-saving techniques; it can be combined with activation checkpointing or layer-wise updates to further reduce VRAM requirements.
Experimental Results
The authors evaluated FLORA across diverse benchmarks, including language modeling (C4), summarization (XSum), translation (IWSLT17), and vision (CIFAR-100).
Performance and Accuracy
- Language Modeling: On the 1.5B parameter GPT-2-XL, FLORA achieved a BLEU score of 33.6, nearly matching the naive full-rank update (33.2) and vastly outperforming standard LoRA (20.7) at the same rank.
- Comparison with GaLore: FLORA outperformed GaLore, a contemporary memory-efficient optimizer, on the C4 dataset (60M model) with a perplexity of 32.52 compared to GaLore's 34.64.
- Vision Transformers: On ViT-Large, FLORA reduced training memory by 32.4% while slightly improving accuracy over the Adam baseline (92.98% vs 92.97%).
Memory Efficiency
For a 3B parameter T5 model, FLORA required only 0.3 to 5.4 GiB of additional memory for gradient accumulation, a significant reduction from the 9.9 GiB required by naive approaches. In 7B parameter model tests, FLORA maintained a lower memory profile (21.2 GiB) than GaLore (22.9 GiB).
Conclusion and Future Work
FLORA demonstrates that high-rank updates are possible within the memory constraints of low-rank adaptation. By reframing LoRA as a gradient compressor and introducing periodic resampling, FLORA bridges the performance gap between parameter-efficient fine-tuning and full-parameter training.
Despite these gains, a primary bottleneck remains: activations. While FLORA slashes optimizer state memory, it does not reduce the memory required for the backward pass, which remains the dominant factor for long sequence lengths. Future work will explore scaling FLORA to models exceeding 70B parameters and further optimizing the resampling interval ($\kappa$), which currently serves as a tunable hyperparameter.
Summary updated