Mixture-of-Transformers: Un'Architettura Sparsa e Scalabile per Modelli Fondazionali Multi-Modali
Mixture-of-Transformers: A Sparse and Scalable Architecture for Multi-Modal Foundation Models
November 7, 2024
Autori: Weixin Liang, Lili Yu, Liang Luo, Srinivasan Iyer, Ning Dong, Chunting Zhou, Gargi Ghosh, Mike Lewis, Wen-tau Yih, Luke Zettlemoyer, Xi Victoria Lin
cs.AI
Abstract
Lo sviluppo dei grandi modelli linguistici (LLM) si è esteso a sistemi multimodali in grado di elaborare testo, immagini e parlato all'interno di un framework unificato. L'addestramento di questi modelli richiede dataset e risorse computazionali significativamente più ampi rispetto agli LLM esclusivamente testuali. Per affrontare le sfide di scalabilità, introduciamo Mixture-of-Transformers (MoT), un'architettura trasformatore multimodale sparsa che riduce notevolmente i costi computazionali del pre-addestramento. MoT disaccoppia i parametri non di embedding del modello per modalità – incluse le reti feed-forward, le matrici di attenzione e la normalizzazione di livello – consentendo un'elaborazione specifica per modalità con self-attention globale sull'intera sequenza di input. Valutiamo MoT in molteplici contesti e scale modellistiche. Nella configurazione Chameleon 7B (generazione autoregressiva di testo e immagini), MoT eguaglia le prestazioni del baseline denso utilizzando solo il 55,8% dei FLOP. Esteso per includere il parlato, MoT raggiunge prestazioni vocali comparabili al baseline denso con solo il 37,2% dei FLOP. Nella configurazione Transfusion, dove testo e immagine sono addestrati con obiettivi diversi, un modello MoT da 7B eguaglia le prestazioni della modalità immagine del baseline denso con un terzo dei FLOP, mentre un modello MoT da 760M supera un baseline denso da 1,4B in diverse metriche chiave per la generazione di immagini. La profilazione del sistema evidenzia ulteriormente i vantaggi pratici di MoT, raggiungendo la qualità dell'immagine del baseline denso nel 47,2% del tempo di esecuzione effettivo e la qualità del testo nel 75,6% del tempo di esecuzione effettivo (misurato su istanze AWS p4de.24xlarge con GPU NVIDIA A100).
English
The development of large language models (LLMs) has expanded to multi-modal
systems capable of processing text, images, and speech within a unified
framework. Training these models demands significantly larger datasets and
computational resources compared to text-only LLMs. To address the scaling
challenges, we introduce Mixture-of-Transformers (MoT), a sparse multi-modal
transformer architecture that significantly reduces pretraining computational
costs. MoT decouples non-embedding parameters of the model by modality --
including feed-forward networks, attention matrices, and layer normalization --
enabling modality-specific processing with global self-attention over the full
input sequence. We evaluate MoT across multiple settings and model scales. In
the Chameleon 7B setting (autoregressive text-and-image generation), MoT
matches the dense baseline's performance using only 55.8\% of the FLOPs. When
extended to include speech, MoT reaches speech performance comparable to the
dense baseline with only 37.2\% of the FLOPs. In the Transfusion setting, where
text and image are trained with different objectives, a 7B MoT model matches
the image modality performance of the dense baseline with one third of the
FLOPs, and a 760M MoT model outperforms a 1.4B dense baseline across key image
generation metrics. System profiling further highlights MoT's practical
benefits, achieving dense baseline image quality in 47.2\% of the wall-clock
time and text quality in 75.6\% of the wall-clock time (measured on AWS
p4de.24xlarge instances with NVIDIA A100 GPUs).