Skip to content
OpenTrain AIFor AI Companies

YaRN: Efficient Context Window Extension of Large Language Models

Bowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippolePublished Aug 31, 2023
DOI Publisher
Researcher verdict
Context only
Use as context only
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
1
Review before use

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

Freshness tier: cold
Rotary Position Embeddings (RoPE) have been shown to effectively encode positional information in transformer-based language models.

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.

Implementation evidence summary
Confidence: low

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.

Reproduction risks
  • Adjacent implementations are not paper-verified
  • Recommended repository is adjacent and not paper-verified.
  • Adjacent implementation match confidence is low.

Reproduction readiness

Time to first repro: days
Last checked: Aug 23, 2026

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.

Framework baselines

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.

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

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.