Abstract
Training and adapting Large Language Models (LLMs) is increasingly constrained by the "memory wall," where the storage of intermediate activations during backpropagation exceeds the memory required for model parameters. We present VeLoRA (Vector projected LoRA), a novel training framework that aggressively compresses these activations into one-dimensional projections. By partitioning tokens into "sub-tokens" and utilizing a fixed, heuristically initialized projection vector, VeLoRA significantly reduces GPU memory requirements. Our results demonstrate that VeLoRA outperforms established methods such as QLoRA and GaLore in both fine-tuning and pre-training tasks while offering superior computational speed by avoiding expensive recomputations and Singular Value Decomposition (SVD) operations.
1. Introduction
The primary bottleneck in scaling deep learning models is no longer just the parameter count, but the massive memory footprint of intermediate activations. To perform backpropagation, standard training frameworks must store the "features" calculated during the forward pass. For LLMs, this activation memory can be several times larger than the model weights themselves, often necessitating expensive hardware or trade-offs in training efficiency.
Existing solutions to this problem come with significant drawbacks. Gradient Checkpointing reduces memory by deleting activations and recomputing them, which substantially increases training time. Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA reduce parameter memory but still require full-sized activations for the trainable components. GaLore reduces gradient memory but maintains full activations and introduces computational overhead through periodic SVD operations. VeLoRA addresses these limitations by providing a low-cost alternative that compresses activations directly without specialized hardware or significant recomputation overhead.
2. Methodology
VeLoRA introduces a streamlined two-step process for managing activation memory during the training cycle:
2.1 Grouping and Sub-Token Projection
During the forward pass, high-dimensional input tokens are divided into smaller units termed "sub-tokens." Each sub-token is then projected onto a fixed 1-dimensional subspace using a projection vector ($v$). Rather than storing the full activation tensor, the framework only retains these compact 1D representations.
2.2 Coarse Reconstruction
During the backward pass, the original tokens are "coarsely" reconstructed from the stored 1D projections using the same fixed vector $v$. Unlike methods like GaLore, which update projections using SVD, VeLoRA utilizes a fixed projection vector initialized once using first-order statistics from the initial data batch. While this reconstruction is inherently lossy, the authors demonstrate that it preserves gradient similarity—the critical signal required for model convergence.
3. Theoretical Insights
3.1 The Power of Sub-tokens
Dividing tokens into sub-tokens allows the model to utilize a much lower-dimensional fixed subspace without sacrificing convergence. Interestingly, sub-tokens naturally reside on a higher-dimensional subspace than original tokens. Projecting them acts as a form of regularization, suppressing large eigenvalues and helping to prevent overfitting during the training process.
3.2 Gradient Similarity vs. Exactness
A core insight of VeLoRA is that backpropagation does not require perfect activation reconstruction. As long as the compressed representation locally preserves the similarity between gradients, the model can learn effectively. Mathematically, VeLoRA can be viewed as a special case of LoRA with a specific data-driven initialization, implemented as a custom operation to maximize memory savings.
4. Experimental Results
VeLoRA was evaluated across vision and language tasks, demonstrating robust performance and efficiency gains.
4.1 NLP Fine-tuning and Pre-training
On the MMLU (Massive Multitask Language Understanding) benchmark, the combination of VeLoRA and QLoRA achieved a mean score of 43.8%, surpassing standard QLoRA (43.3%). Crucially, it reduced the memory footprint for a LLaMA 7B model from 5.77GB to 4.88GB, a relative reduction of approximately 15%.
In pre-training experiments on the C4 dataset, VeLoRA achieved a validation perplexity of 25.29 for LLaMA-130M, outperforming both GaLore (25.36) and standard LoRA (33.92) while maintaining a lower memory profile.
4.2 Computational Speed
VeLoRA proved to be 17% to 47% faster than gradient checkpointing across various LLaMA model sizes. This speedup is attributed to the elimination of the second forward pass required by checkpointing and the avoidance of the SVD computations required by GaLore.
4.3 Vision Tasks
On the VTAB-1k suite, integrating VeLoRA with existing PEFT methods generally improved accuracy. For instance, it showed a +1.5 percentage point improvement over full tuning on ViT-B while simultaneously lowering memory usage.
5. Conclusion and Future Work
VeLoRA represents a significant step toward democratizing LLM training by allowing researchers to fit larger models on more modest hardware. While the current study focuses on Transformer architectures, future work will explore the applicability of sub-token projection to other architectures such as CNNs and State Space Models (SSMs). Additionally, exploring more sophisticated yet computationally inexpensive initialization strategies for the projection vector may yield further performance enhancements. By addressing the "memory wall" through efficient activation compression, VeLoRA provides a scalable path for future large-scale model development.
Summary updated