Power Law Guided Dynamic Sifting for Efficient Attention

要約

特に注意計算における高帯域幅メモリ(HBM)とSRAMの間のデータ転送中、メモリ帯域幅の制限のために、大きな言語モデルを使用したGPUの効率的な推論は依然として困難です。
おおよその注意方法は、計算およびメモリのオーバーヘッドを削減することによりこの問題に対処しますが、GPUでパフォーマンスが低い高価な$ $ k $操作に依存することがよくあります。
Siftattentionを提案します。これは、上位$ k $ステップを、しきい値に基づいて計算効率の高い要素ごとのフィルタリング操作に置き換える新しい近似注意方法です。
これを行うための私たちの直感は、注意スコアの$ \ tau $ -thitileが連続した生成ステップを介した予測可能なパワーローに従うという経験的な観察に基づいています。
この洞察を活用すると、私たちのアプローチは、各世代のステップでのプロンプトあたりのしきい値を動的に推定します。
このしきい値を超える注意スコアと、対応する値ベクトルは、注意出力を計算するためにロード/使用され、HBMとSRAMの間のデータの動きを削減します。
私たちの評価は、Siftattentionが既存の近似注意方法よりもモデルの品質をよりよく保持し、値ベクトルをロードするときにメモリ帯域幅の使用を削減することを示しています。

要約(オリジナル)

Efficient inference on GPUs using large language models remains challenging due to memory bandwidth limitations, particularly during data transfers between High Bandwidth Memory (HBM) and SRAM in attention computations. Approximate attention methods address this issue by reducing computational and memory overhead but often rely on expensive top-$k$ operations, which perform poorly on GPUs. We propose SiftAttention, a novel approximate attention method that replaces the top-$k$ step with a computationally efficient element-wise filtering operation based on a threshold value. Our intuition for doing this is based on our empirical observation that the $\tau$-th quantile of attention scores follows a predictable power-law over sequential generation steps. Exploiting this insight, our approach dynamically estimates a threshold value per prompt at each generation step. Only attention scores above this threshold and their corresponding value vectors are loaded/used to compute the attention output, reducing data movement between HBM and SRAM. Our evaluation demonstrates that SiftAttention preserves model quality better than existing approximate attention methods while reducing memory bandwidth usage when loading value vectors.

arxiv情報

著者 Nirav Koley,Prajwal Singhania,Abhinav Bhatele
発行日 2025-06-05 17:50:32+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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