the.ai

Attention / Position

verified

Rotary Position Embedding

Rather than adding position to a token's representation, RoPE rotates it — by an angle proportional to where it sits. Two tokens dotted together then depend only on the angle between them, which is the distance separating them. Relative position falls out of the geometry instead of being learned.

Viz primitive · update-spectrumfrequencies = 8 · bars = 8

8 values. The left group decays steeply; the right group is 67% of the way to flat, and reads flatter than the left.

Rotation rates across dimension pairs, fastest first. Drag the count to see the spread of scales a position is encoded across.

8

Reviewed by opendroid · 2026-08-04

  • arXiv:2104.09864 — RoFormer: Enhanced Transformer with Rotary Position Embedding