Jointly Training Large Autoregressive Multimodal Models

Emanuele Aiello, Lili Yu, Yixin Nie, Armen Aghajanyan, Barlas Oguz

Introduction

In recent years, advances in the large-scale pretraining of language and text-to-image models have revolutionized machine learning. However, integrating these two modalities into a single, robust model capable of generating seamless, interleaved text and image outputs remains a significant challenge. Most existing multimodal models are asymmetric, focusing either on vision understanding (image-to-text) or generating a single image from a prompt. Training a massive, truly multimodal model from scratch is prohibitively expensive.

To address this, researchers introduce the Joint Autoregressive Mixture (JAM) framework. JAM provides a modular, data-efficient approach to systematically fuse existing pre-trained Large Language Models (LLMs) with text-to-image models, creating a unified architecture that retains the strengths of both.

The JAM Framework: Methods for Model Fusion

The core challenge JAM addresses is "model fusion": stitching together two expert models without losing performance in either modality. The authors explored three distinct methods to fuse two 7B-parameter, decoder-only transformer models (an LLM and the CM3leon image-text model):

  1. JAM-Uniform: A simple weight averaging of the two models, which requires them to share the same architecture.
  2. JAM-Width: A "wider" architecture where the hidden dimensions of both models are concatenated, resulting in a massive 26B parameter model.
  3. JAM-Cross: The most successful approach. This method inserts bi-directional cross-attention layers between the LLM blocks and the Image blocks.
The JAM-Cross architecture featuring bi-directional cross-attention layers between LLM and Text-Image blocks.

By allowing the text-generating layers to "peek" at the image-generating representations and vice-versa, JAM-Cross facilitates a deep, progressive exchange of information.

The Training Recipe

To train this fused model efficiently, the authors utilized a two-stage recipe:

  • Continued Pre-training: Instead of training on trillions of tokens from scratch, they used a budget of 50 billion tokens (a mix of Shutterstock image-caption pairs and standard text corpora) to align the two parent models.
  • Multimodal Instruction Tuning: Following the "LIMA" hypothesis—which posits that a model's core knowledge is learned during pre-training and only "style" or format is learned during tuning—they used a small, high-quality dataset (including 1,000 LIMA text prompts and 3,000 curated wikiHow interleaved articles) to teach the model how to format interleaved responses.
  • Modality Switching: The model learns to use a special <break> token to signal when it should stop generating text and transition to generating image tokens.

Key Insights and Results

The JAM framework demonstrates that highly efficient, deep fusion is possible. By starting with pre-trained parents, the authors achieved state-of-the-art interleaved generation using only ~1.3% of the total data used to train the original models. Furthermore, the study proves that the LIMA hypothesis holds for images: a massive dataset is not needed to teach a model how to interleave modalities if a small, "gold standard" set of examples is provided.

An example of the model's ability to generate high-quality, interleaved text and image content in response to a user prompt.

Performance Highlights: * Image Quality: JAM-Cross achieved an MS-COCO Perplexity of 147.6, outperforming both the 7B CM3leon baseline (149.0) and the 2.7B CM3 (200.1). * Text Retention: Despite the fusion, JAM-Cross maintained strong zero-shot performance on reasoning tasks, scoring 75.4 on PIQA and staying competitive with the original LLM. * Qualitative Superiority: Compared to previous models like GILL, JAM-Cross generates more exhaustive text and images that are highly relevant to the specific conversational context.

Limitations and Future Work

While groundbreaking, the JAM framework has current limitations. The model struggles to generate images for highly abstract concepts (e.g., "time travel"), performing best with concrete objects. Additionally, the current 4k token context window is a significant bottleneck; because a single image consumes 1,024 tokens, the model can only generate documents with 1–2 images before running out of memory.

Finally, the current study was limited to 7B parameter parent models. Scaling the cross-fusion method to larger models (e.g., 70B+) represents a highly promising direction for future research, though the model will likely continue to inherit the hallucination tendencies and biases of its autoregressive parents.

Summary updated

BibTeX
@inproceedings{aiello2024jointly,
  author = {Emanuele Aiello and LILI YU and Yixin Nie and Armen Aghajanyan and Barlas Oguz},
  title = {{Jointly Training Large Autoregressive Multimodal Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=5jcav5RcKw},
}
Figure