LoRA-FA: Efficient and Effective Low Rank Representation Fine-tuning

Longteng Zhang, Lin Zhang, Shaohuai Shi, Xiaowen Chu, Bo Li

TL;DR

LoRA-FA (Low-Rank Adaptation by Fixing A) significantly reduces the activation memory bottleneck of LLM fine-tuning by freezing the projection-down matrix $A$ and training only the projection-up matrix $B$. By combining this structural asymmetry with a closed-form gradient correction, LoRA-FA slashes memory usage and boosts computational efficiency while matching or exceeding the accuracy of full-parameter fine-tuning.

What Problem Does This Paper Address?

Fine-tuning Large Language Models (LLMs) via full-parameter tuning (Full-FT) is incredibly memory-intensive, often requiring terabytes of GPU memory for large models due to the need to store parameters, gradients, and optimizer states. Parameter-Efficient Fine-Tuning (PEFT) methods like Low-Rank Adaptation (LoRA) alleviate this by introducing pairs of low-rank matrices ($A$ and $B$) to capture weight updates, keeping the main model weights frozen.

However, standard LoRA has a hidden bottleneck: activation memory. To compute gradients for both matrix $A$ and matrix $B$ during the backward pass, standard LoRA must store the full, high-dimensional forward activations. In long-context or large-batch scenarios, this activation memory dominates runtime overhead, frequently leading to Out-Of-Memory (OOM) errors. Furthermore, standard LoRA can sometimes underperform Full-FT due to the intrinsic limitations of its low-rank gradient approximations.

Figure 1: The illustration of (a) full-parameter fine-tuning (Full-FT), (b) LoRA, and (c) LoRA-FA.

Methods

The authors present a key theoretical insight: the low-rank update in LoRA ($\Delta W = AB$) structurally collapses into a single-layer linear regression. This mathematical redundancy implies that you can freeze one of the two matrices without sacrificing the expressivity of the adapter.

Based on this, they introduce LoRA-FA (LoRA by Fixing A):

  1. Freezing Matrix A: The projection-down matrix $A$ is frozen after initialization, meaning its activations do not need to be stored for backpropagation. Only the projection-up matrix $B$ is trained.
  2. Gradient Correction: To bridge the performance gap with Full-FT, the authors derive a closed-form gradient correction formula that minimizes the discrepancy between LoRA-FA's low-rank gradient and the ideal full-parameter gradient: $$g^B = \left(\frac{r}{\alpha}\right)^2 (A^\top A)^{-1} g^B_{\text{LoRA-FA}}$$
  3. Kernel-Level Optimization: Because matrix $A$ remains static throughout training, the term $(A^\top A)^{-1}$ can be precomputed exactly once during initialization, adding zero computational overhead during the training loops.

Datasets

The authors evaluated LoRA-FA across several standard architectures and benchmarks:

  • Natural Language Understanding (NLU): GLUE benchmark using RoBERTa-base and RoBERTa-large.
  • Mathematical Reasoning: GSM8K using MetaMath datasets.
  • Code Generation: HumanEval using the CodeFeedback dataset.
  • Instruction Tuning / Chat: MT-Bench using the WizardLM dataset.
  • Large-Scale Models: Evaluated using Llama2-7B, Llama3-8B, Qwen3-8B, and the DeepSeek-v2-lite-chat (16B Mixture-of-Experts) model.

Key Insights and Ideas

  • The Activation Breakthrough: In standard LoRA, you must store the full input activation tensor $X$. In LoRA-FA, because $A$ is frozen, you only need to store the much smaller intermediate activation $XA$. Since the rank $r$ is much smaller than the hidden dimension $d$ ($r \ll d$), this drastically reduces the activation footprint.
  • Parameter Efficiency Double-Dip: At the same rank $r$, LoRA-FA trains exactly half the number of parameters as standard LoRA (only $B$ instead of $A$ and $B$). This allows practitioners to double the rank (e.g., from 64 to 128) to match the parameter count of other advanced LoRA variants while still maintaining superior memory efficiency.
  • Initialization Sensitivity: The authors discovered that when freezing $A$, standard Gaussian initialization is superior to truncated SVD-style initializations (like PiSSA). SVD initializations create "blind spots" for fixed matrices, whereas random Gaussian initialization ensures steady coverage across all gradient directions.

Key Results

  • Memory and Efficiency Gains: In fine-tuning tests on a single NVIDIA A800 (80GB) GPU with Llama2-7B, LoRA-FA was the only method that did not OOM, reducing memory consumption by over 27.8 GB compared to standard LoRA. It also achieved the highest Model FLOPs Utilization (MFU) across various batch sizes due to its lightweight backward pass.
Figure 2: (a): Dissecting the runtime memory overhead of different methods in fine-tuning Llama2- 7B. We use a global batch size of 8, and a maximum sequence length of 1024. The dashed red line denotes the 80GB capacity of the NVIDIA A800 GPU. (b): Model FLOPs utilization (MFU) of different methods in fine-tuning Llama2-7B. To ensure the successful execution of other PEFT methods under most batch size settings, the sequence length is fixed at 512. The ranks for all methods in (a) and (b) are fixd to 64.
  • Downstream Performance: On the GLUE benchmark, LoRA-FA achieved an average score of 87.5% on RoBERTa-base and 90.0% on RoBERTa-large, outperforming standard LoRA (81.9% / 87.6%) and matching or slightly exceeding Full-FT (87.3% / 89.8%).
  • Scale and Ranks: When scaling up the rank to 128 on Llama2-7B and Llama3-8B, LoRA-FA consistently matched or outperformed complex gradient-approximation variants like LoRA-Pro and LoRA-GA on GSM8K, HumanEval, and MT-Bench.

Limitations and Future Work

  • Residual Activations: While LoRA-FA eliminates the activation memory associated with the adapter matrix $A$, it cannot reduce the core activations generated by the standard Transformer layers themselves (such as attention matrix outputs).
  • Low-Rank Constraints: As a low-rank adaptation method, LoRA-FA is still bound by the capacity constraints of low-rank spaces. If a downstream task requires fundamental, high-rank structural changes to the base model's knowledge, LoRA-FA may still yield suboptimal results compared to true full-parameter fine-tuning.

Summary updated

BibTeX
@misc{zhang2023lora,
  author = {Longteng Zhang and Lin Zhang and Shaohuai Shi and Xiaowen Chu and Bo Li},
  title = {{LoRA-FA: Efficient and Effective Low Rank Representation Fine-tuning}},
  year = {2023},
  eprint = {2308.03303},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.03303},
}
Figure