Maths for LLMs
Positional embeddings and vector addition
The maths under positional embeddings, from zero: a token becomes what it is plus where it sits, and that 'plus' is a literal element-wise sum of two vectors. Why the differently-sized tables never actually clash, worked by hand, with slides.
16 Aug 2026
·
5 min read
·71 views
LLMs, the whole thing
·
Part 5
The Lookup Table That Learns: Token Embeddings and the Order-Blind Trap
The finale of chapter 2: how meaningless token IDs become the tensor attention actually consumes. It comes down to two lookup tables and one addition - a learnable embedding table for meaning, and a second, position-indexed table for order.
16 Aug 2026
·
6 min read
·118 views