LLMs & text generation

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

Andrej Karpathy · 116 min · 8.3M views. Beginner-level workshop covering LLMs & text generation.

About this tutorial

A 116-minute beginner workshop from Andrej Karpathy on LLMs & text generation. The creator's 24-chapter syllabus moves from fundamentals to hands-on work, so you can jump straight to the section you need. 8.3M views and 172K likes.

Course outline

  1. 00:00:00intro: ChatGPT, Transformers, nanoGPT, Shakespeare
  2. 00:07:52reading and exploring the data
  3. 00:09:28tokenization, train/val split
  4. 00:14:27data loader: batches of chunks of data
  5. 00:22:11simplest baseline: bigram language model, loss, generation
  6. 00:34:53training the bigram model
  7. 00:38:00port our code to a script
  8. 00:42:13version 1: averaging past context with for loops, the weakest form of aggregation
  9. 00:47:11the trick in self-attention: matrix multiply as weighted aggregation
  10. 00:51:54version 2: using matrix multiply
  11. 00:54:42version 3: adding softmax
  12. 00:58:26minor code cleanup

+12

Channel
Andrej Karpathy
Duration
1:56:20
views
8.3M
Likes
172K
Comments
3K
Level
Beginner
Format
Workshop
Topic
LLMs & text generation

Curated from public YouTube courses. Playback and attribution remain on YouTube.

More tutorials in this topic