Reproduce “LoRA: Low-Rank Adaptation of Large Language Models” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen
LoRA adapts a frozen pretrained model by learning low-rank updates to selected weight matrices, which can be merged into the base model at deployment. In GPT-3 175B experiments, a 4.7-million-parameter update reached 91.7% MultiNLI-matched validation accuracy versus 89.5% for full fine-tuning with 175,255.8 million parameters. Results varied by task, including a slight WikiSQL deficit.
Key insights
- Weight updates during the adaptation of large language models exhibit a low 'intrinsic rank', meaning changes can be effectively approximated by small low-rank matrices.
- Adapting the query and value projection matrices in Transformer attention layers is highly effective for capturing task-specific information with minimal parameters.
- The low-rank adaptation matrix does not simply repeat top singular directions of the original weights, but instead amplifies task-specific features not emphasized in the pre-trained model.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.