Skip to main content
QUICK REVIEW

[Paper Review] MoMa: Efficient Early-Fusion Pre-training with Mixture of Modality-Aware Experts

Xi Lin, Akshat Shrivastava|arXiv (Cornell University)|Jul 31, 2024
Robotics and Automated SystemsEngineering4 citations
TL;DR

MoMa introduces a modality-aware mixture-of-experts (MoE) architecture for efficient pre-training of early-fusion multimodal language models by grouping experts by modality (text or image), enabling modality-specific parameter allocation and learned routing within each group. Under a 1-trillion-token budget, MoMa achieves 3.7× overall FLOPs savings compared to a dense baseline, with 5.2× savings for image processing, outperforming standard MoE with mixed-modal experts.

ABSTRACT

We introduce MoMa, a novel modality-aware mixture-of-experts (MoE) architecture designed for pre-training mixed-modal, early-fusion language models. MoMa processes images and text in arbitrary sequences by dividing expert modules into modality-specific groups. These groups exclusively process designated tokens while employing learned routing within each group to maintain semantically informed adaptivity. Our empirical results reveal substantial pre-training efficiency gains through this modality-specific parameter allocation. Under a 1-trillion-token training budget, the MoMa 1.4B model, featuring 4 text experts and 4 image experts, achieves impressive FLOPs savings: 3.7x overall, with 2.6x for text and 5.2x for image processing compared to a compute-equivalent dense baseline, measured by pre-training loss. This outperforms the standard expert-choice MoE with 8 mixed-modal experts, which achieves 3x overall FLOPs savings (3x for text, 2.8x for image). Combining MoMa with mixture-of-depths (MoD) further improves pre-training FLOPs savings to 4.2x overall (text: 3.4x, image: 5.3x), although this combination hurts performance in causal inference due to increased sensitivity to router accuracy. These results demonstrate MoMa's potential to significantly advance the efficiency of mixed-modal, early-fusion language model pre-training, paving the way for more resource-efficient and capable multimodal AI systems.

Motivation & Objective

  • To improve the efficiency of pre-training early-fusion multimodal language models by exploiting modality-specific sparsity.
  • To address the computational inefficiency of dense models when scaling multimodal foundation models to large parameters and data.
  • To explore modality-aware sparsity (MaS) as a way to maintain cross-modality integration while optimizing for modality-specific feature learning.
  • To evaluate the impact of combining modality-aware MoE with mixture-of-depths (MoD) on FLOPs savings and inference performance.
  • To demonstrate that modality-aware sparsity preserves empirical scaling laws, enabling scalable and efficient multimodal pre-training.

Proposed method

  • The model uses a Chameleon-based transformer architecture with a unified sequence of text and image tokens.
  • Experts are divided into modality-specific groups: 4 text experts and 4 image experts, each processing only tokens of their designated modality.
  • Within each modality group, a learned routing mechanism selects active experts per token, enabling semantics-aware adaptivity while maintaining modality-specific parameter allocation.
  • The routing uses expert-choice routing to balance load and preserve a static computation graph for high training throughput.
  • The method combines modality-aware MoE with mixture-of-depths (MoD), allowing tokens to skip certain layers selectively to reduce computation.
  • The model is trained under a FLOPs-controlled setup with a 1-trillion-token budget, comparing MoMa to dense baselines and standard MoE with mixed-modal experts.
Figure 1 : Overview of our proposed multimodal early-fusion architecture. (a) The early-fusion architecture processes interleaved text and image data as a unified token sequence using a transformer model. (b) Detailed architecture of the mixture of modality-aware experts (MoMa) transformer block, wh
Figure 1 : Overview of our proposed multimodal early-fusion architecture. (a) The early-fusion architecture processes interleaved text and image data as a unified token sequence using a transformer model. (b) Detailed architecture of the mixture of modality-aware experts (MoMa) transformer block, wh

Experimental results

Research questions

  • RQ1Can modality-aware expert grouping improve pre-training efficiency in early-fusion multimodal models without sacrificing performance?
  • RQ2How does modality-specific parameter allocation compare to mixed-modal expert routing in terms of FLOPs savings and training stability?
  • RQ3What is the impact of combining modality-aware MoE with mixture-of-depths (MoD) on overall FLOPs reduction and inference accuracy?
  • RQ4Does modality-aware sparsity preserve the empirical scaling law observed in dense models?
  • RQ5How sensitive is the performance of MoD-enhanced models to router accuracy in causal inference scenarios?

Key findings

  • Under a 1-trillion-token training budget, the MoMa 1.4B model achieves 3.7× overall FLOPs savings compared to a compute-matched dense baseline, with 2.6× for text and 5.2× for image processing.
  • The MoMa model outperforms standard expert-choice MoE with 8 mixed-modal experts, which achieves only 3× overall FLOPs savings (3× for text, 2.8× for image).
  • Combining MoMa with mixture-of-depths (MoD) increases FLOPs savings to 4.2× overall (3.4× for text, 5.3× for image), demonstrating further efficiency gains.
  • Despite higher FLOPs savings, the MoMaD model shows degraded performance in causal inference tasks due to increased sensitivity to router accuracy.
  • The MoMa architecture maintains a stable empirical scaling law, indicating scalability for future large-scale multimodal pre-training.
  • A modality-untied upcycling technique further improves performance, suggesting potential for architectural enhancements.
Figure 2 : Architecture of transformer layer consisting of MoMa combined with mixture-of-depths (MoD).
Figure 2 : Architecture of transformer layer consisting of MoMa combined with mixture-of-depths (MoD).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.