ReLoRA: High-Rank Training Through Low-Rank Updates

Vladislav Lialin, Sherin Muckatira, Namrata Shivagunde, Anna Rumshisky

Introduction

Training large language models from scratch is incredibly expensive. The machine learning community has largely accepted that scaling up model parameters leads to better performance, but training models with billions of parameters requires massive compute clusters and prohibitive amounts of memory. This is largely due to the need to store optimizer states and gradients for every single parameter during backpropagation.

While Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA have democratized the fine-tuning of massive models on consumer hardware, they historically fail to match the performance of full-rank training when used to pre-train models from scratch. This paper introduces ReLoRA, a novel pre-training method that uses a sequence of low-rank updates, periodic merges, and optimizer resets to train high-rank networks. It asks a critical question: Can we leverage the memory and compute efficiency of low-rank updates to pre-train large neural networks without sacrificing the final model's capacity?

The ReLoRA Method

Standard LoRA works by freezing the main network weights and injecting trainable low-rank matrices. The rank of the final update is strictly limited by the bottleneck dimension of these matrices.

ReLoRA bypasses this limitation by exploiting a simple mathematical property: the rank of the sum of two matrices can be higher than the rank of either individual matrix. ReLoRA's training recipe works as follows:

  1. Warm Start: The model is trained normally (full-rank) for the first 25-33% of the training steps. This establishes a strong initial trajectory.
Training loss and trainable parameters for a 250M model, showing the switch to ReLoRA after a full-rank warm start.
  1. Merge and Reinit: The network then switches to LoRA mode. Periodically (e.g., every few thousand steps), the low-rank adapters are merged into the frozen backbone weights, and the adapters are reset to their initial states.
  2. Optimizer Pruning (The Secret Sauce): Naively resetting the adapters causes the model to diverge or stall because the Adam optimizer's historical momentum forces the newly initialized weights right back into the old low-rank subspace. ReLoRA solves this by pruning 99% of the optimizer states (based on magnitude) during every reset.
  3. Jagged Learning Rate Schedule: To further stabilize the resets, the learning rate is dropped to zero and quickly warmed back up after every merge.

Key Insights and Ideas

  • Training is "locally low-rank" but globally high-rank: At any specific point in training, the network only needs a few dimensions to make progress. However, over the entire training trajectory, it needs to explore a high-rank space. ReLoRA perfectly maps to this dynamic by continually resetting and merging low-rank updates.
  • The optimizer is the enemy of restarts: The authors discovered that Adam's first and second moments act as an anchor. If you don't clear the optimizer state when you reset your low-rank adapters, you aren't actually exploring a new subspace. Optimizer magnitude pruning is the crucial innovation that makes ReLoRA work.
  • The "Warm Start" is non-negotiable: ReLoRA requires an initial phase of full-rank training. This aligns with the Lottery Ticket Hypothesis—the network needs full-rank routing early on to find a good trajectory before low-rank approximations can effectively take over.
  • Singular Value Spectra prove the theory: By analyzing the learned weight updates, the authors showed that standard LoRA produces updates with mostly zero singular values. ReLoRA's final updates have a broad distribution of singular values, closely mimicking the high-rank nature of standard full-rank training.
Singular value spectra of weight updates showing ReLoRA closely matches full-rank training compared to standard LoRA.

Results and Hardware Efficiency

The authors successfully tested ReLoRA on Transformer language models ranging from 60M up to 1.3B parameters, trained on the C4 dataset following Chinchilla scaling laws.

  • Performance: On the 1.3B model, ReLoRA achieved a perplexity of 17.27, nearly matching the full-rank baseline of 16.83, and significantly outperforming the standard LoRA baseline (18.23).
  • Memory Savings: ReLoRA saved up to 5.5GB of VRAM per GPU compared to full-rank training.
  • Hardware-Dependent Speedups: Because ReLoRA drastically reduces the amount of data moving through memory, its speedup is most pronounced on hardware with lower memory bandwidth. It achieved a 9% wall-clock speedup on high-end 8xA100s, a 32% speedup on 6xRTX A6000s, and a massive 51% speedup on consumer-grade 2xRTX 3090s.

Limitations and Future Work

While ReLoRA is highly effective, it does not completely close the performance gap with full-rank training (there is still a ~0.4 perplexity penalty at the 1.3B scale). Furthermore, because it requires a full-rank "warm start" for the first third of training, practitioners still need the infrastructure capable of handling full-rank training, even if only temporarily.

Future work will likely focus on optimizing the ReLoRA recipe to close the remaining performance gap, scaling the method to multi-billion parameter models, and applying it to the continued pre-training of existing open-source large language models.

Summary updated

BibTeX
@inproceedings{lialin2024relora,
  author = {Vladislav Lialin and Sherin Muckatira and Namrata Shivagunde and Anna Rumshisky},
  title = {{ReLoRA: High-Rank Training Through Low-Rank Updates}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=DLJznSp6X3},
}
Figure