Production project
LoRA fine-tune vs prompt baseline
Builds on 3 lessonsabout 1 h 10 min of reading first
In this project
What you need first
- Completed:Fine-tuning vs RAG vs promptingEvaluation and model adaptation
- Completed:Fine-tuning methods: SFT, LoRA, QLoRA and DPOEvaluation and model adaptation
- Completed:Fine-tuning data, risks and shippingEvaluation and model adaptation
Skills you will practise
- Model adaptation choices
- Fine-tuning
Problem
Fine-tune a small model on a narrow task and test whether it beats the best prompt.
Requirements
- A small open model with LoRA or QLoRA on a narrow task, such as schema extraction.
- A held-out test set.
- A comparison against the best prompt on a larger model.
- A regression check.
Prerequisites
- Fine-tuning vs RAG vs prompting
- Fine-tuning methods: SFT, LoRA, QLoRA and DPO
- Fine-tuning data, risks and shipping
Tasks
- To do: Pick the narrow task and build the dataset with a held-out split.
- To do: Establish the prompt baseline on a larger model.
- To do: Fine-tune with LoRA or QLoRA.
- To do: Compare quality, cost and latency against the baseline.
- To do: Check for regressions.
Evaluation
Record real measurements and never invent numbers. The finished project should give you: data and evaluation discipline, and a cost-vs-quality comparison.