YaRN: 大規模言語モデルの効率的なコンテキストウィンドウ拡張
YaRN: Efficient Context Window Extension of Large Language Models
August 31, 2023
著者: Bowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico Shippole
cs.AI
要旨
回転位置埋め込み(RoPE)は、トランスフォーマーベースの言語モデルにおいて位置情報を効果的に符号化することが示されている。しかし、これらのモデルは、訓練されたシーケンス長を超える一般化に失敗する。本論文では、YaRN(Yet another RoPE extensioN method)を提案する。これは、従来の手法と比べて10倍少ないトークン数と2.5倍少ない訓練ステップで、モデルのコンテキストウィンドウを拡張する計算効率の良い手法である。YaRNを用いることで、LLaMAモデルが、元の事前訓練で許容される範囲をはるかに超えるコンテキスト長を効果的に利用し、外挿できることを示す。さらに、YaRNは、微調整データセットの限られたコンテキストを超えて外挿する能力を有することを実証する。我々は、64kおよび128kのコンテキストウィンドウでYaRNを用いて微調整したLlama 2 7B/13Bのチェックポイントをhttps://github.com/jquesnelle/yarnで公開する。
English
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. We publish the checkpoints of Llama 2 7B/13B fine-tuned
using YaRN with 64k and 128k context windows at
https://github.com/jquesnelle/yarn