LLMs for Engineers
How large language models are built, trained and run, so you can reason about their behaviour, cost and failure modes in production.
3 modules · 9 lessons~18 hoursUpdated 2026-10-30
- Lessons9
- Quizzes9
- Sources60
- Of study~18h
About this course
About this course
A working engineer's model of the LLM: how text becomes tokens and vectors, what attention and the rest of the transformer block compute, how pretraining, fine-tuning and reinforcement learning turn a document predictor into an assistant, and what happens at inference time, from sampling and hallucination to the KV cache, prompt caching and extended thinking. The final module turns that understanding into decisions: when to pay for reasoning, and how to choose and compare models on cost, latency and quality. Each lesson pairs a rigorous explanation with a short video segment, primary sources, a quiz and exercises you do with Claude.
About the running example
The examples follow a fictional property-law (conveyancing) firm in England and Wales, and the capstone extracts data from its title registers (official records of who owns a property). It's a case study, chosen because its documents are long, structured and high-stakes. You don't need a legal background, and the same patterns apply to contracts, insurance claims, invoices, support tickets or patient records. In the lessons, a matter is one client's case and a solicitor is the lawyer who signs work off.
What you'll learn.
- 1Trace a prompt through tokenisation, embeddings, attention and the transformer block, and count a model's parameters from its config
- 2Explain how pretraining, supervised fine-tuning, RLHF, constitutional training and RL with verifiable rewards each shape model behaviour
- 3Predict how sampling settings, grading incentives and missing context lead to hallucinations, and design grounding checks that catch them
- 4Compute KV-cache memory and prompt-caching savings, and structure prompts so caches actually hit
- 5Decide when extended thinking is worth its cost, and choose between models using your own evals, cost per completed task and latency
3 modules, 9 lessons.
10h 5m of lessons
Module 1 · 3 lessons · 2h 55m
Inside the transformer
How text becomes vectors, how attention moves information between positions, and how the rest of the block (MLP, residuals, normalisation, position) turns that into a prediction.
Module 2 · 2 lessons · 2h 25m
How models are trained
From next-token prediction on trillions of tokens to an assistant that follows instructions, refuses harm and reasons through verifiable problems.
Module 3 · 4 lessons · 4h 45m
Running models in production
What happens at inference time and the engineering decisions that follow: sampling and hallucination, context and caching, reasoning budgets, and choosing a model.
Choose a model for document extraction
Build a small, rigorous evaluation of structured document extraction across models and effort levels, using what you learned about tokens, training, hallucination, caching and reasoning, and write the recommendation memo you would act on.