YaRN: Extending LLM Context Windows Efficiently
Description
This academic paper introduces YaRN (Yet another RoPE extensioN method), a novel and efficient technique for extending the context window of large language models (LLMs) that utilize Rotary Position Embeddings (RoPE). The authors demonstrate that YaRN significantly reduces the computational resources needed for this extension, requiring substantially fewer tokens and training steps compared to previous methods like Position Interpolation (PI) and NTK-aware interpolation. Through various experiments, including long sequence language modeling, passkey retrieval, and standardized benchmarks, the paper shows that YaRN-fine-tuned models, such as those based on LLaMA and Mistral architectures, can effectively extrapolate to context lengths much longer than their original training while maintaining or surpassing the performance of existing context extension techniques and preserving original model capabilities. The research highlights YaRN's efficiency, strong generalization capabilities, and potential for transfer learning in resource-constrained environments.