Parallel Attention and Feed-Forward Net Design for Pre-training and Inference on Transformers

要約

このペーパーでは、変圧器モデルに対する並列アテンションとフィードフォワード ネット設計 (PAF) を紹介します。
Transformer モデルは、すべての自然言語処理アプリケーションのバックボーンであることに疑いの余地はありません。
したがって、効率向上を目的とした取り組みは、多大な効果をもたらすことが保証されています。
Transformer モデルは多くの層で構成されており、各層にはアテンション ブロックと、それに続くアテンション ブロックの出力に基づいて入力を処理するフィードフォワード ネットワーク (FFN) があります。
この標準設計をシリーズ アテンション アンド フィードフォワード ネット デザイン (SAF) と呼びます。
変圧器モデルに対して提案した PAF 設計の各層について、FFN ブロックの計算をアテンション ブロックの出力から独立させます。
この分離により、各層の FFN ブロックがその層の注目ブロックと並行して実行できるようになります。
2 つの大規模な言語モデル (RoBERTa-large および bert-large-uncased) をトレーニングし、多数の意味属性をテストする一般言語理解 (GLUE) ベンチマークの 6 つのタスクでそれらを SAF の対応物と比較することで、PAF 設計を評価します。
PAF モデルは、6 つのタスクすべてにおいて、対応する SAF モデルとほぼ同じパフォーマンスを達成します。
また、アテンション ブロックと FFN ブロックの時間計算量を比較し、両方のブロックを並行して実行すると、理論的にも実際にも最大 1.5 倍から 2 倍の速度向上が達成できることがわかりました。
PAF 設計を実装するための高速かつ効率的なライブラリの開発は将来の作業に残しておきます。

要約(オリジナル)

In this paper, we introduce Parallel Attention and Feed-Forward Net Design (PAF) for transformer models. Transformer models are indisputably the backbone of all Natural Language Processing applications. Therefore, any efforts aimed at improving their efficiency are guaranteed to have an enormous impact. Transformer models consist of many layers and each layer has an attention block followed by a feed-forward network (FFN) that processes the input based on the attention block’s output. We refer to this standard design as Series Attention and Feed-Forward Net Design (SAF). For each layer in our proposed PAF design for transformer models, we make FFN block’s computations independent of the output of the attention block. This decoupling allows FFN block of each layer to run in parallel to the attention block of that layer. We evaluate PAF design by training two large language models (RoBERTa-large and bert-large-uncased) and comparing them to their SAF counterparts on six tasks of the General Language Understanding (GLUE) benchmark which test a multitude of semantic attributes. PAF models achieves nearly identical performance as their SAF counterparts on all the six tasks. We also compare time complexities of attention blocks with FFN blocks and find that running both blocks in parallel can theoretically and in practice achieve upto 1.5x to 2x gains in speed. We leave the development of fast and efficient libraries for implementation of PAF design for future work.

arxiv情報

著者 Shashank Sonkar,Richard G. Baraniuk
発行日 2023-05-22 17:56:09+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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