TL;DR
This paper introduces LLaVA-Phi, a novel multi-modal assistant that leverages the compact Phi-2 language model to achieve impressive performance on vision-language tasks. By combining a small language model with a robust vision encoder, LLaVA-Phi offers a more resource-efficient alternative to larger models, opening doors for real-time applications on edge devices.
What Problem Does This Paper Address?
The field of multi-modal AI, particularly vision-language models (VLMs), has seen rapid progress with powerful models like GPT-4V and Gemini. However, these advancements often come with substantial computational demands, making them unsuitable for resource-constrained environments like mobile devices or real-time applications. While some smaller VLMs exist, they may not always match the performance of their larger counterparts. This paper addresses the challenge of creating efficient, yet capable, multi-modal assistants that can perform complex vision-language tasks without requiring massive computational resources. The authors aim to demonstrate that smaller language models, when trained effectively, can bridge this gap.
Methods
LLaVA-Phi builds upon the established LLaVA-1.5 architecture, which consists of a vision encoder and a language model connected by a projector. The key innovation here is the replacement of the larger language model backbone with the significantly smaller Phi-2 model (2.7B parameters). The training pipeline mirrors that of LLaVA-1.5, involving a pre-training stage and a subsequent supervised fine-tuning (SFT) phase using high-quality visual instruction tuning data.
- Vision Encoder: Utilizes the pre-trained CLIP ViT-L/14.
- Projector: A two-layer MLP connects the visual encoder to the language model.
- Language Model: Employs the compact Phi-2 model.
- Training:
- Pre-training: A filtered subset of the CC-595K dataset is used for one epoch with a learning rate of 1e-3 and a batch size of 256.
- Supervised Fine-tuning (SFT): The LLaVA-Instruct-150K dataset is used for one epoch with a learning rate of 2e-5 and a batch size of 256. The authors note that while SFT might be optional, it leads to modest improvements.
- Optimizer: Adam optimizer with specific momentum and epsilon values.
- Parameter Tuning: All parameters in the LLM are fine-tuned, not just the projector.
Datasets
- Training:
- CC-595K dataset (filtered subset) for pre-training.
- LLaVA-Instruct-150K dataset for supervised fine-tuning.
- ShareGPT data was also utilized for fine-tuning.
- Evaluation: The model was evaluated on a comprehensive suite of benchmarks, including:
- General Question Answering: VQA-v2, VizWizQA, ScienceQA, TextQA.
- Object Hallucination: POPE.
- Multi-modal Abilities: MME, MMBench, MM-Vet.
Key Insights and Ideas
- Small LLMs Can Be Powerful Multi-modal Backbones: The most significant insight is that even a 2.7B parameter LLM like Phi-2, when integrated into a well-designed VLM architecture and trained on quality data, can achieve performance comparable to or even exceeding much larger models.
- Efficiency is Key for Real-World Deployment: LLaVA-Phi's smaller size makes it a strong candidate for applications requiring low latency and reduced computational footprint, such as robotics and embodied AI.
- Quality of Training Data Matters: The paper emphasizes that high-quality corpora are crucial for enabling smaller models to engage in intricate multi-modal dialogues.
- Phi-2's Strengths Translate to Multi-modal Tasks: Phi-2's pre-training on code and mathematical corpora appears to contribute to LLaVA-Phi's strong performance in tasks involving code generation and solving mathematical problems.
Key Results
- Competitive Performance: LLaVA-Phi, despite having only 3 billion parameters, achieves performance comparable to or surpassing some larger multi-modal models that are three times its size.
- ScienceQA Excellence: LLaVA-Phi demonstrates exceptional proficiency in ScienceQA, outperforming existing large multi-modal models. This is attributed to Phi-2's specialized training.
- Qualitative Successes:
- Empathetic Reasoning: LLaVA-Phi provides more empathetic responses in explaining humorous memes compared to LLaVA-1.5.
- Accurate Code Generation: It can generate accurate Python code for tasks like creating bar charts from tables, unlike LLaVA-1.5 which provided a simplistic, incomplete solution.
- Precise Math Solving: LLaVA-Phi accurately solves mathematical equations, even when LLaVA-1.5 misinterprets the symbols.
- Outperforming Larger Models: LLaVA-Phi outperformed models using 7B-parameter or larger LLMs as their backbone, such as IDEFICS and InstructBLIP, on several benchmarks. It also showed significant advantages over MobileVLM.
Limitations and Future Work
- Limitations:
- Multilingual Support: Due to Phi-2's codegen-mono tokenizer and the lack of specific multilingual fine-tuning, LLaVA-Phi currently struggles with instructions in languages other than English, including Chinese.
- Future Work:
- Explore LoRA/QLoRA: Investigate the use of techniques like LoRA and QLoRA to further reduce training time and computational costs.
- Visual Encoder Size: Examine the impact of varying the size of the visual encoder.
- Refined Training Strategies: Explore advanced training strategies, including direct preference optimization and RLHF, to enhance performance and further reduce model size.
- Multilingual Capabilities: Address the current limitations in multilingual instruction following.
Summary updated