YaRN: Efficient Context Window Extension of Large Language Models

AI-generated keywords: YaRN Context Window Extension Large Language Models Transformer-based models LLaMA

AI-generated Key Points

  • YaRN introduced as a novel method for extending the context window of transformer-based language models
  • Efficiency of YaRN highlighted by achieving extension with fewer tokens and training steps compared to existing techniques
  • Study evaluates YaRN at different scale factors (s = 16, 32) and compares its performance against other open-source models fine-tuned from Llama-2
  • Results show successful extension of effective context size up to 128k, surpassing previous methods
  • YaRN (s = 32) models exhibit decreasing perplexity even at 128k despite being fine-tuned on a smaller dataset, demonstrating robust generalization capabilities
  • Evaluations on untruncated GovReport documents confirm strong performance on long sequences without dynamic scaling
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Bowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico Shippole

License: CC BY 4.0

Abstract: 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. The models fine-tuned using YaRN has been made available and reproduced online up to 128k context length at https://github.com/jquesnelle/yarn

Submitted to arXiv on 31 Aug. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2309.00071v2

In their paper "YaRN: Efficient Context Window Extension of Large Language Models," the authors introduce YaRN as a novel method for extending the context window of transformer-based language models. This allows these models to effectively extrapolate to longer context lengths and outperform previous state-of-the-art methods. The efficiency of YaRN is highlighted by its ability to achieve this extension with significantly fewer tokens and training steps compared to existing techniques. The study evaluates YaRN at different scale factors (s = 16, 32) and compares its performance against other open-source models fine-tuned from Llama-2 and extended to over 32k context windows. Results show that YaRN interpolation successfully extends the effective context size of Llama-2 up to 128k, surpassing previous methods. Notably, the YaRN (s = 32) models exhibit decreasing perplexity even at 128k despite being fine-tuned on a smaller dataset of only 64k tokens, demonstrating robust generalization capabilities. Additionally, evaluations on untruncated GovReport documents confirm that fine-tuning with YaRN yields strong performance on long sequences without dynamic scaling. Overall, these results showcase the effectiveness and efficiency of YaRN in extending the context window of large language models for improved performance on tasks requiring longer contextual information.
Created on 29 Apr. 2025

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.