AccueilGlossaire › LoRA (Low-Rank Adaptation)

LoRA (Low-Rank Adaptation)

AI/ML

Technique de fine-tuning efficiente paramètres-restreints des LLMs.

LoRA (Low-Rank Adaptation, Hu et al. 2021) est une technique de fine-tuning paramètres-efficient (PEFT) qui freeze les weights pré-entraînés du modèle et injecte des matrices décomposées low-rank trainables dans chaque layer. Permet de fine-tuner LLMs massifs (70B+ params) sur GPU consumer (24-48 GB) en n'entraînant que 0.1-1% des paramètres totaux.

Intuition : weight update ΔW dans fine-tuning a low intrinsic rank. Au lieu d'apprendre full ΔW (énorme matrix), décomposer ΔW = B·A où B (d×r) et A (r×k), r << min(d,k) — typiquement r=4 à 64. Drastiquement moins de paramètres à apprendre.

Benefits : (1) **GPU memory** — train Llama 3 70B avec 24 GB VRAM avec QLoRA (vs >700 GB full fine-tuning) ; (2) **Storage** — LoRA checkpoint = MBs vs full model GBs, permettant des centaines de versions ; (3) **Composability** — multiple LoRAs trained on different tasks/styles peuvent être loaded simultanément ou chained ; (4) **No inference overhead** — once trained, LoRA weights peuvent être merged into base model ; (5) **Faster training** — fewer params = faster gradient updates.

Variantes : (1) **QLoRA** — quantize base model in 4-bit + LoRA on top — train 65B model sur single 48 GB GPU ; (2) **DoRA** (Weight-Decomposed LoRA) — decompose magnitude + direction ; (3) **AdaLoRA** — adaptive rank allocation per layer ; (4) **LoRA+** — different learning rates A et B ; (5) **ReLoRA** — reset LoRA periodically pour expressivité.

Frameworks : (1) **HuggingFace PEFT** library — LoRA, QLoRA, AdaLoRA, IA3, prompt tuning intégrés ; (2) **Axolotl** — opinionated fine-tuning framework ; (3) **Unsloth** — 2x faster LoRA training optimisé ; (4) **TRL** (Transformers Reinforcement Learning) ; (5) **Litgpt** ; (6) **MLX** Apple Silicon.

Use cases : (1) domain adaptation (medical, legal LLM) ; (2) style/persona customization (corporate voice, character chatbot) ; (3) instruction tuning ; (4) RLHF / DPO with PEFT ; (5) Stable Diffusion image style transfer (LoRA très populaire pour SD ecosystem — Civitai marketplace milliers de LoRAs) ; (6) multi-tenant SaaS LLM fine-tuning. Compétences AI-102, PMLE, AIF-C01.

Certifications qui couvrent ce concept
AI-102 AIF-C01 PMLE
Termes liés
QLoRA (Quantized LoRA) PEFT (Parameter-Efficient Fine-Tuning) Fine-tuning LLM (Large Language Model)

Préparez vos certifications IT gratuitement

200+ certifications, 400 000+ questions, examens blancs chronométrés.

Voir le catalogue →
← Retour au glossaire