EDGE FDE

Intermediate

How an LLM is built

After this course you can explain, in plain English, how an LLM learns, reads text, trains, and gets cheaper. You will also have small pieces of code you can run.

We walk seven public repos by Andrej Karpathy, in the order Hao Hoang recommends. Each lesson starts with the question it answers, then an everyday picture, then a small example with real numbers, then the code, then what the official repo does at full size.

Inspiration

This course is inspired by a LinkedIn post by Hao Hoang, published 24 November 2026 at 23:20 Europe/London (UTC). Hao screens AI engineer candidates. The gap he sees most is between calling an LLM and knowing how one is built. He pointed to seven free repos by Andrej Karpathy and gave the order to take them in.

The ordering rule is Hao's: each stop answers the question the one before it leaves open. This course follows that rule. The repos, lectures, papers, and numbers come from those primary sources, not from the post alone.

How we will teach

You do not need to be a machine learning person to start. You do need comfortable Python, and a willingness to do a little arithmetic. Each new word is explained before we use it. When we use an everyday comparison, we also say where that picture stops being accurate.

The seven stops

First we learn how a tiny network improves itself.

flowchart LR
  S1["1. How a network learns"] --> S2["2. Eight lectures that reach GPT"]
      

Then we learn what the model actually reads, and what one training loop looks like.

flowchart LR
  S1["1. Learning"] --> S2["2. Lectures"]
  S2 --> S3["3. Tokens"]
  S3 --> S4["4. The training loop"]
      

Then we look under the Python tools, at today's cost, and at an agent that can run the loop overnight.

flowchart LR
  S1["1. Learning"] --> S2["2. Lectures"]
  S2 --> S3["3. Tokens"]
  S3 --> S4["4. Training loop"]
  S4 --> S5["5. Under PyTorch"]
  S5 --> S6["6. Cost today"]
  S6 --> S7["7. An agent runs the loop"]
      

What you'll learn

Lessons

  1. How a network learns
  2. Eight lectures that reach GPT
  3. What the model actually reads
  4. What a full training loop looks like
  5. What PyTorch is doing for you
  6. What the whole pipeline costs now
  7. When an agent runs the loop

Key concepts

Takeaways

Agent briefs