- Video
- YouTube
- 4 h 1 min
Let's reproduce GPT-2 (124M)
About this
Video lecture by Andrej Karpathy on his own YouTube channel.
Continue at sourceKey topics
Chapters
- 0:00intro: Let’s reproduce GPT-2 (124M)
- 3:39exploring the GPT-2 (124M) OpenAI checkpoint
- 13:47SECTION 1: implementing the GPT-2 nn.Module
- 28:08loading the huggingface/GPT-2 parameters
- 31:00implementing the forward pass to get logits
- 33:31sampling init, prefix tokens, tokenization
- 37:02sampling loop
- 41:47sample, auto-detect the device
Show notes (excerpt)
We reproduce the GPT-2 (124M) from scratch. This video covers the whole process: First we build the GPT-2 network, then we optimize its training to be really fast, then we set up the training run following the GPT-2 and GPT-3 paper and their hyperparameters, then we hit run, and come back the next…
Full show notes on YouTube



