LLM Foundations

See inside the models, not just the chat box.

What large language models really do, from tokens and embeddings through attention, training and alignment, to running them fast and cheaply and using them safely. Vendor-neutral: closed and open-weight models, on APIs, cloud platforms or your own GPUs. By the end you can explain how an LLM works, choose one for a job, and predict where it will fail.

8
chapters
26
modules
~12h
of learning
26
live now
26 modules

Take modules in any order. The route suggests one that builds up naturally.

Take a look inside

The big picture, before the details

What every LLM does: read the tokens, score every possible next one, pick, repeat. Real scores from a small open model.

Step
MyfavouriteSouthIndianbreakfastis?

model · 24 layers

␣a
␣called
␣the
␣__
␣made

1. Text is split into tokens.

Real scores from a small open model (Qwen2.5-0.5B (base)). Bars are scaled to the top candidate; ␣ marks a token that starts with a space.

A taste of module 7: turn the temperature on the same model's real odds, then pick a word.

My favourite South Indian breakfast is a simple but ___

delicious
29%
tasty
10%
satisfying
6.8%
very
5.9%
nutritious
3.4%
rich
2.3%
everything else
42%
Around 1: the model's own odds.
01

The big picture

What a language model does, and the raw material it works with.

3 modules · 80 min

02

Inside the transformer

The architecture behind every modern language model.

4 modules · 110 min

03

How models learn

Pretraining, fine-tuning, alignment and reasoning.

4 modules · 110 min

04

Using models well

Prompts, tools, context and the limits of what models know.

4 modules · 105 min

05

Running models

Speed, memory, throughput and cost.

4 modules · 100 min

06

The model landscape

Choosing among models, modalities and sizes.

3 modules · 75 min

07

Safety & responsibility

Attacks, privacy and building systems people can trust.

2 modules · 55 min

08

Capstones

Put it all together.

2 modules · 80 min