Selective Attention Improves Transformer

要約

注意のコンテキストにある不要な要素は、パフォーマンスを低下させる。我々は、標準的なアテンションメカニズムにパラメータを必要としないシンプルな変更を加えることで、不要な要素へのアテンションを減らす「選択的アテンション」を紹介する。選択的注意は、様々なモデルのサイズとコンテキストの長さにおいて言語モデリングの性能を向上させる。例えば、選択的注意を用いてC4の言語モデリング目的で訓練された様々な変換器は、注意モジュールのヘッドとパラメータが~2倍多い標準的な変換器と同等の性能を発揮する。選択的注意はまた、注意のコンテキストバッファのサイズを小さくすることを可能にし、推論中のメモリと計算要件の有意義な削減につながる。例えば、コンテキストサイズが512、1,024、2,048のC4で訓練された100Mのパラメータを持つ変換器は、選択的注意を装備した場合、同じ検証当惑度で、選択的注意を装備していない変換器と比較して、注意モジュールに必要なメモリがそれぞれ16倍、25倍、47倍少なくなる。

要約(オリジナル)

Unneeded elements in the attention’s context degrade performance. We introduce Selective Attention, a simple parameter-free change to the standard attention mechanism which reduces attention to unneeded elements. Selective attention improves language modeling performance in a variety of model sizes and context lengths. For example, a range of transformers trained with the language modeling objective on C4 with selective attention perform equivalently to standard transformers with ~2X more heads and parameters in their attention modules. Selective attention also allows decreasing the size of the attention’s context buffer, leading to meaningful reductions in the memory and compute requirements during inference. For example, transformers with 100M parameters trained on C4 with context sizes of 512, 1,024, and 2,048 need 16X, 25X, and 47X less memory for their attention module, respectively, when equipped with selective attention, as those without selective attention, with the same validation perplexity.

arxiv情報

著者 Yaniv Leviathan,Matan Kalman,Yossi Matias
発行日 2024-10-03 17:27:30+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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