← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: rope-extrapolation

RoPE Extrapolation PI/NTK/YaRN

RoPE 外推方案 PI/NTK/YaRN
🎯Core Definition
three ways to extend RoPE from the training length to longer contexts at low cost: PI (Position Interpolation) linearly rescales position mm to m/sm / s (ss = scaling factor); NTK-aware changes the rotary base to θ=10000⋅sdd−2\theta = 10000 \cdot s^{\frac{d}{d-2}} so high-frequency dims stay mostly uninterpolated while low-frequency dims stretch; YaRN (NTK-by-parts + temperature) interpolates only dims whose wavelength is much longer than the context window, keeps high-frequency dims untouched, and divides attention logits by a temperature t≈st \approx \sqrt{s}.
💡Use Cases
cheap post-training context extension, e.g. LLaMA-2 from 4K to 32K/64K/128K; YaRN is currently the most used and best-performing option (adopted by many long-context open models), and comparing the three is a classic interview question.
⚡Key Problems Solved
naive extrapolation misreads the rotation periods of low-frequency dims beyond the trained length, collapsing perplexity; plain PI compresses every dimension uniformly, destroying high-frequency resolution and short-range dependencies; NTK-by-parts interpolates only dims with wavelength larger than the window, preserving local resolution, and YaRN adds a temperature to fix attention sharpness — at 16x extension it stays close to original perplexity, making it the best in quality and stability.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of RoPE Extrapolation PI/NTK/YaRN.
Use Cases
In production engineering, what are the primary use cases for RoPE Extrapolation PI/NTK/YaRN and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Why does direct RoPE extrapolation fail (periodic ambiguity, frequencies beyond training coverage)?
2
How PI works and its main flaw (uniform scaling loses high-frequency resolution)?
3
Difference between NTK-aware and NTK-by-parts? The wavelength criterion?
4
What are YaRN's two components? Role of temperature t≈st \approx \sqrt{s}?
5
How to evaluate extrapolation methods (long-doc perplexity + needle precision recall)?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "RoPE Extrapolation PI/NTK/YaRN"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardPositional Encoding RoPE/ALiBiNext Card →FFN & SwiGLU

🔗 More LLMs Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/LLM/card/rope-extrapolation