What Matters in Training a GPT4-Style Language Model with Multimodal Inputs?

Yan Zeng, Hanbo Zhang, Jiani Zheng, Jiangnan Xia, Guoqiang Wei, Yang Wei, Yuchen Zhang, Tao Kong, Ruihua Song

Introduction

While Large Language Models (LLMs) have achieved remarkable success in text-based tasks, extending their capabilities to multimodal inputs remains a significant challenge. Open-source multimodal models frequently struggle with two primary issues: hallucination, where the model generates facts unsupported by the visual input, and diminished instruction-following, where the model fails to adhere to complex user requests that its text-only counterparts would easily handle.

Figure 2: Comparison of existing multimodal models showing issues with hallucination and instruction following.

Researchers from Renmin University and ByteDance introduce Lynx, an 8B-parameter multimodal LLM designed to bridge the performance gap with proprietary models like GPT-4V. By systematically investigating training recipes, the authors identify that data quality and prompt diversity are more critical than sheer volume.

Architecture

Lynx utilizes a Vicuna-7B (an instruction-tuned LLaMA) as its primary language engine. The architecture integrates several key components:

  • Vision Encoder: An EVA-1B model extracts high-level image features.
  • Resampler: This mechanism condenses long sequences of visual tokens into 32 "query" tokens, optimizing processing efficiency.
  • Trainable Adapters: Small modules are inserted every two blocks of the LLM. These adapters allow the model to process visual information without degrading its pre-existing linguistic capabilities.
Figure 6: (a) Overall architecture of Lynx showing the insertion of adapters into the language model blocks. (b) Detailed structure of the adapter module.

Training Methodology

The training process for Lynx follows a structured three-stage recipe:

  1. Alignment: Adapters and the resampler are trained on 120M image-text pairs at a base resolution of 224x224.
  2. Resolution Enhancement: The input resolution is increased to 420x420, enabling the model to perceive finer details essential for tasks like OCR and small object detection.
  3. Instruction Fine-tuning: The model is trained on a balanced mixture of multimodal and pure-NLP instruction data to maintain its utility as a general-purpose assistant.

Additionally, the authors propose a "describe-then-act" inference strategy. By prompting the model to describe the image in detail before answering a specific question, the model's reasoning is grounded in visual evidence, significantly reducing hallucinations.

Key Insights

The study reveals several critical factors for successful multimodal training:

  • Quality Over Quantity: Training on massive but noisy datasets can be detrimental. High-quality, clean captions are vital for effective visual-linguistic alignment.
  • The "NLP Boost": Incorporating pure-text instruction data during multimodal training prevents the model from losing its instruction-following abilities.
  • Pre-tuned Foundations: Starting with an instruction-tuned model like Vicuna yields better results than starting from a raw base model like LLaMA.
  • Chain-of-Thought for Vision: Forcing the model to generate a description first acts as a visual grounding step, leading to more accurate and detailed responses.

Results and Evaluation

Lynx demonstrates state-of-the-art performance among models of comparable size (~7B parameters):

  • MME Benchmark: Lynx achieved top scores, particularly in perception tasks such as object counting and color recognition.
  • VisIT-bench: Evaluated by GPT-4, Lynx ranked 3rd overall, outperforming several larger and specialized models.
  • Resolution Impact: Increasing resolution from 224 to 420 improved OCR accuracy from 55.6% to 67.9%, highlighting the importance of spatial detail.

Conclusion

Lynx provides a blueprint for developing high-performance multimodal LLMs. By prioritizing data quality, maintaining linguistic instruction-following, and employing grounded inference techniques, Lynx narrows the gap between open-source models and state-of-the-art proprietary systems. Future work will focus on scaling the model parameters and enhancing multilingual support and safety guardrails.

Summary updated

BibTeX
@inproceedings{zeng2024what,
  author = {Yan Zeng and Hanbo Zhang and Jiani Zheng and Jiangnan Xia and Guoqiang Wei and Yang Wei and Yuchen Zhang and Tao Kong and Ruihua Song},
  title = {{What Matters in Training a GPT4-Style Language Model with Multimodal Inputs?}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.440},
}
Figure