9/23
Part 2 of 6 · Shapes in a modelWatch
Watch · 7 min

Karpathy writes the smallest language model as a class: an nn.Embedding turns (B, T) ids into (B, T, C) scores, he reshapes them to (B*T, C) for the loss, and he predicts the starting loss, about 4.17.

Let's build GPT: from scratch, in code, spelled out. · Andrej Karpathy · Jan 2023YouTube