Generative AI · Planned
Fine-tuning an open LLM with LoRA
A small open-weight language model fine-tuned with LoRA for a narrow task, compared honestly against prompting a larger model on accuracy, latency, and cost.
Planned project. This page describes the goal, the approach, and how the system will be evaluated. Code, a live demo, and results will be published here once it is built.
At a glance
Solo project: data, LoRA fine-tuning, baselines, and serving
- Problem
- Decide when fine-tuning a small open model beats prompting a large hosted one for a narrow task.
- Planned approach
- LoRA adapters on a small open-weight model, compared with zero-shot and few-shot prompting on the same held-out test set.
- Design decisions
- A test set never used for tuning or prompt selection, so the comparison stays honest.
- Parameter-efficient LoRA instead of full fine-tuning, to keep training cheap and adapters small.
- Evaluation plan
- Macro F1 on the task, latency and cost per request for both approaches, and a review of where their errors overlap.
Goal
Answer a practical question teams face: when is fine-tuning a small model better than prompting a large one? The project fine-tunes an open model for one narrow task, such as classifying support tickets or extracting fields from text, and compares it with prompting on the same test set.
Planned approach
- Task and data. A narrow task with a labelled dataset, split into training, validation, and a held-out test set that is never used for tuning.
- Baselines. Zero-shot and few-shot prompting of a larger hosted model on the same test set.
- Fine-tuning. Parameter-efficient fine-tuning with LoRA adapters on a small open-weight model, with training runs tracked.
- Serving. The fine-tuned model served behind an API, with the adapter weights published.
Evaluation plan
- Task metrics suited to the problem, such as macro F1 for classification (see macro, weighted and micro F1).
- Latency and cost per request for the fine-tuned model and for the prompting baseline.
- Failure analysis: examples each approach gets wrong, and whether the errors overlap.
Definition of done
A public repository with the training code, published adapter weights, a comparison table of fine-tuning against prompting, and a recommendation on when each approach is worth it.