A Rank Stabilization Scaling Factor for Fine-Tuning with LoRA

Damjan Kalajdzievski
11/28/2023
cs.CLcs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

As large language models (LLMs) have become increasingly compute and memory intensive, parameter-efficient fine-tuning (PEFT) methods are now a common strategy to fine-tune LLMs. A popular PEFT method is Low-Rank Adapters (LoRA), which adds trainable low-rank "adapters" to selected layers. Each adapter consists of a low-rank matrix product, multiplicatively scaled by a rank-dependent factor. This scaling factor, which divides adapters by a factor of the rank, results in slowed learning and stunted performance for LoRA with higher-rank adapters. Consequently, the use of LoRA in practice has generally been limited to very low ranks. In this work, we study the impact of the scaling factor on the learning process and prove that LoRA adapters should be divided by a factor of the square root of the rank. Modifying LoRA with the appropriate scaling factor, which we call the rank-stabilized LoRA (rsLoRA) method, easily provides for a fine-tuning compute/performance trade-off, where larger ranks can be used to trade off increased computational resources during training for better fine-tuning performance, with no change in inference computing cost.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kalajdzievski2023rank,
  title  = {A Rank Stabilization Scaling Factor for Fine-Tuning with LoRA},
  author = {Damjan Kalajdzievski},
  year   = {2023},
  eprint = {2312.03732},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.03732v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.03732.svg)](https://codeofpaper.com/paper/2312.03732)

Discussion