Sinusoidal Positional Encodings

Replace the binary staircase with smooth sine and cosine waves whose frequencies slow down across the dimensions. The famous formula is just that idea — and the sine/cosine pairing hides a rotation that makes relative position easy.

Large Language Models: From Transformers to Frontier Models

Sign up free to read the rest of this lesson