Length Extrapolation
PremiumNTK-aware Scaling, YaRN, and other methods to let RoPE handle longer sequences
Get code accessThe Rotation View: Understanding Extrapolation
Suppose the model is trained with max_seq_len = 4096. What happens if inference length is 8192?
A common intuition is “the position index is out of range, so it is OOD.” But that is imprecise. The position index is unbounded, while RoPE position embeddings are bounded trigonometric functions. The model interacts with embeddings, not indices. To understand OOD, we must analyze the embeddings.
Log in to continue reading
This is premium content. Please log in to access the full article.
CookLLM Docs