MammothModa: Multi-Modal Large Language Model

Qi She, Junwen Pan, Xin Wan, Rui Zhang, Dawei Lu, Kai HuangarXiv 2024

Abstract

In this report, we introduce MammothModa, yet another multi-modal large language model (MLLM) designed to achieve state-of-the-art performance starting from an elementary baseline. We focus on three key design insights: (i) Integrating Visual Capabilities while Maintaining Complex Language Understanding: In addition to the vision encoder, we incorporated the Visual Attention Experts into the LLM to enhance its visual capabilities. (ii) Extending Context Window for High-Resolution and Long-Duration Visual Feature: We explore the Visual Merger Module to effectively reduce the token number of high-resolution images and incorporated frame position ids to avoid position interpolation. (iii) High-Quality Bilingual Datasets: We meticulously curated and filtered a high-quality bilingual multimodal dataset to reduce visual hallucinations. With above recipe we build MammothModa that consistently outperforms the state-of-the-art models, e.g., LLaVA-series, across main real-world visual language benchmarks without bells and whistles.

Introduction

Modern Multi-Modal Large Language Models (MLLMs) face a "triple threat" of challenges that hinder their deployment and effectiveness. First is Language Degradation: fine-tuning a language model on visual data often leads to "catastrophic forgetting" of original linguistic intelligence, such as reasoning and coding. Second is Token Explosion: high-resolution images and long videos generate massive visual tokens, overwhelming context windows and slowing inference. Third is Positional Confusion: standard models struggle with long video sequences due to training limitations on positional embeddings.

MammothModa addresses these efficiency and capability gaps. By introducing specialized Visual Attention Experts to protect language skills and a Visual Merger module to compress high-resolution tokens, MammothModa achieves state-of-the-art performance, outperforming the LLaVA-series and other leading models across major vision-language benchmarks.

Methods

The architecture of MammothModa is built upon three core design pillars aimed at balancing visual acuity with linguistic integrity.

Visual Attention Experts (VE)

To prevent the degradation of the model's language "brain" during multi-modal training, we insert specialized "experts"—specific Query-Key-Value (QKV) matrices—into the transformer layers. These experts handle visual tokens exclusively, while the original weights remain focused on language. This modular approach ensures that the model gains visual capabilities without sacrificing its reasoning and math skills.

Table 2: Impact of Visual Attention Experts (VE) on maintaining language understanding performance.

Visual Merger (VM) Module and High-Resolution Splitting

To handle high-resolution images (up to 1008x1344) and videos efficiently, the VM module employs mean pooling to aggregate spatial features. This significantly reduces token counts, providing a 1.34x speedup during inference while preserving essential visual information. Furthermore, the Global-Local High-Resolution Splitting (GLHR) strategy dynamically divides large images into up to 12 patches (336x336), processing a global low-res view alongside local high-res patches to capture both context and fine detail.

Shared Frame Position IDs (FPID)

For video processing, rather than assigning a unique ID to every token in every frame—which would quickly exhaust the context window—MammothModa assigns a shared positional ID to all tokens within a single frame. This allows the model to process long videos without the need for performance-degrading positional interpolation.

Results

MammothModa was evaluated against a comprehensive suite of benchmarks, including MMBench, MMStar, MMMU, MathVista, AI2D, OCRBench, and MMVet.

Leaderboard Performance

MammothModa achieved an average score of 61.2 across these benchmarks, ranking it above several prominent models such as InternVLChatV1.5 and GLM-4v. Its performance is particularly notable given the efficiency of its architecture.

Table 1: Performance comparison of MammothModa against state-of-the-art MLLMs across various benchmarks.

Key Insights

  • The "Expert" Advantage: Ablation studies show that standard fine-tuning causes MMLU scores to drop by 2.8 points. However, with Visual Attention Experts, the model's language score actually improved by 1.6 points while simultaneously enhancing its visual performance.
  • Efficiency via Mean Pooling: While other models use complex resamplers, MammothModa demonstrates that simple mean pooling is highly effective, reducing test time costs from 398 seconds to 298 seconds with negligible loss in accuracy.
  • Resolution and OCR: Moving to a dynamic 12-patch split (DS-12) resulted in a 105-point jump on OCRBench, highlighting the necessity of raw pixel access for document-heavy tasks.

Conclusion

MammothModa demonstrates that state-of-the-art MLLM performance can be achieved through thoughtful architectural design rather than mere scaling. By isolating visual processing through Attention Experts and efficiently managing token counts with the Visual Merger module, the model maintains high linguistic intelligence while excelling in visual tasks. Future work may explore further modularization, such as adding task-specific experts for OCR or video, to push the boundaries of multi-modal understanding even further.

Summary updated

BibTeX
@misc{she2024mammothmoda,
  author = {Qi She and Junwen Pan and Xin Wan and Rui Zhang and Dawei Lu and Kai Huang},
  title = {{MammothModa: Multi-Modal Large Language Model}},
  year = {2024},
  eprint = {2406.18193},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.18193},
}
Figure