TensorX
返回文献探索

Paper · arXiv 2309.01826

One Wide Feedforward is All You Need

Telmo Pessoa Pires, António V. Lopes, Yannick Assogba, Hendra Setiawan

34 upvotesSeptember 4, 2023arXiv 预印本
AI 摘要

The study shows that the Feed Forward Network in Transformers is highly redundant and its reduction or sharing within the model can lead to improved accuracy and latency without significant loss of performance.

Transformer architectureAttentionFeed Forward Network (FFN)parameter redundancyhidden dimension

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
One Wide Feedforward is All You Need | TensorX