LLaVA-Gemma: Accelerating Multimodal Foundation Models with a Compact Language Model

Musashi Hinck, Matthew L. Olson, David Cobbley, Shao-Yen Tseng, Vasudev LalarXiv 2024 · DOI

Abstract

This study explores the integration of Google’s compact Gemma Large Language Models (LLMs) into the LLaVA framework to create efficient Multimodal Foundation Models. By evaluating Gemma-2B and Gemma-7B across various vision encoders and training strategies, we identify a "scaling paradox" where the smaller 2B model often outperforms the 7B variant. Our findings emphasize the critical role of connector pretraining and the potential of DINOv2 as a vision backbone for compact models.

Introduction

The rapid advancement of Large Multimodal Models (LMMs) has primarily focused on scaling up parameters, often at the cost of high computational requirements. However, real-world applications on mobile and edge devices necessitate "scaling down" to more efficient, compact architectures. LLaVA-Gemma investigates the limits of these small-scale models by leveraging the Gemma-2B and Gemma-7B LLMs within the established LLaVA framework, testing how language model size and visual encoding strategies influence multimodal understanding.

Methods and Datasets

The LLaVA-Gemma architecture comprises three main components: a vision encoder (CLIP or DINOv2), a Gemma-based LLM, and a Multi-Layer Perceptron (MLP) connector. Training follows a two-stage recipe:

  1. Pretraining: Aligning visual features with language embeddings using 595k image-caption pairs.
  2. Instruction Tuning: Jointly fine-tuning the LLM and connector on 665k multimodal instruction-following examples.

Models were evaluated on seven major benchmarks, including GQA and VQAv2 for visual question answering, MME and MM-Vet for general reasoning, and POPE for object hallucination assessment.

Results and the Scaling Paradox

Evaluation results revealed a surprising "scaling inconsistency": the 7B-parameter model frequently underperformed compared to the 2B-parameter model on several benchmarks, including GQA, MME, and POPE. This suggests that simply increasing the size of the LLM backbone does not guarantee improved multimodal performance and that the interaction between the vision encoder and the language model is highly complex.

Table 1: Performance comparison of LLaVA-Gemma variants across multiple benchmarks.

As shown in Table 1, the Gemma-2B + DINOv2 configuration emerged as the strongest variant, achieving a score of 0.587 on GQA and 1133 on MME Perception. Ablation studies confirmed that skipping the initial connector pretraining leads to a near-universal drop in performance, refuting recent suggestions that this stage might be optional for compact models.

Visualizing Model Focus

To investigate why the 7B model sometimes fails despite its larger capacity, the authors utilized relevancy maps to visualize visual attention. The analysis showed that the 7B model often exhibits sharper, more concentrated attention than the 2B model. Even when the 2B model provides a plausible but incorrect answer, the 7B model is frequently observed "looking" at the correct visual cues, such as the boundary between an object and its environment.

Figure 1: Relevancy maps comparing the visual attention of LLaVA-Gemma 2B and 7B models.

Conclusion and Future Work

LLaVA-Gemma demonstrates that 2B-parameter models can be highly effective for multimodal tasks, provided they are paired with appropriate vision encoders and training recipes. The observed scaling paradox highlights the need for better alignment strategies for larger compact models. While LLaVA-Gemma currently trails some state-of-the-art models like LLaVA-Phi-2, the public release of its code and weights provides a foundation for future research into optimizing small-scale multimodal intelligence.

Summary updated

BibTeX
@misc{hinck2024llava,
  author = {Musashi Hinck and Matthew L. Olson and David Cobbley and Shao-Yen Tseng and Vasudev Lal},
  title = {{LLaVA-Gemma: Accelerating Multimodal Foundation Models with a Compact Language Model}},
  year = {2024},
  eprint = {2404.01331},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.01331},
}
Figure