Rectified Sparse Attention

要約

効率的な長シーケンス生成は、大規模な言語モデルにとって重要な課題です。
最近のスパースデコード方法は効率を改善しますが、近似誤差が生成の品質を蓄積して低下させるKVキャッシュの不整合に苦しんでいます。
この作業では、ブロックスパースの注意と周期的な密な整流を組み合わせたシンプルで効果的な方法である整流されたまばらな注意(RESA)を提案します。
密なフォワードパスを使用して固定間隔でKVキャッシュを更新することにより、RESAはエラーの蓄積を境界し、前oraining分布とのアライメントを保持します。
数学の推論、言語モデリング、および検索タスク全体の実験は、RESAが効率を大幅に改善して、ほぼ失われない世代の品質を達成することを示しています。
特に、RESAは、256Kシーケンス長でデコードする下で最大2.42 $ \ Times $のエンドツーエンドスピードアップを提供し、スケーラブルな長いコンテキスト推論の実用的なソリューションになります。
コードはhttps://aka.ms/resa-lmで入手できます。

要約(オリジナル)

Efficient long-sequence generation is a critical challenge for Large Language Models. While recent sparse decoding methods improve efficiency, they suffer from KV cache misalignment, where approximation errors accumulate and degrade generation quality. In this work, we propose Rectified Sparse Attention (ReSA), a simple yet effective method that combines block-sparse attention with periodic dense rectification. By refreshing the KV cache at fixed intervals using a dense forward pass, ReSA bounds error accumulation and preserves alignment with the pretraining distribution. Experiments across math reasoning, language modeling, and retrieval tasks demonstrate that ReSA achieves near-lossless generation quality with significantly improved efficiency. Notably, ReSA delivers up to 2.42$\times$ end-to-end speedup under decoding at 256K sequence length, making it a practical solution for scalable long-context inference. Code is available at https://aka.ms/ReSA-LM.

arxiv情報

著者 Yutao Sun,Tianzhu Ye,Li Dong,Yuqing Xia,Jian Chen,Yizhao Gao,Shijie Cao,Jianyong Wang,Furu Wei
発行日 2025-06-04 16:01:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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