LongAlign: A Recipe for Long Context Alignment of Large Language Models

要約

大規模な言語モデルを拡張して長いコンテキストを効果的に処理するには、同様の長さの入力シーケンスに対する命令の微調整が必​​要です。
これに対処するために、長いコンテキスト アラインメントのための命令データ、トレーニング、評価のレシピである LongAlign を紹介します。
まず、Self-Instruct を使用して、長い命令に従うデータセットを構築します。
データの多様性を確保するために、さまざまな長いコンテキスト ソースからの幅広いタスクをカバーします。
2 番目に、パッキングおよびソートされたバッチ戦略を採用して、さまざまな長さの分布を持つデータの教師あり微調整を高速化します。
さらに、パッキングトレーニング中のさまざまなシーケンスにわたる損失への寄与のバランスをとるための損失重み付け方法を開発します。
3 番目に、長さ 10k ~ 100k のクエリに対する命令追従機能を評価するための LongBench-Chat ベンチマークを紹介します。
実験によると、LongAlign は、長いコンテキスト タスクにおいて LLM の既存のレシピよりも最大 30\% 優れたパフォーマンスを示し、同時に、短い一般的なタスクの処理能力も維持します。
コード、データ、およびロングアライメントされたモデルは、https://github.com/THUDM/LongAlign でオープンソース化されています。

要約(オリジナル)

Extending large language models to effectively handle long contexts requires instruction fine-tuning on input sequences of similar length. To address this, we present LongAlign — a recipe of the instruction data, training, and evaluation for long context alignment. First, we construct a long instruction-following dataset using Self-Instruct. To ensure the data diversity, it covers a broad range of tasks from various long context sources. Second, we adopt the packing and sorted batching strategies to speed up supervised fine-tuning on data with varied length distributions. Additionally, we develop a loss weighting method to balance the contribution to the loss across different sequences during packing training. Third, we introduce the LongBench-Chat benchmark for evaluating instruction-following capabilities on queries of 10k-100k in length. Experiments show that LongAlign outperforms existing recipes for LLMs in long context tasks by up to 30\%, while also maintaining their proficiency in handling short, generic tasks. The code, data, and long-aligned models are open-sourced at https://github.com/THUDM/LongAlign.

arxiv情報

著者 Yushi Bai,Xin Lv,Jiajie Zhang,Yuze He,Ji Qi,Lei Hou,Jie Tang,Yuxiao Dong,Juanzi Li
発行日 2024-01-31 18:29:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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