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

    1. Is this a fixed-size or variable-size window? Why does that fit this problem?
    2. What's the invariant inside the window, and how do you maintain it on shrink/expand?
    3. 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

    1. When does fine-tuning beat RAG, and vice versa?
    2. When is prompt engineering enough?
    3. When would you train from scratch instead of fine-tuning an existing LLM?
    4. How do you choose among full fine-tuning, LoRA, QLoRA, adapters, and prompt tuning for a domain product?
  • LoRA, QLoRA: math and trade-offsGenerative AIHu et al.

    Interview questions to prep

    1. Walk through how LoRA decomposes weight updates into low-rank matrices.
    2. What does QLoRA add on top of LoRA, and what does it cost?
    3. How do you pick rank r and alpha for LoRA?
  • Interview questions to prep

    1. How would you curate 10k high-quality examples for fine-tuning a domain LLM?
    2. What's your dedup + contamination check between training and eval sets — and why does it matter?
    3. How would you fine-tune on domain documents while avoiding catastrophic forgetting?
    4. What validation set would you use to prove the model improved on domain tasks without losing general capabilities?
    5. How do you handle rare domain terms, tokenizer splits, and counterexamples in the fine-tuning dataset?

References & further reading