Accelerating Pre-training of Multimodal LLMs via Chain-of-Sight

Ziyuan Huang, Kaixiang Ji, Biao Gong, Zhiwu Qing, Qinglong Zhang, Kecheng Zheng, Jian Wang, Jingdong Chen, Ming Yang · DOI

TL;DR

This paper introduces "Chain-of-Sight," a novel module for Multimodal Large Language Models (MLLMs) that significantly accelerates pre-training by strategically reducing the number of visual tokens used. By employing multi-scale visual resamplers and a "compound token scaling" strategy, the model achieves a 73% reduction in pre-training time without sacrificing performance, and even shows potential for improved results with increased token usage during fine-tuning.

What Problem Does This Paper Address?

Training state-of-the-art Multimodal Large Language Models (MLLMs) is incredibly computationally expensive, requiring tens of thousands of GPU hours. A major bottleneck is the sheer volume of visual tokens processed during pre-training. While current MLLMs often use hundreds of visual tokens per image, this leads to prohibitively long training times and a significant carbon footprint. Existing methods that try to reduce visual tokens during pre-training often suffer a performance drop. The challenge is to accelerate pre-training without compromising the model's ability to understand and generate rich visual-linguistic content.

Methods

The core of Chain-of-Sight lies in its multi-scale visual resamplers. Instead of processing visual features at a single scale, these resamplers capture visual details across various spatial scales by partitioning image features into windows of different sizes. This allows for a more nuanced representation of visual information.

The key innovation is the "compound token scaling" strategy. During pre-training, Chain-of-Sight intentionally uses a reduced number of visual tokens (e.g., ~90% fewer). This significantly speeds up training by allowing larger batch sizes and reducing computation per step. Crucially, after pre-training, the model can scale up the number of visual tokens during fine-tuning. This scaling is achieved through a combination of:

  • Resolution Scaling: Increasing the input image resolution to generate more tokens.
  • Window Scaling: Decreasing the window sizes within the multi-scale resamplers to generate more local tokens.

This post-pre-training scaling allows the model to leverage a richer set of visual details during fine-tuning, compensating for the reduced token count during the initial, computationally intensive pre-training phase. The resamplers are initialized using parameters from pre-trained visual models, and new visual queries are initialized using a nearest neighbor strategy.

Datasets

The paper utilizes several datasets for pre-training and evaluation:

Pre-training Data: * COYO [7] * CC3M & CC12M [84] * COCO [53] * VG Caption [38] * SBU [74]

Evaluation Benchmarks: * Captioning: NoCaps [1], Flickr [75], COCO [53] * General VQA: VQAv2 [31], GQA [34], OK-VQA [67], ScienceQA-Img [64] * Text-rich benchmarks: TextVQA [86], TextCaps [85] * LVLM Benchmarks: SEED-Bench [42], MMBench [58], MMMU [103] * Grounding: RefCOCO [37], RefCOCO+ [102], RefCOCOg [66] * Referring Expression Comprehension: RefCOCO, RefCOCO+, RefCOCOg

Key Insights and Ideas

  • The bottleneck is visual tokens during pre-training: The paper strongly argues that the sheer number of visual tokens is the primary driver of long MLLM pre-training times, not necessarily the text tokens.
  • Pre-training and fine-tuning have different optimal token counts: The key insight is that fewer visual tokens are sufficient and beneficial for pre-training efficiency, while more tokens are needed for optimal fine-tuning performance. Chain-of-Sight bridges this gap.
  • Multi-scale features are crucial: Capturing visual information at different scales (global and local) is more effective than relying on a single scale, even with a reduced token count.
  • Compound scaling unlocks flexibility: Combining resolution and window scaling provides a powerful mechanism to dynamically adjust the number of visual tokens, allowing for significant acceleration without performance loss.
  • Efficiency doesn't have to mean compromise: The work demonstrates that significant speedups in pre-training are achievable without sacrificing downstream task performance, and in some cases, even improving it.

Key Results

  • Pre-training Acceleration: Chain-of-Sight achieves up to a 73% reduction in wall-clock training time by using significantly fewer visual tokens (e.g., 32 tokens) during pre-training compared to standard methods using hundreds of tokens.
  • Performance Preservation: The model pre-trained with a reduced token count (e.g., 32 tokens) matches or surpasses the performance of models trained with a full set of visual tokens throughout the entire training process.
  • Fine-tuning Gains: Scaling up the number of visual tokens during fine-tuning (e.g., to 1296 tokens) leads to improved performance, competitive with existing approaches.
  • Efficiency with fewer tokens: Even with only 32 visual tokens during pre-training, Chain-of-Sight achieves comparable or better performance than standard resamplers using 336 tokens, while taking only 0.27x the wall-clock training time.
  • Improved Visual Resamplers: When using the same number of tokens (80), Chain-of-Sight's multi-scale approach outperforms standard resamplers, particularly in captioning and text recognition tasks.

Limitations and Future Work

  • Parameter-Efficient Fine-Tuning (PEFT): The current implementation uses PEFT (LoRA) for language model adaptation. The authors acknowledge that this might limit generality compared to full fine-tuning, but it was a practical choice due to resource constraints. They suggest that their efficient pre-training methods have strong potential beyond the presented results.
  • Generalizability of PEFT: The generality of the final model might be limited compared to approaches that fine-tune the entire language model.
  • Future Work: The paper's success suggests that further exploration into efficient pre-training methods for MLLMs is warranted. The authors hope their work will facilitate further investigations in this area. The ability to scale tokens post-pre-training also opens avenues for more adaptive and efficient training pipelines.

Summary updated

Abstract

This paper introduces Chain-of-Sight, a vision-language bridge module that accelerates the pre-training of Multimodal Large Language Models (MLLMs). Our approach employs a sequence of visual resamplers that capture visual details at various spacial scales. This architecture not only leverages global and local visual contexts effectively, but also facilitates the flexible extension of visual tokens through a compound token scaling strategy, allowing up to a 16x increase in the token count post pre-training. Consequently, Chain-of-Sight requires significantly fewer visual tokens in the pre-training phase compared to the fine-tuning phase. This intentional reduction of visual tokens during pre-training notably accelerates the pre-training process, cutting down the wall-clock training time by ~73%. Empirical results on a series of vision-language benchmarks reveal that the pre-train acceleration through Chain-of-Sight is achieved without sacrificing performance, matching or surpassing the standard pipeline of utilizing all visual tokens throughout the entire training process. Further scaling up the number of visual tokens for pre-training leads to stronger performances, competitive to existing approaches in a series of benchmarks.
BibTeX
@inproceedings{huang2024accelerating,
  author = {Ziyuan Huang and Kaixiang Ji and Biao Gong and Zhiwu Qing and Qinglong Zhang and Kecheng Zheng and Jian Wang and Jingdong Chen and Ming Yang},
  title = {{Accelerating Pre-training of Multimodal LLMs via Chain-of-Sight}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=KHcB1drMRX},
}
Figure