Transformers are Multi-State RNNs

要約

トランスフォーマーは、前世代の最先端の NLP モデルであるリカレント ニューラル ネットワーク (RNN) と比較して概念的に異なると考えられています。
この研究では、デコーダ専用トランスフォーマーが実際に無限のマルチステート RNN、つまり無制限の隠れ状態サイズを持つ RNN のバリアントとして概念化できることを示します。
さらに、隠れ状態のサイズを固定することで、事前学習済み変換器を $\textit{finite}$ 多状態 RNN に変換できることを示します。
私たちは、いくつかの既存のトランスフォーマー キャッシュ圧縮技術がそのような変換ポリシーとして構成できることを観察し、これらのポリシーと比較して単純な新しいポリシー TOVA を導入します。
いくつかの長距離タスクを用いた実験では、TOVA が他のすべてのベースライン ポリシーよりも優れていると同時に、フル (無限) モデルとほぼ同等であり、場合によっては元のキャッシュ サイズの $\frac{1}{8}$ のみを使用することが示されています。

私たちの結果は、トランス デコーダー LLM が実際には RNN として動作することが多いことを示しています。
また、最も厄介な計算上のボトルネックの 1 つであるキャッシュ メモリのサイズを軽減するオプションも用意しています。
コードは https://github.com/schwartz-lab-NLP/TOVA で公開されています。

要約(オリジナル)

Transformers are considered conceptually different compared to the previous generation of state-of-the-art NLP models – recurrent neural networks (RNNs). In this work, we demonstrate that decoder-only transformers can in fact be conceptualized as infinite multi-state RNNs – an RNN variant with unlimited hidden state size. We further show that pretrained transformers can be converted into $\textit{finite}$ multi-state RNNs by fixing the size of their hidden state. We observe that several existing transformers cache compression techniques can be framed as such conversion policies, and introduce a novel policy, TOVA, which is simpler compared to these policies. Our experiments with several long range tasks indicate that TOVA outperforms all other baseline policies, while being nearly on par with the full (infinite) model, and using in some cases only $\frac{1}{8}$ of the original cache size. Our results indicate that transformer decoder LLMs often behave in practice as RNNs. They also lay out the option of mitigating one of their most painful computational bottlenecks – the size of their cache memory. We publicly release our code at https://github.com/schwartz-lab-NLP/TOVA.

arxiv情報

著者 Matanel Oren,Michael Hassid,Yossi Adi,Roy Schwartz
発行日 2024-01-11 18:35:26+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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