TinyGPT-V: Efficient Multimodal Large Language Model via Small Backbones

Zhengqing Yuan, Zhaoxu Li, Weiran Huang, Yanfang Ye, Lichao Sun

TL;DR

This paper introduces TinyGPT-V, an open-source multimodal large language model (MLLM) that achieves comparable performance to much larger models while requiring significantly fewer computational resources for training and inference. It leverages a compact architecture with the Phi-2 language model and innovative training techniques to make powerful MLLMs more accessible and deployable on resource-constrained devices.

What Problem Does This Paper Address?

The field of multimodal large language models (MLLMs) has seen impressive progress with models like GPT-4V, but these advancements come with significant drawbacks: they are often closed-source, computationally expensive to train and run, and thus inaccessible to many researchers and developers. Existing open-source MLLMs, while improving, still demand substantial computational resources, limiting their practical application on everyday hardware. This paper aims to bridge this gap by developing an efficient, open-source MLLM that democratizes access to advanced vision-language capabilities.

Methods

TinyGPT-V's core innovation lies in its efficient architecture and training strategy. It utilizes:

  • Compact Backbone: Instead of massive language models, TinyGPT-V employs the Phi-2 language model (2.8 billion parameters), known for its strong performance despite its smaller size.
  • Pre-trained Vision Encoder: It uses pre-trained vision encoders (EVA and CLIP) that are kept frozen during training, reducing computational load.
  • Unique Mapping Module: A novel mapping module (specifically, Q-Former layers from BLIP-2) is used to fuse visual features from the encoder with the language model's input. This module is crucial for bridging the modality gap.
  • Efficient Training Regimen: The model is trained in four stages, with a focus on optimizing for small backbones. This includes:
  • Warm-up Training: Initial stage to align text and image semantics.
  • Pre-training: Training the LoRA module for multimodal data.
  • Instruction Tuning: Fine-tuning with instruction-following datasets.
  • Multi-task Learning: Enhancing conversational abilities and generalization.
  • Normalization Techniques: To combat training instability (NaN/INF values) common with smaller models and multimodal data, TinyGPT-V incorporates post-norm and input norm mechanisms from LLaMA-2, along with Query-Key Normalization.
  • LoRA (Low-Rank Adaptation): This technique is used for efficient fine-tuning, allowing for adaptation without significantly increasing inference time or model size.
  • Quantization: For inference, the model utilizes techniques like 8-bit quantization, enabling deployment on devices with as little as 8GB of memory.

Datasets

TinyGPT-V is trained on a diverse amalgamation of datasets, including:

  • Image-text pairs: LAION, Conceptual Captions (CC3M), SBU.
  • Instruction tuning: MiniGPT-4 (for CC & SBU).
  • Captioning: Text Captions, COCO Captions.
  • Visual Reasoning: GQA, VQAv2, OK-VQA, AOK-VQA, OCR-VQA.
  • Multimodal Instruction: LLaVA dataset, Flickr30k, and custom multi-task conversation datasets.
  • Language Generation: Unnatural Instructions.

The paper does not introduce new benchmarks but leverages existing ones for evaluation.

Key Insights and Ideas

  • Small Backbones Can Be Powerful: The study demonstrates that by carefully selecting a compact LLM (Phi-2) and employing specialized training techniques, it's possible to achieve performance comparable to much larger MLLMs. This challenges the "bigger is always better" paradigm.
  • Normalization is Crucial for Small LLMs: Training smaller LLMs on multimodal data is prone to instability (gradient vanishing, NaN/INF values). The paper highlights the critical role of specific normalization techniques (post-norm, input norm, QK norm) in stabilizing training and enabling progress.
  • Efficiency is Key for Accessibility: TinyGPT-V's low training (24GB GPU) and inference (8GB GPU/CPU) requirements, coupled with its open-source nature, significantly democratize access to advanced MLLM capabilities.
  • Modular Design for Efficiency: The use of frozen vision encoders and LoRA for fine-tuning contributes to the model's efficiency without sacrificing performance.

Key Results

  • Performance: TinyGPT-V achieves comparable results to larger models (e.g., LLaVA-1.5, InstructBLIP) on various vision-language tasks, including VQA and image inference. For instance, it scores 54.7% on the VSR zero-shot task, outperforming larger models.
  • Efficiency:
    • Training: Requires only 24GB of GPU memory.
  • Inference: Can run on devices with as little as 8GB of GPU or CPU memory.
  • Inference Speed: Generates words at a rate of 0.067 seconds per word, significantly faster than LLaVA (0.426s/word) and MiniGPT-4 (0.300s/word).
  • Qualitative Findings: TinyGPT-V provides concise and accurate visual interpretations, often outperforming other models in delivering precise answers and avoiding speculative or incorrect suggestions.

Limitations and Future Work

  • Limitations:
    • The paper notes that smaller LLMs are more prone to training difficulties, and the removal of specific modules (LoRA, normalization layers) can lead to immediate training failure.
  • While competitive, TinyGPT-V's performance on GQA (38.9%) still lags behind the top score of InstructBLIP (49.5%), indicating room for improvement.
  • Future Work: The authors envision their work catalyzing further explorations into developing compact MLLMs for diverse applications, suggesting that this approach opens doors for more accessible and efficient multimodal AI. They also highlight the ongoing challenge of training smaller LLMs for MLLMs and the need for robust normalization and architectural components.

Summary updated

BibTeX
@inproceedings{yuan2024tinygpt,
  author = {Zhengqing Yuan and Zhaoxu Li and Weiran Huang and Yanfang Ye and Lichao Sun},
  title = {{TinyGPT-V: Efficient Multimodal Large Language Model via Small Backbones}},
  booktitle = {WANT @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=lvmjTZQhRk},
}
Figure