Skip to content
  • 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 source

Key topics

Chapters

  1. 0:00intro: Let’s reproduce GPT-2 (124M)
  2. 3:39exploring the GPT-2 (124M) OpenAI checkpoint
  3. 13:47SECTION 1: implementing the GPT-2 nn.Module
  4. 28:08loading the huggingface/GPT-2 parameters
  5. 31:00implementing the forward pass to get logits
  6. 33:31sampling init, prefix tokens, tokenization
  7. 37:02sampling loop
  8. 41:47sample, auto-detect the device
All 31 chapters on YouTube
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
Report or remove