Instead of forcing rotary attention to extrapolate into unseen position angles where attention scores explode, Position Interpolation (PI) linearly divides every token index by L' / L, extending pretrained LLaMA models from 2,048 to 32,768 tokens in just 1,000 fine-tuning steps.
- Extrapolation fails catastrophically: Evaluating a 2,048-token LLaMA-7B model directly on 4K to 32K sequences drives PG19 perplexity above 1,000, and even 10,000 steps of direct long-context fine-tuning only stretches its effective passkey window from 2,048 to 2,560 tokens.
- 600x tighter theoretical bound: Chen and colleagues prove that interpolating between pretrained integer grid points bounds attention-score error roughly 600x tighter than RoPE’s extrapolation bound, keeping scores smooth without changing weights or attention code.
- 200 steps to full passkey reach: Fine-tuning LLaMA 7B through 65B on the Pile reaches full
k_max = 32,768passkey retrieval within 200 to 1,000 steps and reduces PG19 perplexity from 7.23 (at 2K) down to 6.77 (at 32K) on LLaMA-7B. - Local resolution tradeoff: Compressing positions 16x crowds neighboring tokens, cutting short-context
BoolQaccuracy on LLaMA-7B from 76.1% to 64.7% at 32K (under 2% drop at 8K).
Why extrapolation blows up and interpolation stays bounded
In Rotary Position Embeddings (RoPE), query-key attention scores depend on relative distance s = m - n through a weighted sum of d/2 complex sinusoids with frequencies theta_j = 10000^(-2j/d). Because d = 128 trigonometric basis functions act as a universal approximator, learned query-key coefficients can keep attention scores small inside [0, 2048] yet spike past 8,000 as soon as s > 2048. That is why a model trained at L = 2048 fails to answer a question at position 3,000 even when the evidence sits just 100 tokens earlier at position 2,900.
Position Interpolation avoids out-of-range angles by replacing f(x, m) with f(x, m * L / L'), linearly mapping [0, L') back into [0, L). Under Theorem 2.1, for any interpolated fractional position between pretrained integers s_1 and s_2, deviation from linear interpolation is bounded by (d * max_j |h_j|) / (32 * ln(10000)), roughly d * max_j |h_j| / 294.73, at least ~600x smaller than RoPE’s extrapolation upper bound.
How extended LLaMA models behave at 8K to 32K
Chen et al. fine-tuned LLaMA 7B, 13B, 33B, and 65B on the Pile (with FlashAttention, FSDP, zero weight decay, and lr = 2e-5 for 7B/13B or 1e-5 for 33B/65B) for 1,000 steps, comparing against 10,000-step direct fine-tuning without scaling.
On PG19 books and ArXiv Proof-pile, perplexity dropped steadily as evaluation context widened. For LLaMA-7B extended to 32,768, PG19 perplexity fell from 7.23 (2K window) to 6.91 (8K) and 6.77 (32K), while LLaMA-13B fell from 6.54 to 6.09. Even at step 0 before any fine-tuning, PI-8K on LLaMA-7B scored 16.10 perplexity on PG19 rather than blowing up above 1,000, and beat the original 7.20 baseline after just 200 steps. Fine-tuned for 10 epochs on 16K GovReport long-document summarization, extended LLaMA-7B reached 60.0 ROUGE-1 (competitive with CoLT5 Base at 58.7 and CoLT5 XL at 61.3).
Caveats and builder takeaway
Three constraints limit uniform Position Interpolation in practice. First, scaling every rotary frequency identically by L / L' blurs fine-grained short-range positions: short-context BoolQ fell from 76.1% to 64.7% at 32K, and ArXiv Proof-pile perplexity on the 32K-extended 7B model worsened from 2.24 at 16K to 2.48 at 32K (2.15 to 2.35 on 13B). Follow-up methods like YaRN fix this by interpolating low frequencies while leaving high-frequency local dimensions untouched. Second, the passkey benchmark only required a 20% retrieval threshold inside repetitive filler text, which proves attention reach rather than multi-hop reasoning across 32K tokens. Third, unlike ALiBi or sparse attention, PI leaves quadratic attention and linear KV-cache memory untouched, so 32K inference still pays 16x the KV-cache footprint of 2K.
Use pure Position Interpolation when you need a zero-architecture-change 4x extension (2K to 8K) on an existing RoPE checkpoint with minimal fine-tuning; for 16x+ windows or strict short-context retention, combine it with frequency-band scaling such as YaRN.


