HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

LoRA: Low-Rank Adaptation of Large Language Models

Edward J. Hu Yelong Shen Phillip Wallis Zeyuan Allen-Zhu Yuanzhi Li Shean Wang Lu Wang Weizhu Chen

LoRA: Low-Rank Adaptation of Large Language Models

Abstract

An important paradigm of natural language processing consists of large-scale pre-training on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes less feasible. Using GPT-3 175B as an example -- deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. We propose Low-Rank Adaptation, or LoRA, which freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times. LoRA performs on-par or better than fine-tuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3, despite having fewer trainable parameters, a higher training throughput, and, unlike adapters, no additional inference latency. We also provide an empirical investigation into rank-deficiency in language model adaptation, which sheds light on the efficacy of LoRA. We release a package that facilitates the integration of LoRA with PyTorch models and provide our implementations and model checkpoints for RoBERTa, DeBERTa, and GPT-2 at https://github.com/microsoft/LoRA.

Code Repositories

mistralai/mistral-finetune
pytorch
Mentioned in GitHub
Owen-Oertell/rlcm
pytorch
Mentioned in GitHub
oseyosey/ccds
pytorch
Mentioned in GitHub
tloen/alpaca-lora
pytorch
Mentioned in GitHub
arielnlee/Platypus
pytorch
Mentioned in GitHub
lxe/simple-llama-finetuner
pytorch
Mentioned in GitHub
vivo-ai-lab/bluelm
pytorch
Mentioned in GitHub
teelinsan/camoscio
pytorch
Mentioned in GitHub
zhaolingao/langptune
pytorch
Mentioned in GitHub
lif31up/attention-is-all-you-need
pytorch
Mentioned in GitHub
microsoft/LoRA
Official
jax
Mentioned in GitHub
theodb/asr-whisper-finetuning
pytorch
Mentioned in GitHub
davisyoshida/lorax
jax
Mentioned in GitHub
yjiangcm/lte
pytorch
Mentioned in GitHub
lighterswang/biomedclip-lora
pytorch
Mentioned in GitHub
internlm/xtuner
pytorch
Mentioned in GitHub
hiyouga/llama-efficient-tuning
pytorch
Mentioned in GitHub
mistralai/mistral-src
pytorch
Mentioned in GitHub
phoebussi/alpaca-cot
pytorch
Mentioned in GitHub
sultan-hassan/CosmoGemma
Mentioned in GitHub
chenlicodebank/lora_on_analog_hardware
pytorch
Mentioned in GitHub
flowersteam/lamorel
pytorch
Mentioned in GitHub
ZhangYuanhan-AI/NOAH
tf
Mentioned in GitHub
ykwon0407/datainf
pytorch
Mentioned in GitHub
zhanglab-aim/lingo
pytorch
Mentioned in GitHub
wwxu21/cut
pytorch
Mentioned in GitHub
durham/rwkv-finetune-script
pytorch
Mentioned in GitHub
ikergarcia1996/sequence-labeling-llms
pytorch
Mentioned in GitHub
flagai-open/aquila2
pytorch
Mentioned in GitHub
pytorch/opacus
pytorch
Mentioned in GitHub
QwenLM/Qwen-7B
pytorch
Mentioned in GitHub
pilancilab/caldera
pytorch
Mentioned in GitHub
h2oai/alpaca-lora
pytorch
Mentioned in GitHub
zjunlp/trice
pytorch
Mentioned in GitHub
Luohh5/Chain-of-Exemplar
pytorch
Mentioned in GitHub
brandon3964/multimodal-task-vector
pytorch
Mentioned in GitHub
gt-ripl/selective-projection-decay
pytorch
Mentioned in GitHub
tatsu-lab/stanford_alpaca
pytorch
Mentioned in GitHub
song-wx/sift
pytorch
Mentioned in GitHub
h2oai/h2o-llmstudio
pytorch
Mentioned in GitHub
hellokevin07/elastictrainer
tf
Mentioned in GitHub
facebookresearch/pytorch-dp
pytorch
Mentioned in GitHub
uds-lsv/llmft
pytorch
Mentioned in GitHub
thuml/AutoTimes
pytorch
Mentioned in GitHub
heekhero/DTL
pytorch
Mentioned in GitHub
mistralai/mistral-inference
pytorch
Mentioned in GitHub
mchl-labs/stambecco
Mentioned in GitHub
sunildkumar/lora_from_scratch
pytorch
Mentioned in GitHub
Davidzhangyuanhan/NOAH
tf
Mentioned in GitHub
liucongg/chatglm-finetuning
pytorch
Mentioned in GitHub
debjitpaul/refiner
pytorch
Mentioned in GitHub
longyuewangdcu/chinese-llama-2
jax
Mentioned in GitHub
llamafamily/llama-chinese
pytorch
Mentioned in GitHub
google-deepmind/thunnini
jax
Mentioned in GitHub
Lightning-AI/lit-llama
pytorch
Mentioned in GitHub
aleemsidra/convlora
pytorch
Mentioned in GitHub
flagalpha/llama2-chinese
pytorch
Mentioned in GitHub
if001/rwkv-lm-lora-ja
pytorch
Mentioned in GitHub
hitz-zentroa/this-is-not-a-dataset
pytorch
Mentioned in GitHub
simula/pointdetectcount
pytorch
Mentioned in GitHub
KU-CVLAB/MoA
pytorch
Mentioned in GitHub
12kimih/hicupid
pytorch
Mentioned in GitHub
qwenlm/qwen
pytorch
Mentioned in GitHub
videocrafter/videocrafter
pytorch
Mentioned in GitHub
facico/chinese-vicuna
pytorch
Mentioned in GitHub
punica-ai/punica
pytorch
Mentioned in GitHub
yjiangcm/lion
pytorch
Mentioned in GitHub
clementromac/lamorel
pytorch
Mentioned in GitHub
qwenlm/qwen-vl
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
mathematical-reasoning-on-amc23Math-Master
Acc: 82
parameter-efficient-fine-tuning-on-boolqLLaMA2-7b
Accuracy (% ): 80.28
parameter-efficient-fine-tuning-on-hellaswagLLaMA2-7b
Accuracy (% ): 76.67
parameter-efficient-fine-tuning-on-winograndeLLaMA2-7b
Accuracy (% ): 69.85

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
LoRA: Low-Rank Adaptation of Large Language Models | Papers | HyperAI