Efficient Transformers with Dynamic Token Pooling

要約

トランスフォーマーはモデリング言語において比類のないパフォーマンスを達成しますが、メモリと時間の複雑さの点では依然として非効率的です。
考えられる解決策は、トークンの固定長セグメントをプールすることによって中間層のシーケンス長を減らすことです。
それにもかかわらず、単語やフレーズなどの自然な意味の単位はさまざまなサイズを示します。
この不一致に対処するために、言語モデルに動的プーリング メカニズムを装備し、自己回帰的にセグメント境界を予測します。
確率的再パラメータ化によるエンドツーエンド学習、教師あり学習(サブワードトークナイザーまたは条件付きエントロピーのスパイクからのセグメンテーションに基づく)、および言語的に動機付けられた境界を含む、境界を推測するためのいくつかの方法を比較します。
複数のデータセットおよび形態学的に多様な言語からのテキストに対して文字レベルの評価を実行します。
この結果は、言語を共同でセグメント化してモデル化する動的プーリングが、同じ計算量内で通常の Transformers や固定長プーリングよりも高速かつ正確であることを示しています。

要約(オリジナル)

Transformers achieve unrivalled performance in modelling language, but remain inefficient in terms of memory and time complexity. A possible remedy is to reduce the sequence length in the intermediate layers by pooling fixed-length segments of tokens. Nevertheless, natural units of meaning, such as words or phrases, display varying sizes. To address this mismatch, we equip language models with a dynamic-pooling mechanism, which predicts segment boundaries in an autoregressive fashion. We compare several methods to infer boundaries, including end-to-end learning through stochastic re-parameterisation, supervised learning (based on segmentations from subword tokenizers or spikes in conditional entropy), as well as linguistically motivated boundaries. We perform character-level evaluation on texts from multiple datasets and morphologically diverse languages. The results demonstrate that dynamic pooling, which jointly segments and models language, is both faster and more accurate than vanilla Transformers and fixed-length pooling within the same computational budget.

arxiv情報

著者 Piotr Nawrot,Jan Chorowski,Adrian Łańcucki,Edoardo M. Ponti
発行日 2023-05-24 17:32:56+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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