Pay Attention when Required
This work addresses computational efficiency for large language models, though it is incremental as it modifies existing Transformer architectures.
The paper tackled the inefficiency of self-attention blocks in Transformer models by proposing the PAR Transformer, which replaces about 63% of self-attention blocks with feed-forward blocks, reducing compute time by 35% compared to Transformer-XL while maintaining perplexity on WikiText-103.
Transformer-based models consist of interleaved feed-forward blocks - that capture content meaning, and relatively more expensive self-attention blocks - that capture context meaning. In this paper, we explored trade-offs and ordering of the blocks to improve upon the current Transformer architecture and proposed PAR Transformer. It needs 35% lower compute time than Transformer-XL achieved by replacing ~63% of the self-attention blocks with feed-forward blocks, and retains the perplexity on WikiText-103 language modelling benchmark. We further validated our results on text8 and enwiki8 datasets, as well as on the BERT model.