arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.00071cs.CLcs.AIcs.LG
收藏

YaRN: 大语言模型高效上下文窗口扩展

YaRN: Efficient Context Window Extension of Large Language Models

EleutherAI;University of Geneva(日内瓦大学)

Bowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico Shippole

AI总结:

YaRN通过高效方法扩展大语言模型的上下文窗口,实现更长上下文的利用与扩展,超越现有最先进水平。

摘要:

旋转位置嵌入(RoPE)已被证明在基于transformer的语言模型中能够有效编码位置信息。然而,这些模型无法泛化到它们训练时的序列长度之外。我们提出了YaRN(Yet another RoPE扩展方法),一种计算高效的扩展此类模型上下文窗口的方法,仅需比先前方法少10倍的token和2.5倍的训练步骤。使用YaRN,我们展示了LLaMA模型可以有效地利用并扩展到远超其原始预训练允许的上下文长度,同时在上下文窗口扩展方面超越了先前的最先进水平。此外,我们还证明YaRN具备超越微调数据集有限上下文的能力。代码可在https://github.com/jquesnelle/yarn上获取。

英文摘要:

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

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑