要約
長期変圧器モデル(LCTMS)は、実際のアプリケーションには不可欠ですが、注意の二次の複雑さのために高い計算コストを受けます。
ブロックスパースの注意は、重要な領域に計算を集中することによりこれを軽減しますが、既存の方法は、費用のかかるブロックの重要性測定による精度と効率のバランスをとることに苦労しています。
この論文では、まばらな注意を使用してトランスモデルの長いコンテキスト推論を劇的に加速するプラグアンドプレイフレームワークであるXattentionを紹介します。
Xattentionの主要な革新は、注意マトリックスの抗角値の合計(つまり、左から下への右へ)の合計がブロックの重要性の強力なプロキシを提供するという洞察です。
これにより、非必須ブロックの正確な識別と剪定が可能になり、その結果、スパース性が高く、推論が劇的に加速されます。
包括的な評価を通じて、要求する長いコンテストのベンチマークなど、言語のためのロングベンチ、ビデオ理解のためのVideomme、ビデオ生成のためのVbenchを含む要求の要求について。
Xattentionは、実質的な計算上の利益を提供しながら、完全な注意に匹敵する精度を達成します。
注意計算で最大13.5倍の加速を示します。
これらの結果は、Xattentionがブロックスパースの注意の実際的な可能性を解き放つ能力を強調し、実際のアプリケーションでのLCTMのスケーラブルで効率的な展開への道を開いています。
コードはhttps://github.com/mit-han-lab/x-attentionで入手できます。
要約(オリジナル)
Long-Context Transformer Models (LCTMs) are vital for real-world applications but suffer high computational costs due to attention’s quadratic complexity. Block-sparse attention mitigates this by focusing computation on critical regions, yet existing methods struggle with balancing accuracy and efficiency due to costly block importance measurements. In this paper, we introduce XAttention, a plug-and-play framework that dramatically accelerates long-context inference in Transformers models using sparse attention. XAttention’s key innovation is the insight that the sum of antidiagonal values (i.e., from the lower-left to upper-right) in the attention matrix provides a powerful proxy for block importance. This allows for precise identification and pruning of non-essential blocks, resulting in high sparsity and dramatically accelerated inference. Across comprehensive evaluations on demanding long-context benchmarks-including RULER and LongBench for language, VideoMME for video understanding, and VBench for video generation. XAttention achieves accuracy comparable to full attention while delivering substantial computational gains. We demonstrate up to 13.5x acceleration in attention computation. These results underscore XAttention’s ability to unlock the practical potential of block sparse attention, paving the way for scalable and efficient deployment of LCTMs in real-world applications. Code is available at https://github.com/mit-han-lab/x-attention.
arxiv情報
著者 | Ruyi Xu,Guangxuan Xiao,Haofeng Huang,Junxian Guo,Song Han |
発行日 | 2025-03-20 17:59:58+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google