diff --git a/train_gpt2.c b/train_gpt2.c index 54c939f..70e80cd 100644 --- a/train_gpt2.c +++ b/train_gpt2.c @@ -221,6 +221,9 @@ void attention_forward(float* out, float* preatt, float* att, // preatt, att are (B, NH, T, T). NH = number of heads, T = sequence length // that holds the pre-attention and post-attention scores (used in backward) // output is (B, T, C) + // attention is the only layer that mixes information across time + // every other operation is applied at every (b,t) position independently + // (and of course, no layer mixes information across batch) int C3 = C*3; int hs = C / NH; // head size float scale = 1.0 / sqrtf(hs);