Low-Rank Adaptation (LoRA) is a widely-used parameter-efficient finetuning method for large language models. LoRA saves memory by training only low rank perturbations to selected weight matrices. In this work, we compare the performance of LoRA and full finetuning on two target domains, programming and mathematics. We consider both the instruction finetuning (approximately 100K prompt-response pairs) and continued pretraining (20B unstructured tokens) data regimes. Our results show that, in the standard low-rank settings, LoRA substantially underperforms full finetuning. Nevertheless, LoRA better maintains the base model's performance on tasks outside the target domain. We show that LoRA mitigates forgetting more than common regularization techniques such as weight decay and dropout; it also helps maintain more diverse generations. Finally, we show that full finetuning learns perturbations with a rank that is 10-100X greater than typical LoRA configurations, possibly explaining some of the reported gaps. We conclude by proposing best practices for finetuning with LoRA.
LoRA Learns Less and Forgets Less
D. Biderman,Jose Javier Gonzalez Ortiz,J. Portes,M. Paul,Philip Greengard,Connor Jennings,Daniel King,Sam Havens,Vitaliy Chiley,Jonathan Frankle,Cody Blakeney,John P. Cunningham
Published 2024 in Trans. Mach. Learn. Res.
ABSTRACT
PUBLICATION RECORD
- Publication year
2024
- Venue
Trans. Mach. Learn. Res.
- Publication date
2024-05-15
- Fields of study
Mathematics, Computer Science
- Identifiers
- External record
- Source metadata
Semantic Scholar
CITATION MAP
EXTRACTION MAP
CLAIMS
- No claims are published for this paper.
CONCEPTS
- No concepts are published for this paper.
REFERENCES
Showing 1-75 of 75 references · Page 1 of 1