Fixed-Period Integer-Phase Rotary Position Encoding via Roots of Unity
We describe an implementation-oriented formulation of rotary position encoding (RoPE) in which all angular frequencies are quantized onto a fixed integer phase lattice. For a period P, each frequency is represented by an integer number of cycles k_i per period, and the phase at position p is computed as (k_i p) mod P. This gives every frequency pair the same exact period P and makes phase-index arithmetic modular and reproducible. Choosing P = 2^24 enables reduction with a bitmask, provides a period above ten million positions, and keeps every phase index exactly representable in FP32. The formulation concerns phase indexing, not the numerical exactness of trigonometric or floating-point operations. Frequency quantization, reduced-precision rotation, and empirical model quality remain separate issues. This note specifies the construction, discusses its practical properties and limitations, and proposes an evaluation protocol; it does not report improved long-context performance or claim conceptual novelty for rotary encodings or modular phase arithmetic.
Authors
- Oleg Batomunkuev
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-30
- DOI
- https://doi.org/10.5281/zenodo.24680387
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00