Day 87 of 133
Fine-tuning: full vs LoRA vs QLoRA + DSA review
When FT beats RAG; LoRA decomposition; data curation for FT.
DSA · NeetCode Sliding Window
- Sliding Window MaximumDSA · Sliding Window
Interview questions to prep
- Is this a fixed-size or variable-size window? Why does that fit this problem?
- What's the invariant inside the window, and how do you maintain it on shrink/expand?
- Why is the overall pass O(n) even though the inner loop looks like it could be O(n²)?
GenAI · Fine-tuning (full vs LoRA vs QLoRA)
Interview questions to prep
- When does fine-tuning beat RAG, and vice versa?
- When is prompt engineering enough?
- When would you train from scratch instead of fine-tuning an existing LLM?
- How do you choose among full fine-tuning, LoRA, QLoRA, adapters, and prompt tuning for a domain product?
Interview questions to prep
- Walk through how LoRA decomposes weight updates into low-rank matrices.
- What does QLoRA add on top of LoRA, and what does it cost?
- How do you pick rank r and alpha for LoRA?
Interview questions to prep
- How would you curate 10k high-quality examples for fine-tuning a domain LLM?
- What's your dedup + contamination check between training and eval sets — and why does it matter?
- How would you fine-tune on domain documents while avoiding catastrophic forgetting?
- What validation set would you use to prove the model improved on domain tasks without losing general capabilities?
- How do you handle rare domain terms, tokenizer splits, and counterexamples in the fine-tuning dataset?
References & further reading
- LoRA paper ↗Microsoft
- Hugging Face — LoRA & PEFT ↗Hugging Face
- Maxime Labonne — LLM Course ↗GitHub
- 75Hard GenAI/LLM — LoRA and QLoRA fine-tuning ↗75Hard GenAI/LLM Challenge