25/25
Part 6 of 6 · Follow-upsCheck yourself
Check yourself
5 questions
1.The head size goes from 64 to 256 and you forgot the 1/√d scale. What happens to the attention weights?
2.
scoreshas shape(B, H, T, T). Which axis does the softmax run over?3.You apply the causal mask by multiplying the softmax output by a lower-triangular matrix of ones. What breaks?
4.Why subtract the row max before exponentiating?
5.At 8,192 tokens of context, how big is one head's fp16 score matrix for one sequence?
That's the lesson.Next lesson: Multi-head causal self-attention
Now the problem this lesson builds to: 01 Scaled dot-product attention (NumPy)Practice it