Back to LLMs Mind Map
中文·English
LLMsID: lora

LoRA / QLoRA Low-Rank Adaptation

LoRA/QLoRA 低秩适配
🎯Core Definition
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning method: freeze the pretrained weights WW and train only a low-rank delta ΔW=BA\Delta W = BA with ARd×rA \in \mathbb{R}^{d \times r}, BRr×dB \in \mathbb{R}^{r \times d}, rank rdr \ll d. Forward pass computes h=Wx+BAxh = Wx + BAx; at inference the matrices merge into W=W+BAW' = W + BA with zero overhead.
💡Use Cases
fine-tuning large models (7B-70B) on consumer GPUs, multi-adapter deployment (shared base + hot-swappable LoRAs), rapid iteration; QLoRA quantizes the base to 4-bit, enabling 65B fine-tuning on a single GPU.
Key Problems Solved
full fine-tuning of 70B needs ~4×80GB A100s; LoRA trains ~0.1% of params, cutting gradient/optimizer memory by an order of magnitude, and multiple adapters hot-swap on one base, slashing serving cost.
🎯5 High-Frequency Exam Points
1
Why does LoRA work? What justifies the low-rank assumption?
2
How do you pick the rank r? Effects of r too large or small?
3
How are LoRA weights merged at inference? Deploying multiple LoRAs?
4
QLoRA's mechanism: 4-bit quant, paged optimizer, double quantization — what does each solve?
5
LoRA vs full fine-tuning: quality gaps and when full FT is required?
Updated 2026-08-11
🎯
Test Your Knowledge: Practice Questions for "LoRA / QLoRA Low-Rank Adaptation"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardSupervised Fine-Tuning (SFT)Next CardSoft Prompts / Adapters

🔗 More LLMs Knowledge Cards

Agent & Tool CallingAlignment Tax & Preference DataScaled Dot-Product AttentionAttention Variants MHA/MQA/GQA