Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

LoRA Learns Less and Forgets Less

About

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.

Dan Biderman, Jacob Portes, Jose Javier Gonzalez Ortiz, Mansheej Paul, Philip Greengard, Connor Jennings, Daniel King, Sam Havens, Vitaliy Chiley, Jonathan Frankle, Cody Blakeney, John P. Cunningham• 2024

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningHellaSwag--
1891
Commonsense ReasoningWinoGrande--
1085
Physical Commonsense ReasoningPIQA--
572
Sentence CompletionHellaSwag--
276
Mathematical ReasoningGSM8K
Math Score50.9
197
Language ModelingPG-19--
160
Question AnsweringOpenBookQA
Normalized Accuracy-2.2
102
Question AnsweringARC-C--
87
Code GenerationMBPP
MBPP Score47.7
35
Language ModelingMedical (Med)
PPL Change (%) vs Baseline0.1
30
Showing 10 of 27 rows

Other info

Follow for update