LongRecipe: Recipe for Efficient Long Context Generalization in Large Language Models

要約

大規模言語モデル (LLM) は、事前トレーニング中の有効なコンテキスト ウィンドウ サイズが制限されているため、長いコンテキストのタスクを処理する際に大きな課題に直面しており、拡張されたシーケンスを一般化する能力が制限されています。
一方、事前トレーニング後の LLM のコンテキスト ウィンドウの拡張は、非常にリソースを大量に消費します。
これに対処するために、影響力のあるトークン分析、位置インデックス変換、トレーニング最適化戦略など、LLM のコンテキスト ウィンドウを拡張するための効率的なトレーニング戦略である LongRecipe を導入します。
トレーニング効率を維持しながら長いシーケンスの入力をシミュレートし、長距離の依存関係に対するモデルの理解を大幅に向上させます。
3 種類の LLM に関する実験では、LongRecipe がターゲット コンテキスト ウィンドウ サイズの 30% のみを必要としながら長いシーケンスを利用でき、完全なシーケンス トレーニングと比較して計算トレーニング リソースを 85% 以上削減できることが示されています。
さらに、LongRecipe は一般タスクにおける元の LLM の機能も保持します。
最終的には、オープンソース LLM の有効コンテキスト ウィンドウを 8k から 128k に拡張し、80G メモリを備えた単一の GPU を使用した 1 日の専用トレーニングで GPT-4 に近いパフォーマンスを達成できます。
コードは https://github.com/zhiyuanhubj/LongRecipe で公開されています。

要約(オリジナル)

Large language models (LLMs) face significant challenges in handling long-context tasks because of their limited effective context window size during pretraining, which restricts their ability to generalize over extended sequences. Meanwhile, extending the context window in LLMs through post-pretraining is highly resource-intensive. To address this, we introduce LongRecipe, an efficient training strategy for extending the context window of LLMs, including impactful token analysis, position index transformation, and training optimization strategies. It simulates long-sequence inputs while maintaining training efficiency and significantly improves the model’s understanding of long-range dependencies. Experiments on three types of LLMs show that LongRecipe can utilize long sequences while requiring only 30% of the target context window size, and reduces computational training resource over 85% compared to full sequence training. Furthermore, LongRecipe also preserves the original LLM’s capabilities in general tasks. Ultimately, we can extend the effective context window of open-source LLMs from 8k to 128k, achieving performance close to GPT-4 with just one day of dedicated training using a single GPU with 80G memory. Our code is released at https://github.com/zhiyuanhubj/LongRecipe.

arxiv情報

著者 Zhiyuan Hu,Yuliang Liu,Jinman Zhao,Suyuchen Wang,Yan Wang,Wei Shen,Qing Gu,Anh Tuan Luu,See-Kiong Ng,Zhiwei Jiang,Bryan Hooi
発行日 2024-09-04 15:55:22+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク