Longer Contexts with Rotary Positions
An interactive live film: rotary position dials, the angles each one saw in training, and what position interpolation and a larger base do beyond the training length.
Narration
Rotary position encoding turns each pair of coordinates by an angle: the position m times a frequency theta i. Each dial is one pair, from the fastest on the left to the slowest on the right.
A model trained on four thousand and ninety six positions has seen, on each dial, only the shaded range of angles. The fast dials turn many times and see every angle; the slow dials on the right never complete a turn.
The rest of the narration is in the book's Companion.
More from Chapter 10
Interactive2:11Tensor Parallelism: Block Products Across DevicesChapter 10
Preview1:24Block Diagonal Matrices: Separate WorldsChapter 10
Preview1:28Block Multiplication: Blocks Multiply Like NumbersChapter 10
Preview2:20Woodbury Identity: a Rank-One Update of the InverseChapter 10
Preview1:40Schur Complement: What Is Left After Minimizing Out a BlockChapter 10
Preview1:32Kronecker Product and the Vectorization IdentityChapter 10
Preview1:40Block Cholesky: Two Steps to a CircleChapter 10
Preview1:30Online Softmax, One Tile at a TimeChapter 10
Preview1:56Mixture of Experts: Routing Tokens to a Few BlocksChapter 10