๐ LoRA: Low-Rank Fine-Tuning for Large Language Models - Understanding LORA- LORA ์์๋ณด๊ธฐ?!!
๐ง LoRA: Low-Rank Fine-Tuning for Large Language Models
๐ Lightweight and Fast! A New Paradigm for Efficient Fine-Tuning
Paper: LoRA: Low-Rank Adaptation of Large Language Models
Conference: ICLR 2022 (Edward J. Hu et al., Microsoft Research)
Code: microsoft/LoRA
Comment: A groundbreaking method that brings language model efficiency into new domains!
๐ Summary
Want to fine-tune a large LLMโฆ but without the massive GPU cost?
Traditionally, fine-tuning meant retraining every parameter in the model โ which could mean billions of weights, just like training from scratch.
LoRA solves this by enabling effective fine-tuning while learning only a tiny fraction of the parameters, often achieving comparable or even better performance.
๐ฏ Core Idea:
๐ โKeep the original model weights frozen. Train only a small, lightweight module (low-rank matrices) added alongside.โ
๐ง Why LoRA?
๐ The Challenge of Full Fine-Tuning in LLMs
- Modern LLMs like GPT-3 have hundreds of billions of parameters
- Fine-tuning every parameter is:
- ๐พ Storage-heavy: Each task needs a full model copy
- ๐ Deployment-unfriendly: Task switching is slow and heavy
- ๐ธ Expensive: Requires huge compute and memory
๐ก Limitations of Previous Methods
- Adapter Layers
- Inserts bottleneck networks into the Transformer blocks
- โ Efficient in parameter count
- โ But adds latency, especially problematic in online inference or sharded deployments
- Prompt/Prefix Tuning
- Adds trainable tokens to the input sequence
- โ Keeps the model architecture unchanged
- โ Suffers from optimization instability, and reduces the usable sequence length
๐ Motivation Behind LoRA
LoRA is based on the observation that parameter updates during fine-tuning lie in a low-dimensional space.
Thus:
- Instead of updating full weight matrices,
- LoRA learns a low-rank update:
[ \Delta W = B A ] - Only matrices A and B are trainable; the base model is frozen
โ
Result:
Less memory, fewer FLOPs, and no inference slowdown!
๐๏ธ How LoRA Works
๐ก Low-Rank Update Parameterization
W' = W + \Delta W = W + B A
A โ โ^{rรd}
: initialized with random GaussianB โ โ^{dรr}
: initialized with zerosr โช d
โ low-rank structure- The base weight
W
is frozen โ onlyA
andB
are trained.
This setup allows dramatic reduction in trainable parameters and FLOPs, while maintaining speed and performance!
๐ค But how small can r
go?
Smaller r
means less resource usage โ but is it still effective?
This was explored in Section 7.2: What is the Optimal Rank r for LoRA?
โ Result: Even
r = 1
yields surprisingly strong performance!
โ LoRA withr = 8
andr = 64
was compared using vector subspace similarity, and the overlap was high!
โถ๏ธ Forward Pass Modification
- Original:
h = Wโ ร x
- With LoRA:
h = Wโ ร x + B A ร x
โ The two outputs are added element-wise (same dimensions).
โ This allows LoRA to introduce updates without altering architecture.
๐ง How LoRA is Applied to Transformers
๐ง Target Weight Matrices
- In Self-Attention Modules:
- ( W_q ): Query
- ( W_k ): Key
- ( W_v ): Value
- ( W_o ): Output
- In MLP Modules: two Dense layers
In experiments, W_q, W_k, W_v are treated as unified square matrices
(even though in practice they are divided across attention heads)
Most commonly, LoRA is applied to Wq and Wv.
See Section 7.2 for ablations on rank selection and subspace behavior:
โ๏ธ Training Strategy
- Only attention weight matrices are trained with LoRA
- MLP, LayerNorm, and bias parameters are frozen
โ Simple and highly parameter-efficient.
โ Practical Benefits of LoRA
- Memory Efficiency:
- GPT-3 175B full fine-tuning: 1.2TB
- LoRA fine-tuning: 350GB
- Checkpoint Size Reduction:
- With
r = 4
, training only Q/V โ 350GB โ 35MB (~10,000ร smaller)
- With
- Trainable on modest hardware
- Avoids I/O bottlenecks
- Low-cost Task Switching
- Just swap LoRA modules instead of the entire model
- 25% Faster Training
- Most parameters are frozen โ gradients are computed only for low-rank matrices
โ ๏ธ Limitations
- If you merge
B A
intoW
to avoid runtime overhead:- Itโs difficult to batch tasks with different LoRA modules
- However, when latency is not critical:
- You can keep LoRA unmerged and dynamically swap modules per sample
๐ LoRA in Empirical Evaluation
This work compares LoRA against several fine-tuning methods:
Full Fine-Tuning (FT)
Trains all parameters. Standard method but memory-heavy.BitFit (Bias-only Tuning)
Trains only bias vectors โ very light, but limited capacity.Prefix Tuning (PreEmbed)
Adds trainable tokens to the input โ only embeddings are trained.Prefix Layer Tuning (PreLayer)
Learns intermediate activations at each layer โ more expressive.Adapter Tuning
Adds small MLP โadaptersโ to each layer โ multiple variants (AdapterH, AdapterL, etc.)LoRA (Low-Rank Adaptation)
Adds parallel low-rank matrices to attention weights โ maintains full inference speed
while dramatically reducing memory and parameter size.
๐ Result?
LoRA achieves great performance while training far fewer parameters!
- On the GLUE benchmark (NLU), LoRA matches or outperforms full FT on RoBERTa/DeBERTa
- On GPT-2 generation tasks (WikiSQL, SAMSum), LoRA outperforms Prefix Tuning
- On GPT-3 175B, LoRA trains on 350GB VRAM โ while full FT would be infeasible
๐ฎ Conclusion
LoRA is a breakthrough method for fine-tuning large Transformer models โ from LLMs to ViTs to DETR.
It enables:
- โก Lightweight adaptation
- ๐งช Rapid experimentation
- ๐ Efficient deployment
- ๐ค Personalized AI at scale
๐ง (ํ๊ตญ์ด) LORA : LLM์ ์ํ ์ ๋ญํฌ ํ์ธํ๋ ๊ธฐ๋ฒ
๐ ๊ฐ๋ณ๊ณ ๋น ๋ฅด๊ฒ!! Fine-tuning์ ์๋ก์ด ๋ฐฉ๋ฒ๋ก ์ ์!
๋ ผ๋ฌธ: LoRA: Low-Rank Adaptation of Large Language Models
๋ฐํ: ICLR 2022 (Edward J. Hu et al. - Microsoft Research)
์ฝ๋: microsoft/LORA
์ฝ๋ฉํธ: LLM์ ์ธ์ด ์ดํด ๋ฅ๋ ฅ์ ์๊ฐ ๋ถํ ์ ์ ๋ชฉํ ํ๊ธฐ์ ์ธ ์ ๊ทผ!
๐ ์์ฝ
์์ฒญ ์ข์ LLM ์ ์กฐ๊ธ ์์ ํ๊ณ ์ถ์๋!!
๊ธฐ์กด ๋ฐฉ๋ฒ๋ค์ LLM๋ง๋ค๋์ ์ ์ฌํ ์ธํ๋ผ๋ฅผ ๊ฐ์ง๊ณ ๋ฏธ์ธ ์กฐ์ (fine-tuning)์ ํด์ผํ์ต๋๋ค!!
์๋ํ๋ฉด ๊ธฐ์กด ๋ฐฉ์์ full fine-tuning ๋ฐฉ์
์ผ๋ก,
์์ญ์ต ๊ฐ์ ํ๋ผ๋ฏธํฐ๋ฅผ ์
๋ฐ์ดํธํด์ผ ํ๊ธฐ ๋๋ฌธ์
๋๋ค!
ํ์ง๋ง LoRA๋! ์ด๋ฐ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ์ํด ๋ฑ์ฅํ ๋ฏธ์ธ์กฐ์ ๊ธฐ๋ฒ์ผ๋ก!
ํจ์ฌ ์ ์ ํ๋ผ๋ฏธํฐ๋ง ์ถ๊ฐ ํ์ตํ๋ฉด์๋ ๋น์ทํ๊ฑฐ๋ ๋ ์ข์ ์ฑ๋ฅ์ ๋ฌ์ฑํฉ๋๋ค.
๐ฏ ํต์ฌ ์์ด๋์ด!!
๐ โ๊ธฐ์กด ๋ชจ๋ธ ๊ฐ์ค์น๋ ๊ณ ์ ํ๊ณ , ๋ท๋ถ๋ถ์ ์ถ๊ฐ๋ ๋ค๋ฅธ ๋ถ๋ถ(์ ๋ญํฌ ํ๋ ฌ, Low-Rank Matrices)๋ง ํ์ตํ๋ค!โ
๐ง LORA ๋ฑ์ฅ์ ๋ฐฐ๊ฒฝ
๐ ๋ฌธ์ ์์: ๋๊ท๋ชจ LLM์ ํ๊ณ
- ์ต๊ทผ ์ธ์ด ๋ชจ๋ธ(GPT ๋ฑ)์ ์์ญ์ต~์์ฒ์ต ๊ฐ์ ํ๋ผ๋ฏธํฐ๋ฅผ ๊ฐ์ง๋ฉฐ, ์ด๋ฅผ ์ ์ฒด ํ์ธํ๋(fine-tuning) ํ๋ ๊ฒ์ ๋งค์ฐ ๋นํจ์จ์
- ํ์คํฌ๋ง๋ค ๋ณ๋๋ก ๋ชจ๋ธ ํ๋ผ๋ฏธํฐ๋ฅผ ํ์ตํด์ผ ํ๋ฉฐ, ์ด๋ ์๋ณธ ํ๋ผ๋ฏธํฐ ( \Phi_0 ) ์ ๋์ผํ ํฌ๊ธฐ์ด๊ธฐ ๋๋ฌธ์:
- ๐พ ์ ์ฅ ๊ณต๊ฐ: ํ์คํฌ ์๋งํผ GPT-3 ์์ค์ ๋ชจ๋ธ์ ๋ณ๋๋ก ์ ์ฅํด์ผ ํจ
- ๐ ๋ฐฐํฌ/์ด์: ๋ชจ๋ธ ์ ํ ๋น์ฉ์ด ์ปค์ง๊ณ ์ค์๊ฐ ์๋น์ค์ ๋ถ์ ํฉ
- ๐ธ ํ์ต ์์: GPU ๋ฉ๋ชจ๋ฆฌ์ ์ฐ์ฐ๋น์ฉ์ด ๊ณผ๋ํ๊ฒ ์ฆ๊ฐ
๐ก ๊ธฐ์กด ์ ๊ทผ ๋ฐฉ์์ ํ๊ณ
- ์ด๋ํฐ ๋ ์ด์ด (Adapter Layers)
- Transformer ๋ธ๋ก ์ฌ์ด์ ์์ ๋ณ๋ชฉ ๋คํธ์ํฌ(bottleneck)๋ฅผ ์ฝ์ ํ์ฌ ์ ์ ์์ ํ๋ผ๋ฏธํฐ๋ง ํ์ต
- โ ์ฅ์ : ์ ์ ํ๋ผ๋ฏธํฐ ํ์ต
- โ ๋จ์ :
- ์ด๋ํฐ ์ฐ์ฐ์ ์์ฐจ์ ์ผ๋ก ์ํ๋๋ฏ๋ก ์ถ๋ก ์ง์ฐ(latency) ์ด ๋ฐ์
- ์ค์๊ฐ ์จ๋ผ์ธ ํ๊ฒฝ(์: ๋ฐฐ์น ํฌ๊ธฐ 1)์์ ์ฑ๋ฅ ์ ํ ๋๋ ท
- ๋ชจ๋ธ ๋ณ๋ ฌํ(sharding) ํ๊ฒฝ์์ ํต์ ๋น์ฉ ์ฆ๊ฐ
- ํ๋กฌํํธ ๊ธฐ๋ฐ ์กฐ์ (Prompt Tuning / Prefix Tuning)
- ์ ๋ ฅ ํ ํฐ ์์ ํ์ต ๊ฐ๋ฅํ ํ๋กฌํํธ๋ฅผ ์ฝ์ ํ์ฌ ์กฐ์
- โ ์ฅ์ : ๋ชจ๋ธ ๊ตฌ์กฐ ๋ณ๊ฒฝ ์์
- โ ๋จ์ :
- ์ต์ ํ๊ฐ ๋ถ์์ ํ๊ณ ์ฑ๋ฅ์ด ๋น์ ํ์ ์ผ๋ก ๋ณํ
- ํ๋กฌํํธ๊ฐ ์ ๋ ฅ ๊ธธ์ด๋ฅผ ์ฐจ์งํด ์ฒ๋ฆฌ ๊ฐ๋ฅํ ์ํ์ค ๊ธธ์ด ๊ฐ์
๐ LoRA์ ํต์ฌ ๋๊ธฐ
- ์์ ๋ฐฉ์๋ค์ ํจ์จ์ฑ์ ์ ๊ณตํ์ง๋ง, ์ค์ฉ์ฑ๊ณผ ์ฑ๋ฅ ๊ฐ ํธ๋ ์ด๋์คํ๊ฐ ์กด์ฌ
- LoRA (Low-Rank Adaptation) ๋ ๋ค์์ ๊ด์ฐฐ์์ ์ถ๋ฐํจ:
- ๋ํ ๋ชจ๋ธ์ ํ์ธํ๋ ์, ์ค์ ๋ก ๋ณ๊ฒฝ๋๋ ํ๋ผ๋ฏธํฐ์ ๋ณํ๋ ์ ์ฐจ์ ๊ณต๊ฐ์ ์กด์ฌํจ
- ๋ฐ๋ผ์,
- ์ ์ฒด ๊ฐ์ค์น ๋์ ๋ณํ๋(โW)์ ์ ๋ญํฌ ํ๋ ฌ ( A, B ) ๋ก ๋ถํดํ์ฌ ํ์ต
- ์ฌ์ ํ์ต๋ ๊ฐ์ค์น๋ ๊ณ ์ (freeze) ํ์ฌ ํจ์จ์ ์ธ ์ ๋ฐ์ดํธ ๊ฐ๋ฅ
- ๊ฒฐ๊ณผ์ ์ผ๋ก ๋ฉ๋ชจ๋ฆฌยท๊ณ์ฐ ์์ ์ ๊ฐ + ์ฑ๋ฅ ์ ์ง + ์ถ๋ก ์ง์ฐ ์์
๐๏ธ ๋ฐฉ๋ฒ๋ก : Low-Rank Adaptation (LoRA)
๐ก Low-Rank-Parametrized Update Matrices (์ ๋ญํฌ์ ํ๋ ฌ ์ ๋ฐ์ดํธ)
๋ชจ๋ธ์ weight ํ๋ ฌ W
๋ฅผ ์ง์ ์
๋ฐ์ดํธํ๋ ๋์ ,
์๋๊ณผ ๊ฐ์ด ์ ๋ญํฌ ํ๋ ฌ์ ๊ณฑ์ผ๋ก ๋์ฒด
1
W' = W + ฮW = W + BA
A โ โ^{rรd}
: ์ ๊ท๋ถํฌ๋ก ์ด๊ธฐํB โ โ^{dรr}
: ์ฒ์์ 0์ผ๋ก ์ค์ r โช d
: ์ฆ, ์ ๋ญํฌ(rank-r) ๊ตฌ์กฐW
๋ ๊ณ ์ (frozen),A
,B
๋ง ํ์ต
์ด๋ ๊ฒ ํจ์ผ๋ก์จ!
ํ๋ จ ํ๋ผ๋ฏธํฐ ์์ ์ฐ์ฐ๋์ ๋ํญ ์ค์ด๊ณ ์๋&์ฑ๋ฅ๋ ์ ์ง!!
์ถ๊ฐ๋ก! ๊ทธ๋ผ ์ด๋ค ์ฐจ์(r)์ผ๋ก ๋ฎ์ถ๋๊ฒ ๊น์ง ๊ฐ๋ฅํ ๊น?
๋ฎ์ผ๋ฉด ๋ฎ์์๋ก ๋ฆฌ์์ค๋ ์ ๊ฒ๋ค์ง๋ง ํ์ต์ด ๋ ๊น ๊ฑฑ์ ๋๊ธฐ์!~
ํด๋น ๊ณ ๋ฏผ๋ ์ฐ๊ตฌ์ ๋ท๋ถ๋ถ 7.2 WHAT IS THE OPTIMAL RANK r FOR LORA?
์ ๋์์ต๋๋ค!! ๊ฒฐ๋ก ๋ง ๋งํ๋ฉด r์ด 1์ผ๋๋ ๊ฝค ์ฑ๋ฅ์ด ๊ด์ฐฎ์๋ฐ์!
๋ํ r=8 ์ด๋ r=64์ผ๋์ ๋ฒกํฐ๋ฅผ ๊ตฌํด์ ์ผ๋ง๋ ๊ฒน์น๋์ง๋ฅผ ์๊ฐํํ๋๋ฐ, ๋ง์ด ๊ฒน์น๋๊ฒ์ ํ์ธํ๋์!
โถ๏ธ Forward Pass ์์ (๊ฒฐ๊ณผ๊ฐ ์์ธก ๋ฐฉ๋ฒ ์์ )
- ๊ธฐ์กด:
h = W_0 * x
- LoRA ์ ์ฉ ํ: ` h = W_0 * x + BA * x
๏ธโ ๋์ผ ์ ๋ ฅ์ ๋ํด ๋ ์ถ๋ ฅ ๊ณ์ฐ ํ **์ขํ๋ณ ํฉ์ฐ** (
W_0 * x์
BA * x`๋ ๊ฐ์ ์ฐจ์์ ๋ฒกํฐ๋ก ๋ํ๊ธฐ๊ฐ ๊ฐ๋ฅ์ฐ!)
Transformer์ LoRA๋ฅผ ์ ์ฉํ๋ฉด@?
๐ง ์ ์ฉ ๋์
- Self-Attention ๋ชจ๋ ๋ด ๊ฐ์ค์น ํ๋ ฌ:
- ( W_q ): Query
- ( W_k ): Key
- ( W_v ): Value
- ( W_o ): Output
- MLP ๋ชจ๋์๋ Dense Layer 2๊ฐ ์กด์ฌ
์คํ์์๋ W_q, W_k, W_v ๋ค์ ๋จ์ผ ํ๋ ฌ๋ก ์ทจ๊ธ
(์ค์ ๋ก๋ ์ฌ๋ฌ attention head๋ก ๋ถํ ๋์ง๋ง,, ๋จ์ํ๋ฅผ ์ํ์ฌ!!)
LoRA ๋ ผ๋ฌธ์์๋ ์คํ์ ์ผ๋ก ๋ค์ํ ์กฐํฉ์ ํ ์คํธํ๊ณ , Wq์ Wv์ ์ ์ฉํ๋๊ฒ์ด ๋ํ์ ์!
7.2 WHAT IS THE OPTIMAL RANK r FOR LORA?
์์ ํด๋น ์คํ๋ด์ฉ์ ๋ณผ์ ์์ง์~~
โ๏ธ ์คํ ์ ๋ต
- Attention weights๋ง LoRA๋ก ํ์ต
- MLP, LayerNorm, Bias๋ ๋ชจ๋ ๊ณ ์ (freeze)
โ ๊ฐ๋จํ๊ณ ํ๋ผ๋ฏธํฐ ํจ์จ์
โ LoRA์ ์ค์ฉ์ ์ด์
- ๋ฉ๋ชจ๋ฆฌ ์ ๊ฐ:
- GPT-3 175B ๊ธฐ์ค VRAM ์ฌ์ฉ๋
โ ์ ์ฒด ํ์ธํ๋: 1.2TB โ LoRA: 350GB
- GPT-3 175B ๊ธฐ์ค VRAM ์ฌ์ฉ๋
- ์ฒดํฌํฌ์ธํธ ํฌ๊ธฐ ๊ฐ์:
- ( r = 4 ), Q/V projection๋ง ํ์ต ์
- 350GB โ 35MB (์ฝ 10,000๋ฐฐ ์ถ์)
- ์ ์ GPU๋ก๋ ํ์ต ๊ฐ๋ฅ
- I/O ๋ณ๋ชฉ ์ํ
- ํ์คํฌ ์ ํ ๋น์ฉโ
- ์ ์ฒด ๋ชจ๋ธ ๊ต์ฒด ๋์ LoRA ๋ชจ๋๋ง ๊ต์ฒด
- ํ์ต ์๋ 25% ํฅ์
- ๋๋ถ๋ถ์ ํ๋ผ๋ฏธํฐ๋ gradient ๊ณ์ฐ ๋ถํ์
โ ๏ธ ํ๊ณ
- ์ถ๋ก ์๋ ์ ์ง๋ฅผ ์ํด ( A, B )๋ฅผ ( W )์ ๋ณํฉ(merge) ํ ๊ฒฝ์ฐ:
- ์๋ก ๋ค๋ฅธ ํ์คํฌ์ฉ ( A, B )๋ฅผ ํ ๋ฒ์ ๋ฐฐ์น ์ฒ๋ฆฌํ๊ธฐ ์ด๋ ค์
- ๋จ, ์ง์ฐ์ด ์ค์ํ์ง ์์ ๊ฒฝ์ฐ:
- ๋ณํฉํ์ง ์๊ณ ์ํ๋ง๋ค ๋ค๋ฅธ LoRA ๋ชจ๋ ๋์ ์ ํ ๊ฐ๋ฅ
๐ LORA์ ์ฑ๋ฅ ์คํ!!
์ด ์ฐ๊ตฌ๋ ๋ค์ํ ํ์ธํ๋(fine-tuning) ๊ธฐ๋ฒ๋ค๊ณผ ์ฑ๋ฅ์ ๋น๊ตํ์ต๋๋ค!
๋น๊ต ๋์์ผ๋ก๋ ์ ํต์ ์ธ Full Fine-Tuning (FT) ์ ๋น๋กฏํด ๋ค์๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ๋ค์ด ์์ต๋๋ค:
Full Fine-Tuning (FT)
๋ชจ๋ธ์ ๋ชจ๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ ๋ฐ์ดํธํ๋ ๋ฐฉ์. ๊ฐ์ฅ ์ผ๋ฐ์ ์ด์ง๋ง, ํ๋ผ๋ฏธํฐ ์๊ฐ ๋ง์ ๋ฉ๋ชจ๋ฆฌ/์ฐ์ฐ ๋น์ฉ์ด ํผ.BitFit (Bias-only Tuning)
์ค์ง bias ํญ๋ง ํ์ตํ๋ ๋ฐฉ์. ๋งค์ฐ ๊ฐ๋ณ์ง๋ง ํํ๋ ฅ์ ์ ํ์ ์ผ ์ ์์.Prefix Tuning (PreEmbed)
์ ๋ ฅ ์(๋๋ ์ค๊ฐ)์ ํน์ ํ ํฐ์ ์ฝ์ ํ๊ณ , ์ด๋ค์ ์๋ฒ ๋ฉ๋ง ํ์ต. ๋ชจ๋ธ ๊ตฌ์กฐ๋ฅผ ์ ์งํ๋ฉด์ ์ ์ ๊ฐ๋ฅ.Prefix Layer Tuning (PreLayer)
๋จ์ ์๋ฒ ๋ฉ์ด ์๋๋ผ, ๊ฐ Transformer ์ธต์ hidden activation ์์ฒด๋ฅผ ํ์ต. ๋ ๊ฐ๋ ฅํ ํํ๋ ฅ์ ๊ฐ์ง.Adapter Tuning
Transformer ๋ด๋ถ์ ์์ MLP ๊ตฌ์กฐ์ ์ด๋ํฐ ๋ ์ด์ด๋ฅผ ์ฝ์ ํ์ฌ ์ผ๋ถ ํ๋ผ๋ฏธํฐ๋ง ํ์ต. ๋ค์ํ ๋ณํ(AdapterH, AdapterL, AdapterP ๋ฑ)์ด ์์.LoRA (Low-Rank Adaptation)
๊ธฐ์กด ๊ฐ์ค์น ํ๋ ฌ์ ์ ๋ญํฌ ํ๋ ฌ (B, A)๋ฅผ ๋ณ๋ ฌ๋ก ์ถ๊ฐํ์ฌ ์ผ๋ถ๋ง ํ์ต. ์ถ๋ก ์๋ ์ ํ ์์ด, ์ฑ๋ฅ์ ์ ์งํ๋ฉด์ ํ๋ผ๋ฏธํฐ ์์ ๋ฉ๋ชจ๋ฆฌ ๋น์ฉ์ ํฌ๊ฒ ์ค์.
๊ทธ๋ฆฌ๊ณ ๊ฒฐ๊ณผ๋~!
LORA๋ ์ ์ ํ๋ผ๋ฏธํฐ ํ์ต์ ํตํด ์ข์ ํจ๊ณผ๋ฅผ ๋ธ๊ฒ์ ๋ณผ์ ์์ง์~!
- GLUE benchmark (NLU ๊ณผ์ ) ์์๋ RoBERTa์ DeBERTa ๊ธฐ๋ฐ ์คํ์์ LoRA๊ฐ Full FT์ ๋น์ทํ๊ฑฐ๋ ๋ ์ข์ ์ฑ๋ฅ์ ๋ฌ์ฑ
- GPT-2 ๊ธฐ๋ฐ ์์ฑ ๊ณผ์ (WikiSQL, SAMSum) ์์๋ Prefix Tuning๋ณด๋ค LoRA๊ฐ ๋ ๋์ BLEU/ROUGE ์ฑ๋ฅ์ ๊ธฐ๋ก
- GPT-3 175B์์๋ Full FT๊ฐ ๋ถ๊ฐ๋ฅํ ํ๊ฒฝ์์๋ 350GB VRAM์ผ๋ก ํ์ต ๊ฐ๋ฅํ๊ณ , ๊ธฐ์กด ๊ฒฐ๊ณผ์ ์ ์ฌํ ์ฑ๋ฅ ํ๋ณด
๐ฎ ๊ฒฐ๋ก
LoRA๋ Transformer ๋ชจ๋ธ๋ค (LLM, VIT, DETR ๋ฑ๋ฑ)์ Fine-tuning ํ๊ธฐ์ํ ํ์ ์ ์ธ ๋ฐฉ๋ฒ์
๋๋ค!!
์ด ๋๋ถ์ ์ถํ ์ฐ๊ตฌ์์ ๋ชจ๋ธ ๊ฒฝ๋ํ, ๋น ๋ฅธ ์คํ, ๋ถ์ฐ ํ์ต, ๊ฐ์ธํ ๋ฑ์ ๋ค์ํ๊ฒ ํ์ฉ๋๊ณ ์์ต๋๋ค.