↓ Skip to main content

Learning paths

Understanding LLMs

From the maths underneath to building with models, and checking the code they write.

21 posts · about 172 min of reading

Who it's for: Engineers who use LLMs and want to know what is going on inside, one step at a time.

Stage 1 The maths underneath

  1. AI from the ground up, part 0: a maths cheat sheet

    The vectors, dot products and matrices every later post leans on.

    13 min · Keep it open beside the others.

  2. AI from the ground up, part 1: the maths behind an LLM

    The four bits of maths an LLM runs: vectors, matrices, softmax, gradients.

    11 min

  3. AI from the ground up, part 2: probability, the language of machine learning

    Why every answer is a probability, and what temperature and top-p change.

    10 min

  4. AI from the ground up, part 3: what GPUs actually do

    Why AI runs on GPUs, and why memory, not compute, is usually the limit.

    10 min

Stage 2 How a model is made

  1. What model weights are: from one neuron to a 19 GB file

    What a weight is, and how 30 billion of them become a 19 GB file.

    9 min

  2. How an LLM is built, part 1: the plan, the data and the design

    The nine stages from raw text to model; then data, tokenizer and design.

    11 min

  3. How an LLM is built, part 2: pre-training, months of guessing the next word

    Pre-training is guessing the next word, trillions of times, across thousands of GPUs.

    10 min

  4. How an LLM is built, part 3: from base model to assistant

    How fine-tuning and reinforcement learning turn a base model into an assistant.

    9 min

  5. AI from the ground up, part 4: what is a frontier model?

    What "frontier model" means, and what it shouldn't mean when you choose one.

    8 min

Stage 3 Using models well

  1. AI from the ground up, part 5: using models effectively

    Decide what success looks like and build a test set first; then choose the model.

    11 min

  2. AI in practice, part 3: Tokens and tokenomics

    What a token is, why context windows end, and how the bill is counted.

    5 min

  3. Ollama or Colibri? A beginner's comparison on two of my machines

    Two ways to run a model on your own machine, and which to try first.

    11 min

  4. Can a local 30B model write my blog? I fact-checked it

    Where a local 30B model helps a writer, and where it gets facts wrong.

    7 min

Stage 4 Building with models

  1. AI in practice, part 1: Choosing the right framework

    What each layer of the AI stack does, from PyTorch to LangChain.

    4 min

  2. AI in practice, part 4: From RAG to tools and agents

    How a model goes from answering to acting: function calls and the agent loop.

    4 min

  3. AI in practice, part 5: MCP, the Model Context Protocol

    One standard plug between models and tools, and the security rules that come with it.

    4 min

Stage 5 Checking what a model wrote

  1. Colibri on my desk: a 30B model writes a network scanner, slowly

    What a local model's code got wrong, and what memory did to its speed.

    8 min

  2. Testing code an AI wrote, part 1: read it before you run it

    Read generated code first: find every call that can delete a file.

    10 min

  3. Testing code an AI wrote, part 2: it installs fine, but its own tests fail

    Installing isn't working: its own tests couldn't even start.

    5 min

  4. Testing code an AI wrote, part 3: one fix away from disaster

    A one-line fix can delete the last copy of a file; tests must catch it.

    6 min

  5. Testing code an AI wrote, part 4: the web UI's front door

    A local web page needs a real Host check, or DNS rebinding gets in.

    6 min

Older AI and data posts, from TF-IDF to RAG, are on the AI reading map. AI on this blog: a reading map

All learning paths