M5-135M5: NLP & Large Language ModelsPEFT (LoRA / QLoRA / Prefix Tuning)Hard
⚡Flashcard Drill➔Mastery:
Interaction of PEFT with Catastrophic Forgetting and Model Merging
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
PEFT inherently mitigates catastrophic forgetting by freezing base model representations, while parameter updates seamlessly map to task vectors that unlock modular multi-task merging and dynamic multi-tenant serving.
📌 Key Takeaways
- •Forgetting mitigation: freezing protects pre-trained foundational knowledge, isolating domain adaptations strictly to low-rank delta matrices
- •Residual forgetting risks: extreme over-training on out-of-distribution data or excessively large ranks can still induce representational drift in activation space
- •Weight space modularity: low-rank deltas function as native task vectors, supporting zero-shot multi-task addition, capability unlearning, and multi-LoRA routing
📐 Mathematical Derivations
Mathematical Mechanism: 1. Catastrophic Forgetting Bound in PEFT: In full parameter fine-tuning, the parameter update directly perturbs all null-space and task-critical directions of the pre-trained model: For a previously learned task with optimal parameter region , is easily ejected from the safe basin. In LoRA: Because is frozen, the pre-trained feature projection remains mathematically intact. The modification is constrained to an -dimensional projection: 2. Representation Shift via Activation Coupling: Although is unchanged, the output hidden state fed into layer is altered: If becomes large relative to , downstream layer activations drift out of the pre-trained manifold, inducing indirect forgetting. 3. Linear Adapter Merging Formulation: Given independently trained LoRA adapters targeting the same base weights : Enabling instant multi-domain composition without re-running joint multi-task pre-training.
🏭 Production Trade-offs
Deep Dive & Engineering Trade-offs: ① The 'Not Completely Immune' Reality: While PEFT drastically reduces forgetting compared to full fine-tuning, models can still lose general capabilities (e.g., coding, instruction following, or safety refusals) if trained with high learning rates for excessive epochs on narrow corpora. Regular validation across general benchmarks (e.g., MMLU, MT-Bench) during PEFT training is mandatory. ② LoRA as Modular Task Vectors: Because LoRA updates are already decomposed into compact matrices, they represent clean, low-noise task vectors. Applying task arithmetic, TIES-merging, or DARE directly to LoRA updates yields higher stability than merging full-parameter models because low-rank matrices contain less stochastic background noise. ③ Multi-LoRA Serving Architecture: Rather than physically merging adapters into weights—which risks inter-task parameter collisions—production multi-tenant systems keep frozen on GPU and dynamically fetch adapter pairs on a per-request basis. This achieves zero interference and preserves 100% of individual adapter specializations. ④ Unlearning Toxic Behaviors: Train a LoRA adapter specifically on toxic completions, then subtract it from base weights: . ⑤ Interview Strategy: Explain why freezing preserves foundational representations, detail the indirect forgetting mechanism via downstream activation shifts, illustrate adapter merging as task arithmetic , and contrast static merging with dynamic multi-LoRA serving.
⚠️ Common Interview Pitfalls
- ✕Assuming PEFT makes a model completely immune to catastrophic forgetting without monitoring general benchmark regression
- ✕Merging LoRA adapters trained on conflicting base model versions or disparate architectural configurations
- ✕Summing multiple LoRA adapters directly without scaling down coefficients , inducing activation explosion
🎯 Interviewer Follow-up Inquiries
- ?How can downstream activation drift cause indirect catastrophic forgetting even when base model weights remain completely frozen?
- ?What methods exist to resolve parameter interference when merging multiple independently trained LoRA adapters into a single base model?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚