Skip to content
  • Video
  • YouTube
  • 1 h 56 min

Let's build GPT: from scratch, in code, spelled out.

About this

We build a Generatively Pretrained Transformer (GPT), following the paper "Attention is All You Need" and OpenAI's GPT-2 / GPT-3. We talk about connections to ChatGPT, which has taken the world by storm.

Continue at source

Key topics

Chapters

  1. 0:00intro: ChatGPT, Transformers, nanoGPT, Shakespeare
  2. 7:52reading and exploring the data
  3. 9:28tokenization, train/val split
  4. 14:27data loader: batches of chunks of data
  5. 22:11simplest baseline: bigram language model, loss, generation
  6. 34:53training the bigram model
  7. 38:00port our code to a script
  8. 42:13version 1: averaging past context with for loops, the weakest form of aggregation
All 30 chapters on YouTube
Report or remove