This work modify RoPE by learning a scalar per frequency, treating frequencies as learnable parameters rather than hyperparameters, and observes and analyzes the emergence of a high-norm, positional LeRoPE band.
Abstract
Rotary Positional Encodings (RoPE) are currently the most popular positional encodings used in modern language models. RoPE rotates two-dimensional chunks of query and key vectors, operating as a function of their relative positional offset. The position-wise rates of rotation in RoPE typically follow a geometric sequence specified by a fixed base-frequency hyperparameter. Prior work has improved performance by either increasing this parameter to slow rotation or by applying RoPE to only a subset of QK dimensions. In this work we modify RoPE by learning a scalar per frequency, treating frequencies as learnable parameters rather than hyperparameters. We validate Learned RoPE by training a ladder of language models from scratch, ranging from 52M to 2.5B parameters. We observe and analyze the emergence of a high-norm, positional LeRoPE band. LeRoPE consistently outperforms RoPE and partial RoPE across all scales, with RoPE requiring 3.4% more compute (FLOPs) to match LeRoPE at the largest scale.
This paper derives the specific class of matrices where this cancellation is exact under RoPE if and only if $M$ commutes with RoPE's per-position rotation, and derives the specific class of matrices where this holds.
The per-RoPE-wavelength distance window is proposed: it prunes the query--key inner-product terms beyond a wavelength-proportional distance within each model's native context length, and examines absolute scores on long-context benchmarks such as RULER, OpenAI-MRCR, LongCodeQA, and $\infty$Bench: they are broadly prese...
Shun-ichiro Hayashi, Daichi Mukunoki, Tetsuya Hoshino et al.· 1 citation
DyPAM (Dynamic Positional Attention Modulation) is proposed, a PEFT method that adapts how positional information contributes to attention by operating directly on the query and key representations, performing fine-grained adaptation of positional attention aligned with the RoPE-induced structure without modifying the...
Dayan Pan, Jing-Yuan Wang, Xie Yu· Proceedings of the 32nd ACM...· 0 citations
It is proved that this construction preserves local RoPE exactly, leaves the attention comparison between two fixed tokens unchanged when other units are inserted or reordered, and does not create new relative rotations merely because more units are added.
It is discovered that outlier dominance grows with model scale: full replacement at K=128 degrades GPT-2 small but catastrophically degrades Mistral-7B by +1,134,279%, while selective replacement at p=99% rescues both models to under +15%.
This work investigates the expressiveness of general query/key rotations and finds that any normalized continuous positive-definite attention modulation function can be approximated by random rotations induced by its own Fourier transform, which is term Random Fourier Rotations.
Yi-Wen Chen, Joshua Ainslie, Krzysztof Choromanski et al.· arXiv.org· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.