TL;DR
Vector-based Random Matrix Adaptation (VeRA) is a parameter-efficient fine-tuning method that shrinks LoRA's trainable parameter footprint by up to 100x without sacrificing performance. It achieves this extreme efficiency by sharing a single pair of frozen, randomly initialized matrices across all model layers and only training tiny, layer-specific scaling vectors.
The LoRA Storage Bottleneck
Fine-tuning massive Large Language Models (LLMs) is computationally expensive. Low-Rank Adaptation (LoRA) revolutionized this process by freezing the original model weights and only training small, low-rank matrices to approximate the weight updates.
However, as models scale to hundreds of billions of parameters (like GPT-3 or GPT-4), or as companies try to deploy millions of personalized models (e.g., a custom AI assistant for every user), even LoRA becomes a storage bottleneck. For instance, storing LoRA weights for a single user on GPT-3 takes about 288MB. For a million users, that’s 275 Terabytes of storage just for the fine-tuned weights. The authors of this paper tackle this exact bottleneck, asking: Can we push parameter efficiency even further to make serving millions of personalized models feasible on a single GPU?
Methods: From Matrices to Vectors
In standard LoRA, every adapted layer gets its own pair of trainable low-rank matrices ($A$ and $B$). VeRA takes a radically different approach based on the surprising effectiveness of random projections in neural networks.
- Shared, Frozen Random Matrices: VeRA generates a single pair of low-rank matrices ($A$ and $B$) using a random number generator. These matrices are frozen (not trained) and shared across every single layer of the model.
- Trainable Scaling Vectors: To allow each layer to learn specific tasks, VeRA introduces two tiny, trainable scaling vectors ($b$ and $d$) for each layer. These vectors act as dials, scaling the rows and columns of the frozen random matrices to adapt them to the specific layer's needs.
The Storage Magic: Because the massive $A$ and $B$ matrices are randomly initialized, you don't even need to save them to disk. You only need to save the random seed used to generate them, plus the tiny trained $b$ and $d$ vectors. When deploying the model, you simply regenerate the random matrices on the fly and apply the scaling vectors. Like LoRA, these updates can be merged into the original weights, meaning zero extra latency during inference.
Key Insights
- Random subspaces are surprisingly expressive: You don't actually need to learn the low-rank projection space itself (which is what LoRA does). A random subspace is perfectly fine, provided the model can learn how to scale its dimensions appropriately for each specific layer.
- Later layers adapt more: By looking at the magnitude of the trained scaling vectors, the authors found that later layers in the Transformer adapt much more than earlier layers. Furthermore, "query" matrices in the attention mechanism require more adaptation than "value" matrices.
- Initialization matters: The scaling vector $d$ needs to be initialized with a small non-zero value (like $10^{-1}$ or $10^{-7}$) rather than $1.0$ or $0.0$. This gives the network the flexibility to easily flip the signs of the random matrix rows early in training.
Key Results
The authors evaluated VeRA across a diverse set of domains, including Natural Language Understanding (GLUE), Generation (E2E), Instruction Tuning (Alpaca), and Computer Vision (CIFAR100, Food101, etc.).
- 100x Parameter Reduction in LLMs: When instruction-tuning Llama2 13B, VeRA achieved a score of 5.93 on MT-Bench using only 2.4 million trainable parameters. Standard LoRA scored 5.77 but required 250.3 million parameters.
- Matches or Beats LoRA on NLP/Vision: On the GLUE benchmark, VeRA matched LoRA's performance with 10x fewer parameters. On the E2E generation benchmark, it slightly outperformed LoRA with 3-4x fewer parameters. It also matched or beat LoRA across all tested image classification datasets.
- Training Efficiency: Despite adding vector multiplication steps, VeRA's training time is virtually identical to LoRA (+1.8%). Furthermore, because it doesn't need to store optimizer states for the large shared matrices, it actually reduces GPU memory usage during training by about 7.4%.
Limitations and Future Work
- Architecture Focus: The paper exclusively tests VeRA on Transformer architectures (both text and vision). Its applicability to other architectures (like CNNs or state-space models) remains an open question.
- Future Enhancements: The authors suggest that VeRA could be improved by incorporating dynamic parameter budget allocation (similar to AdaLoRA, where more parameters are allocated to more important layers) or by exploring new initialization and regularization techniques specifically tailored for scaling vectors.
Summary updated