YaRN: Efficient Context Window Extension of Large Language Models
Abstract
Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.
Rotary Position Embeddings (RoPE) have been shown to effectively encode positional information in transformer-based language models. However, these models fail to generalize past the sequence length they were trained on. We present YaRN (Yet another RoPE extensioN method), a compute-efficient method to extend the context window of such models, requiring 10x less tokens and 2.5x less training steps than previous methods. Using YaRN, we show that LLaMA models can effectively utilize and extrapolate to context lengths much longer than their original pre-training would allow, while also surpassing previous the state-of-the-art at context window extension. In addition, we demonstrate that YaRN exhibits the capability to extrapolate beyond the limited context of a fine-tuning dataset. Code is available at https://github.com/jquesnelle/yarn
Results and benchmarks
Rotary Position Embeddings (RoPE) have been shown to effectively encode positional information in transformer-based language models.
Benchmark evidence is limited
Evidence graph: 3 refs, 3 links.
Utility signals: depth 70/100, grounding 75/100, status medium.
Implementation
No direct implementation yet
Maintained implementation evidence is not confirmed for this paper yet.
Use the implementation status and reproduction sections for the current action plan.
No verified maintained repo yet
There is no verified maintained implementation yet. Use this baseline plan to decide whether to prototype now or defer.
- No maintained paper-verified implementation was found; start with the closest related repositories below.
- Compare repo methods against the paper equations/algorithm before trusting metrics.
- Create a minimal baseline implementation from the paper and use adjacent repos as references.
Time to first repro: a few days
jquesnelle/yarn is the closest maintained adjacent implementation (Matches contextual method/domain keyword: yarn). It is not paper-verified; validate algorithm and evaluation setup against the paper before trusting reported metrics. Community adoption signal: 1773 GitHub stars.
- Adjacent implementations are not paper-verified
- Recommended repository is adjacent and not paper-verified.
- Adjacent implementation match confidence is low.
Reproduction readiness
No repo
No verified implementation available
- No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Validation caveat
Framework baselines
- Hugging Face Transformers training guide
Modern transformer training baseline.
- PyTorch nn.Transformer docs
Reference transformer building block implementation.
Repositories and ecosystem
Closest related implementations
These are not paper-verified. Use them as reference points when no direct implementation is available.
- jquesnelle/yarn Adjacent · Confidence: Low · 1,773 stars
Matches contextual method/domain keyword: yarn
No additional verified repositories beyond the primary recommendation.
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Models
Datasets
Spaces
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
18
Citations
0
References
Tasks
Yarn, Rope, Computer science, Extension (predicate logic), ENCODE, Context (archaeology), Window (computing), Sequence (biology)
Methods
Transformer, Algorithm
Domains
Artificial intelligence
Related papers
- Clarification of the Stretching Process of Newly-Developed Open-End Rotor-Spun Hollow YarnSearch on Paper2Code
2012 · Semantic similarity
- The Influence of Spun Yarn Fittings on Yarn QualitySearch on Paper2Code
2002 · Semantic similarity
- Design of yarn detection passage of yarn clearer of capacitance typeSearch on Paper2Code
2008 · Semantic similarity
- DISCUSSION ON TWIST OF SIRO-SPUN YARNSearch on Paper2Code
2003 · Semantic similarity
- Regressional Optimizations of Cotton Spun Yarn by Controlling its Process ParametersSearch on Paper2Code
2021 · Semantic similarity
- Yarn hairiness versus quality of yarnSearch on Paper2Code
2013 · Semantic similarity
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.