about
One Wide Feedforward Is All You Need (arxiv.org)
4 points by jasondavies on Sep 6, 2023 | hide | past | pdf | 1 comment on HN

In plain words: Transformers mix attention with a word-by-word reshaping block, which this study finds mostly redundant. Sharing one block across the encoder and dropping it from the decoder cuts parameters with little accuracy loss, and widening it beats the usual big model on accuracy and speed.

Abstract · One Wide Feedforward is All You Need

The Transformer architecture has two main non-embedding components: Attention and the Feed Forward Network (FFN). Attention captures interdependencies between words regardless of their position, while the FFN non-linearly transforms each input token independently. In this work we explore the role of the FFN, and find that despite taking up a significant fraction of the model's parameters, it is highly redundant. Concretely, we are able to substantially reduce the number of parameters with only a modest drop in accuracy by removing the FFN on the decoder layers and sharing a single FFN across the encoder. Finally we scale this architecture back to its original size by increasing the hidden dimension of the shared FFN, achieving substantial gains in both accuracy and latency with respect to the original Transformer Big.

Telmo Pessoa Pires, António V. Lopes, Yannick Assogba, Hendra Setiawan
arXiv:2309.01826 · cs.CL, cs.AI · submitted Sep 4, 2023 · updated Oct 21, 2023
abstract · pdf · html · Accepted at WMT23 (EMNLP 2023)

add comment on HN

Everyone probably knew, this was coming. Excited and waiting for the code release!