ChatPaper.aiChatPaper

Brainformers: Scambiare Semplicità per Efficienza

Brainformers: Trading Simplicity for Efficiency

May 29, 2023
Autori: Yanqi Zhou, Nan Du, Yanping Huang, Daiyi Peng, Chang Lan, Da Huang, Siamak Shakeri, David So, Andrew Dai, Yifeng Lu, Zhifeng Chen, Quoc Le, Claire Cui, James Laundon, Jeff Dean
cs.AI

Abstract

I Transformer sono al centro dei recenti successi nel campo dell'elaborazione del linguaggio naturale e della visione artificiale. I Transformer presentano una struttura prevalentemente uniforme, in cui i livelli si alternano tra feed-forward e self-attention per costruire una rete profonda. In questo lavoro, esploriamo questa scelta progettuale e scopriamo che blocchi più complessi, con diverse permutazioni di primitive di livello, possono essere più efficienti. Sfruttando questa intuizione, sviluppiamo un blocco complesso, denominato Brainformer, che consiste in un insieme diversificato di livelli, come livelli feed-forward a gate sparsi, livelli feed-forward densi, livelli di attenzione e varie forme di normalizzazione di livello e funzioni di attivazione. Brainformer supera costantemente i Transformer densi e sparsi allo stato dell'arte, sia in termini di qualità che di efficienza. Un modello Brainformer con 8 miliardi di parametri attivati per token dimostra una convergenza dell'addestramento 2 volte più veloce e un tempo di passo 5 volte più rapido rispetto alla sua controparte GLaM. Nella valutazione delle attività downstream, Brainformer mostra anche un punteggio SuperGLUE superiore del 3% con fine-tuning rispetto a GLaM, con un numero simile di parametri attivati. Infine, Brainformer supera ampiamente un modello denso Primer derivato con NAS con un calcolo simile per token nelle valutazioni few-shot.
English
Transformers are central to recent successes in natural language processing and computer vision. Transformers have a mostly uniform backbone where layers alternate between feed-forward and self-attention in order to build a deep network. Here we investigate this design choice and find that more complex blocks that have different permutations of layer primitives can be more efficient. Using this insight, we develop a complex block, named Brainformer, that consists of a diverse sets of layers such as sparsely gated feed-forward layers, dense feed-forward layers, attention layers, and various forms of layer normalization and activation functions. Brainformer consistently outperforms the state-of-the-art dense and sparse Transformers, in terms of both quality and efficiency. A Brainformer model with 8 billion activated parameters per token demonstrates 2x faster training convergence and 5x faster step time compared to its GLaM counterpart. In downstream task evaluation, Brainformer also demonstrates a 3% higher SuperGLUE score with fine-tuning compared to GLaM with a similar number of activated parameters. Finally, Brainformer largely outperforms a Primer dense model derived with NAS with similar computation per token on fewshot evaluations.
PDF11February 8, 2026