TL;DR
This paper introduces MoE-LLaVA, a novel sparse Large Vision-Language Model (LVLM) that uses a Mixture-of-Experts (MoE) architecture to achieve comparable or better performance than dense LVLMs while significantly reducing computational costs. They propose a three-stage training strategy, MoE-Tuning, to overcome common challenges in adapting MoE to LVLMs, such as modality gap and expert imbalance.
What Problem Does This Paper Address?
Scaling up Large Vision-Language Models (LVLMs) has led to significant performance improvements, but this often comes with prohibitively high training and inference costs due to all model parameters being active for every token. While Mixture-of-Experts (MoE) architectures offer a way to increase model capacity without a proportional increase in computation by activating only a subset of "experts" per token, applying MoE to LVLMs is challenging. Directly fine-tuning a pre-trained LLM into a sparse LVLM with MoE often results in performance degradation due to a gap in modality feature distributions and an imbalance in how tokens are routed to different experts. This paper aims to bridge this gap by proposing a robust training methodology and a corresponding sparse LVLM architecture.
Methods
The core innovation is the MoE-Tuning strategy, a three-stage process designed to smoothly transition a dense LLM into a sparse LVLM with MoE:
- Stage I: Focuses on adapting the LLM to visual inputs by training only a visual projection layer (MLP) that maps image tokens to the LLM's input domain. The LLM is trained to describe images.
- Stage II: Enhances the LVLM's multi-modal understanding capabilities by training the entire LLM (except the vision encoder) on diverse instruction-following tasks. This stage aims to bridge the modality feature gap.
- Stage III: This is where the MoE architecture is introduced. The feed-forward network (FFN) weights from Stage II are replicated to initialize the experts in the MoE layers. Only the MoE layers and their associated routers are trained, leveraging the well-initialized experts to avoid performance collapse. This stage effectively sparsifies the model.
The proposed architecture, MoE-LLaVA, incorporates MoE layers and learnable routers. During inference, a router dynamically dispatches each token to the top-k experts, while the remaining experts remain inactive, thus achieving computational efficiency.
Datasets
The paper utilizes several datasets for training and evaluation:
- LLaVA-PT: Used for Stage I pretraining.
- MIMIC-IT, LRV, SVIT, LVIS: Used for Stage II to provide robust multi-modal initialization.
- LLaVA-FT: Used for Stage III fine-tuning.
- Evaluation Benchmarks:
- Image Understanding: VQA-v2, GQA, VisWiz, SQA, TextVQA, POPE, MME, MMBench, LLaVAW, MM-Vet.
- Object Hallucination: POPE (Adversarial, Random, Popular subsets).
Key Insights and Ideas
- Decoupled Training is Crucial: Directly converting a dense LVLM to a sparse MoE LVLM is problematic. A staged approach, first adapting to vision and then sparsifying, is essential to prevent training collapse.
- Initialization Matters: Replicating FFN weights from a well-trained dense LVLM as initial weights for MoE experts is a key enabler for successful sparse LVLM training. This provides a strong starting point for the experts.
- Expert Specialization Emerges: While experts are initialized similarly, they learn to specialize in different tasks or modalities over time, as evidenced by the routing distributions. However, this specialization can be disordered if training data is insufficient.
- MoE-LLaVA Achieves High Performance with Fewer Active Parameters: The model demonstrates that sparsity can be achieved without sacrificing performance, often outperforming larger dense models.
Key Results
- Performance: MoE-LLaVA-1.8B×4 (2.2B active parameters) achieves comparable performance to LLaVA-1.5-13B on the POPE benchmark. MoE-LLaVA-2.7B×4 (3.6B active parameters) outperforms LLaVA-1.5-7B by an average of 4.6% across nine visual understanding benchmarks.
- Efficiency: MoE-LLaVA models achieve comparable or superior performance with significantly fewer activated parameters compared to dense models. For instance, MoE-LLaVA-StableLM-1.6B×4 achieves comprehensive superiority over IDEFICS-80B with only 2.0B activated parameters.
- Object Hallucination: MoE-LLaVA shows strong performance on object hallucination benchmarks, indicating it tends to generate objects consistent with the given image.
- Training Insights: The paper provides empirical guidelines for MoE-LLaVA, such as fine-tuning FFN layers being sufficient for good generalization and reducing training costs.
Limitations and Future Work
- Training Stability: The authors note difficulties in training stability, particularly with 16-bit float precision.
- Data Limitations for Larger Models: For larger models (e.g., OpenChat-7B), the performance of MoE-LLaVA is not as strong as expected, potentially due to insufficient multimodal fine-tuning data to support sparse pattern learning in 10B-level models.
- Future Work: The authors suggest expanding MoE-LLaVA to handle additional tasks like detection, segmentation, and generation, as well as incorporating more modalities such as video, depth, and thermal. Further research into improving training stability and exploring larger-scale sparse LVLMs with more data is also recommended.
Summary updated