Rotating 10% of Dimensions Cuts RoPE Memory 10x Without Losing Quality
A new empirical study shows applying rotary embeddings to just 10% of dimensions matches full RoPE performance while cutting cache memory by 10x.
ProTakeaways
- Applying RoPE to only 10% of hidden dimensions matches full-RoPE convergence and final loss.
- Yields up to 10x memory savings on the RoPE sine/cosine cache, critical at million-token contexts.
- Results hold across 1B and 8B models, FineWeb and FineWeb-Edu, sequence lengths from 1K to 8K.
- Pure NoPE hits unrecoverable loss spikes at scale; partial RoPE prevents them better than QK-Norm.
- Prior 25% default came from a 124M model on 82M tokens; this is the first systematic study at scale.
- Training code released at aflah02/Partial_RoPE_Analysis, built on GPT-NeoX.
Rotary Positional Embedding (RoPE) has become the default way transformers encode token order, but a fundamental knob has been set almost arbitrarily across model families. A new empirical study argues that most models are rotating far more dimensions than they need to, and that dialing that fraction down produces order-of-magnitude memory savings with no measurable loss in quality.
The authors of Fractional Rotation, Full Potential? pretrained models from scratch across a grid of rotary fractions and found a clean result: applying RoPE to only a small fraction of dimensions (around 10%) achieves convergence comparable to using full RoPE, and this holds across model size, sequence length, dataset quality, and transformer block design.
The knob nobody tuned
RoPE rotates pairs of query and key channels by angles derived from token position, encoding relative position directly inside attention. The fraction of channels that get rotated has drifted wildly between labs. GPT-J, GPT-NeoX and Pythia rotated only 25% of dimensions, while the LLaMA series and most of the Qwen series rotate all of them. Qwen3-Next recently moved back to 25%, claiming better extrapolation, and Nemotron-4-340B uses 50% while Phi-2 uses 40%.
No prior study had systematically examined how partial RoPE influences convergence, training dynamics, or efficiency. The one commonly cited data point behind the 25% number came from a small ablation on a 124M-parameter GPT2 trained on 82M tokens, hardly conclusive for today's frontier models.
Why the fraction matters at long context
The RoPE sine/cosine cache stores precomputed rotation values, and its size grows linearly with sequence length and head dimension. That is negligible at 2K context but painful at 1M or 10M. The paper reports up to 10x memory savings over the standard RoPE cache, while achieving comparable final loss. In multi-GPU setups the pain compounds: replicating the cache wastes VRAM on every device, and sharding it introduces communication overhead.
This is not a hypothetical concern. Gemini 1.5 and Llama 4 Scout report context windows of up to 10 million tokens, and Magic has demonstrated 100 million token contexts, so implementation details that were rounding errors a year ago now dominate memory budgets.
The experimental sweep
The authors pretrained models across six RoPE fractions from 0% (NoPE) to 100%, plus a minimal 2-channel setting. The setup covered:
- Architectures: Llama-3.2-1B and Llama-3.1-8B (sequential attention) and Pythia-1B (parallel attention)
- Datasets: the 100B-token FineWeb subset and the higher-quality FineWeb-Edu
- Sequence lengths: 1024, 2048, 4096, and 8192 tokens
- Evaluation: EleutherAI's LM Evaluation Harness on the Pythia benchmark suite plus PubMedQA
Two distinct convergence bands emerged. Models with 10% or more RoPE cluster together with the same final loss. Models with essentially no positional signal (NoPE or 2 channels) sit in a separate, higher-loss band. On MCQ benchmarks, on 9 out of 10 benchmarks, all RoPE variants exhibit largely similar performance, and LAMBADA perplexity drops sharply once you cross the 10% threshold and flattens thereafter.
The NoPE instability catch
Cranking the fraction all the way to zero, however, breaks things. Parallel-attention models trained without any positional encoding hit unrecoverable loss spikes tens of billions of tokens into training, and sequential models spike at long context. The authors ruled out random seeds and learning-rate choice as causes, then found two fixes:
- QK-Norm, which normalizes queries and keys before the attention dot product, eliminates the spikes but converges to a higher loss than partial RoPE.
- Applying even a tiny fraction of RoPE prevents the instability entirely and reaches the lower loss band.
The takeaway for practitioners is that partial RoPE is a strictly better fix than QK-Norm for this failure mode, though the two can be stacked as a safety belt.
What is actually new here
The headline is memory efficiency, but the deeper contribution is the first systematic ablation of a hyperparameter that has been chosen by convention for years. The prior justification for 25% came from tiny experiments; this work runs the ablation at 1B and 8B parameters over 100B tokens. It also documents a failure mode of NoPE that only appears at scale, which matters given renewed interest in parallel attention blocks for efficiency reasons.
When to use it
Partial RoPE is most useful when you are training or serving long-context models where RoPE cache memory shows up in your VRAM budget, when you are running on edge devices with tight memory, or when you are designing a new architecture and want a defensible default. It is less relevant if you are working at short context lengths where the cache is a rounding error anyway. And if you are considering pure NoPE for its simplicity, the results here are a warning: keep at least a small fraction of dimensions rotated, or plan on QK-Norm as a stabilizer.
All training code is available in the Partial_RoPE_Analysis repository, and the authors say they will release models, optimizer states, intermediate checkpoints, config files on acceptance. For teams already using GPT-NeoX, partial RoPE is a supported first-class option; for other frameworks it may require a small patch to the rotary embedding module.