Fine-Tune a Small ModelL09 · Module I · Lesson 01 of 1
Lab · 90 min

Lab: Fine-tune a small model

From data to deployed, with a report.

Summary

The full fine-tuning cycle: dataset assembly, training run, evaluation against the base model, and deployment. On a small open model, so the compute is real but bounded.

Objectives
  • 01Assemble a fine-tuning dataset of at least 1,000 examples.
  • 02Fine-tune a small open model (7B or smaller) with LoRA.
  • 03Evaluate against the base model on a held-out test set.
  • 04Deploy the fine-tuned model behind an API.
Key Ideas
  • Fine-tuning is a data problem before it is a compute problem.
  • The comparison is against the base model with a strong prompt, not against nothing.
Lab

Choose a task where fine-tuning plausibly beats prompting (structured output for a domain, tone-matching, or classification with fixed labels). Assemble 1,000+ (input, output) pairs with quality control. Fine-tune a small open model (Qwen 2.5 7B, Llama 3.1 8B, or similar) with LoRA. Reserve 200 examples as a test set never seen in training. Evaluate: does fine-tuning beat few-shot prompting on the base model? Report win rate, quality on rubric, and cost. Deploy the model to an inference endpoint (vLLM, Ollama, or a managed provider).

Deliverables

  • Dataset with train/test split and quality-control notes.
  • Training script with hyperparameters and loss curves.
  • Evaluation report comparing base vs. fine-tuned.
  • Deployed inference endpoint with reproducible client.

Rubric

  • Dataset quality — deduped, cleaned, with a defensible split.
  • Training rigor — hyperparameters recorded, loss curves published.
  • Fair comparison — base model gets the same task with a strong prompt.
  • Deployment — someone else can call the endpoint.