AiTeky Original Interactive Learning & Practice Advanced
Fine-tuning with LoRA: train a small piece, not the whole model
Count what a model holds and what training it costs, build LoRA from scratch in numpy, then measure on real fine-tuning runs how rank, placement and data size change the result, and decide with evidence whether a job needs fine-tuning at all.
Prompting and retrieval change what a model is shown. Fine-tuning changes the model itself. For a long time that meant training every number in it, which needs a research cluster for a big model. LoRA (low-rank adaptation) changed that: freeze the model, learn a small change next to each big matrix, and train only that change. It is now the usual way to fine-tune.
This course builds the idea from the ground up and then tests it. You count the numbers inside a real model and work out what training them needs. You write a LoRA layer in plain numpy and train it by hand. Then you look at real fine-tuning runs of a small model on 2,400 support tickets (head only, LoRA at five ranks and two placements, and full fine-tuning, with three random samples each at three data sizes), recorded on a laptop processor, and see where a small update is enough and where it is not. You also see how an adapter is merged, swapped and combined with a 4-bit base (the idea behind QLoRA).
The industry lessons ask the question that comes before any training run: should this job be fine-tuned at all? You compare fine-tuning with a ten-line baseline on the same tickets, and then look at what must be true of the training data and the launch plan before an adapter goes live: leakage between training and test tickets, label errors, and how to roll back.
Everything runs in the browser on recorded data and small numpy examples. The training runs themselves used a real model and a real processor, and the code that produced them is shown in a Colab box. You need the Python, machine learning and deep learning courses; the NLP course helps.
- Learn lessons explain one idea at a time and let you measure it.
- Industry ready lessons decide, plan and check. Each ends with the interview questions that go with it.
- βΆ Run code in your browser. Nothing to install
- β Exercises that check themselves
- π Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 50 min Free sample π AiTeky Pass What fine-tuning changes, and what it costs Count the numbers inside a real model, work out the memory that training them needs, and see on recorded runs of a real fine-tune what the three ways of training a model (head only, everything, a small part) give on support tickets.
- 02 50 min π AiTeky Pass A small update in two pieces Build a LoRA layer from scratch in numpy. Write the change to a weight matrix as the product of two thin matrices, train only those, see how many numbers that saves, find out why one piece starts at zero, and see what rank is needed when the real change is simple.
- 03 55 min π AiTeky Pass How much rank, and where Read 72 real fine-tuning runs of a small model on support tickets. Compare LoRA at ranks 1 to 16, on two sets of layers, with head-only and full training, at three data sizes, and learn which differences are larger than the noise between random samples.
- 04 50 min π AiTeky Pass Merging, swapping and squeezing Fold a LoRA adapter into the base weights and check the outputs are the same, keep several small adapters for one base model and see the storage, then squeeze the frozen base to 4 bits and see how much an adapter can win back (the idea behind QLoRA).
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.
- 05 55 min π AiTeky Pass On the job: fine-tune, or something simpler? Put a ten-line word-count classifier beside the fine-tuned model on the same tickets and the same samples, price the accuracy difference against the cost of running a transformer, and write the recommendation with the data size at which the answer changes.
- 06 55 min π AiTeky Pass On the job: can the training data be trusted? Audit the ticket data behind the 88% score. Find repeated texts that leak between training and test, estimate how many labels are wrong, re-score the models on a clean test set, and write the launch plan: shadow mode, a rollback path, and monitoring.

