Ready-made course · 2 days · Advanced
Fine-Tuning Language Models
A two-day course for ML engineers and experienced AI developers: when to adapt a model, how to do it with parameter-efficient methods, and how to evaluate and deploy the result.
Fine-tuning is often proposed when the real problem is retrieval, prompting, or data that should never enter a model. It is also under-used where a model must acquire a style, a schema, or a behaviour that prompting cannot hold. This course teaches the distinction, then the practice.
You cover dataset construction, cleaning, supervised fine-tuning, LoRA, QLoRA and other parameter-efficient methods. Training configuration, GPUs, quantisation, evaluation, overfitting, safety and deployment are treated as operational work. RAG versus fine-tuning is kept in view throughout.
The course includes a practical fine-tuning exercise. You run a parameter-efficient adaptation, evaluate it against a held-out set, and discuss whether the result is worth the operational cost compared with retrieval or a better application design.
The aim is a team that can fine-tune when it is justified, and refuse it when it is not.
- Who it is for
- ML engineers and experienced AI developers responsible for model adaptation, evaluation and deployment.
- Before you start
- Comfortable with Python, training loops at a basic level, and LLM application design. GPU access is required for the labs. The RAG course is useful context but not mandatory.
You will be able to
- Decide when fine-tuning is appropriate compared with prompting, RAG or conventional software.
- Construct and clean a dataset that matches the behaviour being trained.
- Implement supervised fine-tuning with LoRA or QLoRA and explain the trade-offs.
- Configure training, quantisation and GPU use with an eye on cost and overfitting.
- Evaluate adapted models against held-out tasks, safety cases and the base model.
- Plan deployment, versioning and rollback for an adapted model.
- Account for operational and safety implications of changing model behaviour.
Modules
8 quarter-day modules. Each one can go into a custom course on its own.
Whether to fine-tune
- What fine-tuning changes, and what it cannot fix.
- Prompting, retrieval and fine-tuning compared on real problems.
- Cost, data and maintenance.
- Exercise: decide for three candidate use cases.
Data for fine-tuning
- Instruction, chat and preference formats.
- How much data, and of what quality.
- Synthetic data and its traps.
- Lab: build and check a fine-tuning dataset.
LoRA and parameter-efficient fine-tuning
- Full fine-tuning against LoRA and QLoRA.
- Ranks, targets and hyperparameters that matter.
- Hardware and managed fine-tuning services.
- Lab: fine-tune a small open model with LoRA.
Preference tuning: DPO and RLHF
- Reward models and RLHF in outline.
- DPO and related methods.
- Collecting preference data.
- Lab: apply DPO to the fine-tuned model.
Evaluating a fine-tuned model
- Held-out sets and the base model as a baseline.
- Regression on general ability and safety.
- Overfitting and catastrophic forgetting.
- Lab: decide whether the fine-tune earned its place.
Distillation and small language models
- Distilling a large model’s behaviour into a small one.
- Small language models for narrow, high-volume tasks.
- Running them on CPUs and edge devices.
- Lab: distil a classification task into a small model.
Serving and maintaining a fine-tuned model
- Merging adapters and serving many adapters at once.
- Managed hosting against your own GPUs.
- Retraining when the base model or data changes.
- Monitoring quality after release.
Local models for confidential data
- When data cannot leave your network.
- Private RAG on local models.
- Where local models fall short, and hybrid patterns.
- Security for a self-hosted model service.
Practical work
You prepare a dataset, run a parameter-efficient fine-tune, evaluate against a held-out set and the base model, and produce a deployment note. The exercise is sized to finish during the course; it is not an attempt to beat a frontier model.
You take away
- A trained adapter and evaluation report
- Dataset and training configuration templates
- A RAG versus fine-tuning decision guide
- Deployment, versioning and safety notes
Combine it with
- Transformers from First Principles · 2 days
- Training Your Own Language Model · 3 days
- Running LLMs Locally · 1 day