Machine learning & data science
Fine-tune an open LLM (LoRA/QLoRA)
Prepare instruction data, run PEFT fine-tuning on a small model, evaluate against the base.
~20 focused hours·advanced
Tools: Hugging Face Transformers, PEFT/LoRA, TRL, bitsandbytes (QLoRA)
Market relevance — share of job ads asking for this
What employers mean
You should be able to…
- Decide when fine-tuning is actually needed vs prompting or RAG
- Prepare an instruction dataset in the right format (prompt/response pairs, chat template)
- Run a LoRA or QLoRA fine-tune of a small open model (e.g. Llama 3 8B, Qwen, Phi) on limited GPU
- Configure PEFT hyperparameters (rank, alpha, target modules) and justify choices
- Evaluate the fine-tuned model against the base model on a held-out task, not just eyeballing outputs
- Merge/export LoRA adapters and quantize for cheaper inference
- Avoid catastrophic forgetting and overfitting on a small fine-tuning set
Needs first: Build and train neural networks in PyTorch, Build an LLM evaluation harness
Learn — free, link-checked
The few resources that matter
Read · intermediate · 30 min · huggingface.co
SFT Trainer
Shows the exact SFTTrainer + PEFT config pattern for instruction fine-tuning an open model on your own dataset. — Hugging Face
Read · intermediate · 35 min · huggingface.co
PEFT
Official docs for the library that actually runs LoRA/QLoRA fine-tunes -- config options and quickstart code you'll reuse directly. — Hugging Face
Course · intermediate · 90 min · deeplearning.ai
Finetuning Large Language Models
Short course on when to fine-tune vs. prompt, data prep, and evaluating a fine-tuned model against the base -- the decision-making interviewers test for. — DeepLearning.AI
Read · advanced · 45 min · huggingface.co
Fine-tune Llama 3.1 Ultra-Efficiently with Unsloth
A complete, reproducible QLoRA fine-tuning notebook on a free-tier GPU -- the fastest way to see a real before/after eval on a fine-tuned model. — Maxime Labonne
Practice
Fine-tune a small LLM for Hindi/Hinglish customer support triage
Build or source a small instruction dataset of Hindi/Hinglish customer support tickets labeled with intent/category (e.g. billing, technical, refund). QLoRA fine-tune a small open model (Llama 3 8B or similar) to classify and draft a reply, and run a before/after eval comparing base vs fine-tuned model on a held-out set of tickets.
Done when
- Instruction dataset (50-200+ examples minimum) in chat/instruction format, with a clear train/eval split
- QLoRA fine-tuning run completed and logged (loss curve, hyperparameters recorded)
- Quantitative eval comparing base vs fine-tuned model (accuracy on intent classification or a scored rubric on reply quality)
- README documents the eval methodology and honestly reports where fine-tuning did and didn't help
Prove it
Evidence a recruiter can check
- Public GitHub repo with the training script, dataset (or generation script), and eval notebook
- Adapter weights published on Hugging Face Hub with a model card
- Before/after eval table showing quantitative improvement over the base model
- Can explain live the exact LoRA config used and why
Interview
Questions you'll get asked
- When would you fine-tune a model instead of just improving the prompt or adding RAG?
- Explain LoRA -- what does it actually change in the model, and why is it cheaper than full fine-tuning?
- How is QLoRA different from LoRA, and what tradeoff does quantization introduce?
- How would you build an eval set to prove your fine-tuned model is actually better than the base model?
- What data would you need to fine-tune a support-ticket triage model for a Hindi-speaking customer base?
- What's catastrophic forgetting and how do you mitigate it during fine-tuning?
- How do you decide the right LoRA rank for a task?