論文の概要: Correlation-Aware Select and Merge Attention for Efficient Fine-Tuning and Context Length Extension
- arxiv url: http://arxiv.org/abs/2410.04211v1
- Date: Sat, 5 Oct 2024 15:59:32 GMT
- ステータス: 処理完了
- システム内更新日: 2024-11-02 09:11:41.515760
- Title: Correlation-Aware Select and Merge Attention for Efficient Fine-Tuning and Context Length Extension
- Title(参考訳): ファインチューニングとコンテキスト長拡張のための相関認識の選択とマージ注意
- Authors: Ning Wang, Zekun Li, Tongxin Bai, Guoqi Li,
- Abstract要約: 本稿では,効率的なスパースアテンションを実現するために,相関認識の選択とマージ機構を導入する。
また、位置エンコーディングを含む新しいデータ拡張手法を提案し、不明瞭な位置への一般化を促進する。
提案手法は,コンテキスト長4Mのパスキータスクに対して100%の精度を実現し,コンテクスト長1Mで安定したパープレキシティを維持する。
- 参考スコア(独自算出の注目度): 21.729875191721984
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Modeling long sequences is crucial for various large-scale models; however, extending existing architectures to handle longer sequences presents significant technical and resource challenges. In this paper, we propose an efficient and flexible attention architecture that enables the extension of context lengths in large language models with reduced computational resources and fine-tuning time compared to other excellent methods. Specifically, we introduce correlation-aware selection and merging mechanisms to facilitate efficient sparse attention. In addition, we also propose a novel data augmentation technique involving positional encodings to enhance generalization to unseen positions. The results are as follows: First, using a single A100, we achieve fine-tuning on Llama2-7B with a sequence length of 32K, which is more efficient than other methods that rely on subsets for regression. Second, we present a comprehensive method for extending context lengths across the pre-training, fine-tuning, and inference phases. During pre-training, our attention mechanism partially breaks translation invariance during token selection, so we apply positional encodings only to the selected tokens. This approach achieves relatively high performance and significant extrapolation capabilities. For fine-tuning, we introduce Cyclic, Randomly Truncated, and Dynamically Growing NTK Positional Embedding (CRD NTK). This design allows fine-tuning with a sequence length of only 16K, enabling models such as Llama2-7B and Mistral-7B to perform inference with context lengths of up to 1M or even arbitrary lengths. Our method achieves 100\% accuracy on the passkey task with a context length of 4M and maintains stable perplexity at a 1M context length. This represents at least a 64-fold reduction in resource requirements compared to traditional full-attention mechanisms, while still achieving competitive performance.
- Abstract(参考訳): 長いシーケンスのモデリングは、様々な大規模モデルにとって重要であるが、既存のアーキテクチャを拡張して長いシーケンスを扱うことは、重要な技術的および資源的課題である。
本稿では,他の優れた手法と比較して計算資源を削減し,微調整時間を短縮した大規模言語モデルにおける文脈長の拡張を可能にする,効率的で柔軟な注目アーキテクチャを提案する。
具体的には,効率的なスパースアテンションを促進するために,相関認識の選択とマージ機構を導入する。
また,位置エンコーディングを含む新しいデータ拡張手法を提案し,未知の位置への一般化を促進させる。
1つのA100を用いて、シーケンス長32KのLlama2-7Bを微調整する。
第2に,事前学習,微調整,推論の各フェーズにわたって,コンテキスト長を拡張可能な包括的手法を提案する。
事前学習中、注意機構はトークン選択時に部分的に翻訳不変性を損なうため、選択したトークンにのみ位置エンコーディングを適用する。
このアプローチは比較的高い性能と重要な外挿機能を実現する。
微調整には,Cyclic,Randomly Truncated,Dynamically Growing NTK Positional Embedding (CRD NTK)を導入する。
この設計により、16Kのシーケンス長しか持たない微調整が可能となり、Llama2-7BやMistral-7Bといったモデルでは、1Mまでのコンテキスト長や任意の長さの推論が可能になった。
提案手法は,コンテキスト長4Mのパスキータスクにおいて100倍の精度を実現し,コンテクスト長1Mで安定したパープレキシティを維持する。
これは、競争力のあるパフォーマンスを保ちながら、従来のフルアテンションメカニズムと比較して、少なくとも64倍のリソース要求の削減を意味します。
関連論文リスト
- UIO-LLMs: Unbiased Incremental Optimization for Long-Context LLMs [111.12010207132204]
UIO-LLMsは、長いコンテキスト設定下でのメモリ拡張トランスフォーマーの漸進的な最適化手法である。
本稿では,TBPTTアルゴリズムを用いて学習過程を改良する。
UIO-LLMは、Llama2-7b-chatのコンテキストウィンドウを4Kから100Kトークンに、2%の追加パラメータで拡張するなど、長いコンテキストを扱うことに成功した。
論文 参考訳(メタデータ) (2024-06-26T08:44:36Z) - Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformers [58.5711048151424]
SPARSEK Attention(SPARSEK Attention)は、計算およびメモリ障害を克服するために設計された、新しいスパースアテンション機構である。
提案手法では,各クエリに対して一定数のKVペアを選択するために,スコアリングネットワークと差別化可能なトップkマスク演算子であるSPARSEKを統合する。
実験結果から,SPARSEK注意は従来のスパースアテンション法よりも優れていた。
論文 参考訳(メタデータ) (2024-06-24T15:55:59Z) - SinkLoRA: Enhanced Efficiency and Chat Capabilities for Long-Context Large Language Models [4.497551890206997]
自己保持機構は、シーケンス長で2次スケールする。
LongLoRAは、コンテキスト拡張を有効に可能にしたスパースアテンション(S(2)-Attn)を提案した。
SinkLoRAは相変わらずバニラの注意ほど効率的ではなく、完全な注意よりも難易度の改善の39%にしか達していない。
論文 参考訳(メタデータ) (2024-06-09T07:23:34Z) - LongVQ: Long Sequence Modeling with Vector Quantization on Structured Memory [63.41820940103348]
自己保持機構の計算コストは、長いシーケンスの実用性を制限する。
我々はLongVQと呼ばれる新しい手法を提案し、長さ固定されたコードブックとしてグローバルな抽象化を圧縮する。
LongVQは動的グローバルパターンとローカルパターンを効果的に維持し、長距離依存性の問題の欠如を補うのに役立つ。
論文 参考訳(メタデータ) (2024-04-17T08:26:34Z) - Bidirectional Long-Range Parser for Sequential Data Understanding [3.76054468268713]
BLRP(Bidirectional Long-Range)は,長距離タスクの性能向上と効率向上を目的とした,新規で汎用的なアテンション機構である。
我々は、最先端の手法に対する競争結果を示すことによって、ビジョンと言語ドメインに対するアプローチの利点と汎用性を示す。
論文 参考訳(メタデータ) (2024-04-08T05:45:03Z) - BurstAttention: An Efficient Distributed Attention Framework for Extremely Long Sequences [96.74779792715819]
本稿では,BurstAttention'という分散アテンションフレームワークを提案し,メモリアクセスと通信操作を最適化する。
異なる長さ設定下での実験結果は、BurstAttentionが長いシーケンスを処理する上で大きな利点があることを示している。
論文 参考訳(メタデータ) (2024-03-14T12:51:58Z) - Training-Free Long-Context Scaling of Large Language Models [114.53296002607993]
我々は、Llama2 70Bが連続的なトレーニングなしで100k以上のトークンのコンテキストウィンドウをサポート可能なDual Chunk Attentionを提案する。
長いシーケンスの注意をチャンクベースのモジュールに分解することで、DCAはトークンの相対的な位置情報を効果的にキャプチャする。
論文 参考訳(メタデータ) (2024-02-27T12:39:23Z) - LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models [67.58275666573496]
LongLoRAは、トレーニング済みの大規模言語モデルのコンテキストサイズを拡張する、効率的な微調整アプローチである。
7B/13Bから70BまでのLlama2モデル上での各種タスクに対する実験結果が強かった。
論文 参考訳(メタデータ) (2023-09-21T17:59:11Z) - Efficiently Modeling Long Sequences with Structured State Spaces [15.456254157293836]
本稿では,基本状態空間モデルに対する新しいパラメータ化に基づく新しいシーケンスモデルを提案する。
S4は、(i)データ拡張や補助損失を伴わないシーケンシャルCIFAR-10での91%の精度を含む、より大規模な2次元ResNetと同等の、さまざまな確立されたベンチマークで強力な実験結果を得る。
論文 参考訳(メタデータ) (2021-10-31T03:32:18Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。