- 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 sourceKey topics
Chapters
- 0:00intro: ChatGPT, Transformers, nanoGPT, Shakespeare
- 7:52reading and exploring the data
- 9:28tokenization, train/val split
- 14:27data loader: batches of chunks of data
- 22:11simplest baseline: bigram language model, loss, generation
- 34:53training the bigram model
- 38:00port our code to a script
- 42:13version 1: averaging past context with for loops, the weakest form of aggregation




