Preprint
Large Language Models

Lora: Low-rank adaptation of large language models.

January 1, 2022

0

Citations

0

Influential Citations

Venue

2022

Year

Abstract

… We propose Low-Rank Adaptation, or LoRA, which freezes the pre-trained model weights and … In sum, we believe that our proposed low-rank adaptation update is well-motivated by the …

Analysis

Why This Paper Matters

Large language models (LLMs) have become foundational in NLP, but their sheer size makes full fine-tuning prohibitively expensive in terms of memory, compute, and storage. LoRA addresses this critical bottleneck by introducing a simple yet effective parameter-efficient fine-tuning method. By freezing the original weights and learning only low-rank updates, LoRA dramatically reduces the number of trainable parameters and GPU memory requirements, making it feasible to adapt models with hundreds of billions of parameters on consumer hardware. This democratizes access to state-of-the-art LLMs for researchers and practitioners with limited resources.

Moreover, LoRA's design is elegant and practical: it does not add inference latency because the low-rank matrices can be merged into the frozen weights after training. This property is crucial for deployment in production systems where latency is a key concern. The paper's impact is evident in its widespread adoption—LoRA has become a standard technique in the LLM fine-tuning toolkit, inspiring numerous follow-up works and integrations into popular frameworks like Hugging Face's PEFT library.

Technical Contributions

  • Low-Rank Decomposition of Weight Updates: Instead of updating the full weight matrix W, LoRA learns a low-rank matrix ΔW = BA, where B ∈ ℝ^{d×r} and A ∈ ℝ^{r×k} with rank r << min(d,k). This reduces the number of trainable parameters from O(dk) to O(r(d+k)).
  • Application to Transformer Attention: LoRA is applied to the query and value projection matrices in the self-attention module, which are the most impactful for adaptation while keeping other weights frozen.
  • No Inference Overhead: After training, the learned low-rank matrices can be multiplied and added to the original weights, so the adapted model has the same architecture and latency as the original.
  • Compatibility with Existing Methods: LoRA can be combined with other fine-tuning techniques like prefix tuning or adapter layers, and it does not require the input sequence to be modified.

Results

On the E2E NLG Challenge, LoRA with rank r=8 achieves a BLEU score of 68.9, compared to 69.0 for full fine-tuning, while using only 0.3% of the trainable parameters. On WikiSQL, LoRA attains 74.0% accuracy versus 74.5% for full fine-tuning. On the GPT-3 175B model, LoRA reduces the number of trainable parameters from 175B to 4.7M (a 37,000x reduction) and cuts GPU memory usage by 3x during training, while maintaining comparable performance on the MNLI and SST-2 benchmarks. The paper also shows that LoRA is robust to the choice of rank r, with r=8 often sufficient, and that applying LoRA to more weight matrices yields diminishing returns.

Significance

LoRA has fundamentally changed how the NLP community approaches fine-tuning of large models. It has enabled efficient adaptation of models like GPT-3, LLaMA, and BLOOM on modest hardware, accelerating research and application development. The method's simplicity and effectiveness have led to its integration into major libraries and its use as a baseline for subsequent parameter-efficient methods. Beyond NLP, LoRA's principle of low-rank adaptation has been extended to other domains such as computer vision and multimodal models. By decoupling the cost of pre-training from fine-tuning, LoRA contributes to a more sustainable and accessible AI ecosystem.