Embeddings and Positional Encoding
1 / 6
V, embedding dim DW has shape (V, D)The lookup path contributes only to selected rows. Repeated IDs accumulate into the same parameters. Other uses, optimizer state, or weight decay can affect unused rows.
P[pos]P shape: (Tmax, D)input[i] = token_emb[i] + pos_emb[i]
Shape: (T, D)
We use character-level tokens in this pack for simplicity.