Chapter 035 / 5
Attention Efficiency and Long Context
Implement YaRN RoPE scaling (frequency grouping + attention-logit scaling) and demonstrate
Super-hard
Implement YaRN RoPE scaling (frequency grouping + attention-logit scaling) and demonstrate length extrapolation on a toy retrieval task.
Target interface
yarn_freqs(d, base=10000.0, L=256, scale=8.0, alpha=1.0, beta=32.0)Complete the starter code in the editor. Any correct approach is accepted.
Hints0 / 2
Reference solution
Your own code stays in the editor.