17/23
Part 5 of 6 · Hide the futureWatch
Watch · 11 min
The weighted average of the past as one matrix multiply, first with a lower triangle normalized row by row, then with the same weights from a softmax over scores masked to -inf. Around 57:00 he says past where he means future, a slip his video description corrects.
Let's build GPT: from scratch, in code, spelled out. · Andrej Karpathy · Jan 2023YouTube