Language Models:
from the Transformer to the Agent
Build, from scratch and on your own machine, a modern language model and the coding agent that turns it into a tool.
Prerequisites
This course continues on from Deep Learning for NLP. Before you start, you'll need:
- The previous course, or its equivalentA Transformer written from scratch in NumPy. Attention, backpropagation and cross-entropy are not explained again.
- Intermediate PythonFunctions, classes, NumPy. In the last block, also files, processes and JSON.
- A terminalKnowing how to open one, move between directories and run a script. The last block lives in it.
Syllabus
1 of 5 blocks · 3 lessons published01From the Transformer to the Language ModelA single column, real BPE, a mini-GPT trained in NumPy, how to sample from it and what each token costs.3 of 9 lessons · 1h 20m
Your instructor
Frequently asked questions
How much does it cost?
Nothing. The course is free, and the last block runs on a local model on your own computer: no API key and no paid service required.
What do I need to know before starting?
What the previous course, Deep Learning for NLP, teaches: a Transformer built from scratch, backpropagation and cross-entropy. If you bring the same from somewhere else, that works just as well.
How long will it take?
Around 40 hours if you do the exercises and the final project. Go at your own pace; there are no deadlines.
What do I need to install?
Nothing until block 5. The first four blocks run in the browser, Python included. Block 5 builds a terminal program against a language model running on your machine: Ollama and a model of about 5 GB. A computer with 16 GB of RAM and no GPU is enough; with 8 GB there is a smaller model that also works.
Is there as much maths as in the first course?
At the start yes, at the end no, and that is on purpose. Blocks 1 and 2 derive; block 3 mixes; blocks 4 and 5 are engineering: contracts, protocols and a program that grows lesson by lesson. The title goes from the maths to the systems, and so does the course.
Do I build a real Claude Code?
You build a coding agent in the terminal with the same pieces: the loop, the tools, the system prompt, context compaction, permissions, subagents. Much smaller, and with a local model. The last lesson points the real tool at the same model and compares the two on the same tasks.