論文の概要: Faster Causal Attention Over Large Sequences Through Sparse Flash
Attention
- arxiv url: http://arxiv.org/abs/2306.01160v1
- Date: Thu, 1 Jun 2023 21:33:59 GMT
- ステータス: 処理完了
- システム内更新日: 2023-06-05 17:30:29.877662
- Title: Faster Causal Attention Over Large Sequences Through Sparse Flash
Attention
- Title(参考訳): スパースフラッシュアテンションによる大規模シーケンスに対するより高速な因果注意
- Authors: Matteo Pagliardini, Daniele Paliotta, Martin Jaggi, Fran\c{c}ois
Fleuret
- Abstract要約: FlashAttentionを拡張して、大量の注目空間パターンに対応します。
変換言語モデルのトレーニング速度を、それぞれ$2.0times$と$3.3times$で、それぞれ$8k$と$16k$のシーケンスで増加します。
- 参考スコア(独自算出の注目度): 45.18552512844457
- License: http://creativecommons.org/licenses/by-sa/4.0/
- Abstract: Transformer-based language models have found many diverse applications
requiring them to process sequences of increasing length. For these
applications, the causal self-attention -- which is the only component scaling
quadratically w.r.t. the sequence length -- becomes a central concern. While
many works have proposed schemes to sparsify the attention patterns and reduce
the computational overhead of self-attention, those are often limited by
implementations concerns and end up imposing a simple and static structure over
the attention matrix. Conversely, implementing more dynamic sparse attentions
often results in runtimes significantly slower than computing the full
attention using the Flash implementation from Dao et al. (2022). We extend
FlashAttention to accommodate a large class of attention sparsity patterns
that, in particular, encompass key/query dropping and hashing-based attention.
This leads to implementations with no computational complexity overhead and a
multi-fold runtime speedup on top of FlashAttention. Even with relatively low
degrees of sparsity, our method improves visibly upon FlashAttention as the
sequence length increases. Without sacrificing perplexity, we increase the
training speed of a transformer language model by $2.0\times$ and $3.3\times$
for sequences of respectively $8k$ and $16k$ tokens.
- Abstract(参考訳): トランスフォーマーベースの言語モデルは、長いシーケンスを処理しなければならない様々なアプリケーションを見出している。
これらのアプリケーションでは、シーケンス長を二次的にスケーリングする唯一のコンポーネントである因果的自己アテンション(causal self-attention)が中心的関心事となる。
多くの作品では注意パターンのスパース化と自己注意の計算オーバーヘッドの削減が提案されているが、それらはしばしば実装上の懸念によって制限され、注意行列の上にシンプルで静的な構造を課すことになる。
逆に、よりダイナミックなスパース・アテンションを実装すると、daoら(2022年)のflash実装を使ったフルアテンションの計算よりもランタイムが大幅に遅くなります。
FlashAttentionを拡張して、特にキー/クエリのドロップやハッシュベースのアテンションを含む、大規模な注目空間パターンに対応します。
これにより、計算の複雑さのオーバーヘッドがなく、FlashAttention上でのランタイムの高速化が実現する。
比較的低いスパース度であっても, 配列長の増加に伴ってフラッシュアテンションを可視的に改善する。
複雑さを犠牲にすることなく、トランスフォーマー言語モデルのトレーニング速度を$2.0\times$と$3.3\times$で、それぞれ$8k$と$16k$トークンのシーケンスで増加させます。
関連論文リスト
- Bifurcated Attention for Single-Context Large-Batch Sampling [39.16152482491236]
Bifurcated attentionは、単一コンテキストのバッチサンプリングコンテキストにおける言語モデル推論のために開発された手法である。
2つの異なるGEMM演算にインクリメンタルデコーディング中にアテンション機構を分割することで、この処理を実現する。
論文 参考訳(メタデータ) (2024-03-13T16:30:57Z) - Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence
Lengths in Large Language Models [20.78813311569383]
本稿では、線形アテンションによる理論計算の利点を実現するための最初の線形アテンション実装であるLightning Attentionを紹介する。
具体的には、従来のアテンション機構をブロック内に適用し、インターブロックに対して線形アテンションカーネルのトリックを適用する。
異なるモデルサイズとシーケンス長について様々な実験を行った。
論文 参考訳(メタデータ) (2024-01-09T16:27:28Z) - HyperAttention: Long-context Attention in Near-Linear Time [78.33061530066185]
本稿では,長期的文脈の複雑さの増大に伴う計算課題に対処するため,HyperAttentionという近似的な注意機構を提案する。
実証的には、大規模なエントリを特定するためにLocality Sensitive Hashing(LSH)を使用して、HyperAttentionは既存のメソッドよりも優れています。
各種長文長データセットにおけるHyperAttentionの実証的性能を検証した。
論文 参考訳(メタデータ) (2023-10-09T17:05:25Z) - Efficient Streaming Language Models with Attention Sinks [76.50701824191107]
StreamingLLMは、大規模言語モデルが微調整なしで無限のシーケンス長に一般化できる効率的なフレームワークである。
StreamingLLMはLlama-2, MPT, Falcon, Pythiaを最大400万のトークンで安定かつ効率的な言語モデリングを実現できることを示す。
論文 参考訳(メタデータ) (2023-09-29T17:59:56Z) - FlashAttention-2: Faster Attention with Better Parallelism and Work
Partitioning [11.508362885430133]
非対称なGPUメモリ階層を利用して、メモリの大幅な節約と実行時の高速化を実現しています。
FlashAttentionはまだGEMM(Optimized matrix-multiply)操作ほど高速ではなく、理論上の最大FLOP/sの25-40%にしか達していない。
これらの問題に対処するために、より優れた作業パーティショニングを備えたFlashAttention-2を提案する。
論文 参考訳(メタデータ) (2023-07-17T17:50:36Z) - FlashAttention: Fast and Memory-Efficient Exact Attention with
IO-Awareness [80.3586155104237]
FlashAttentionは、トランスフォーマーのためのIO対応の正確な注意アルゴリズムである。
これにより、GPU高帯域メモリ(HBM)とGPUオンチップ間のメモリ読み込み/書き込み数を削減できる。
FlashAttentionとブロックスパース FlashAttentionは、トランスフォーマーのコンテキストを長くすることを可能にする。
論文 参考訳(メタデータ) (2022-05-27T17:53:09Z) - Combiner: Full Attention Transformer with Sparse Computation Cost [142.10203598824964]
計算の複雑さを低く保ちつつ、各注目ヘッドにフルアテンション機能を提供するコンバインダを提案する。
既存のスパース変圧器で使用されるスパースアテンションパターンのほとんどは、そのような分解設計をフルアテンションに刺激することができることを示す。
自己回帰的タスクと双方向シーケンスタスクの両方に関する実験的評価は、このアプローチの有効性を示す。
論文 参考訳(メタデータ) (2021-07-12T22:43:11Z) - Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing [112.2208052057002]
本稿では,隠れ状態の列を短く圧縮するFunnel-Transformerを提案する。
Funnel-TransformerはFLOPに匹敵する数が少ないため、様々なシーケンスレベルの予測タスクにおいて標準のTransformerよりも優れている。
論文 参考訳(メタデータ) (2020-06-05T05:16:23Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。