LLaVA-Phi: Efficient Multi-Modal Assistant with Small Language Model

Yichen Zhu, Minjie Zhu, Ning Liu, Zhiyuan Xu, Yaxin Peng

Introduction

The current landscape of Large Vision-Language Models (LVLMs), exemplified by systems like GPT-4V and LLaVA, is dominated by massive architectures. Most open-source models rely on language backbones with at least 7 billion parameters, such as LLaMA or Vicuna. While these models are highly capable, their computational demands present a significant barrier to deployment in latency-sensitive or resource-constrained environments, including mobile devices, robotics, and autonomous vehicles.

LLaVA-Phi addresses this "efficiency gap" by demonstrating that a compact model can achieve high-level reasoning and multi-modal understanding. By integrating a 2.7B parameter Small Language Model (SLM) into the LLaVA framework, the researchers have created an assistant that is small enough for edge deployment yet smart enough to rival models three times its size.

Model Architecture

LLaVA-Phi is built upon the LLaVA-1.5 framework, utilizing a modular design that connects visual perception with linguistic reasoning through three primary components:

  1. Vision Encoder: The model employs a pre-trained CLIP ViT-L/14 encoder. Operating at a 336x336 resolution, this component is responsible for extracting high-level visual features from input images.
  2. The MLP Projector: A two-layer Multi-Layer Perceptron (MLP) acts as a bridge, translating the visual features from the CLIP encoder into the embedding space of the language model. This allows the language backbone to process visual information as a sequence of "tokens."
  3. Language Model (Phi-2): At the core of LLaVA-Phi is Microsoft’s Phi-2, a 2.7B parameter model. Phi-2 was selected for its unique pre-training on "textbook-quality" data, which provides it with mathematical and logical reasoning capabilities that far exceed typical models in its weight class.

Training Methodology

The training of LLaVA-Phi is divided into two distinct stages to ensure both feature alignment and instruction-following capability:

  • Stage 1: Feature Alignment: In this phase, the Phi-2 language model and the CLIP vision encoder are kept frozen. Only the MLP projector is trained using a subset of the CC-595K dataset. This stage ensures that the model can correctly map visual concepts to their corresponding linguistic representations.
  • Stage 2: Visual Instruction Tuning: During this stage, both the MLP projector and the Phi-2 backbone are fine-tuned together. Using the LLaVA-Instruct-150K dataset, the model learns to follow complex, multi-modal instructions, enabling it to engage in conversational dialogue and solve tasks based on visual input.

This streamlined training process is remarkably efficient, requiring only approximately 9.5 hours of compute time on 8 A100 GPUs.

Experimental Evaluation

LLaVA-Phi was evaluated against a suite of eight benchmarks designed to test general visual question answering, scientific reasoning, and object hallucination. The results highlight the model's efficiency:

  • ScienceQA: LLaVA-Phi achieved a score of 68.4%, notably outperforming the much larger LLaVA-1.5-7B (66.8%) and InstructBLIP-13B (63.1%).
  • MMBench: The model scored 59.8%, surpassing other mobile-optimized models like MobileVLM.
  • POPE & VizWiz: The model showed robust performance in identifying objects and assisting with queries relevant to the visually impaired, maintaining competitive accuracy despite its smaller footprint.

Qualitative Capabilities

The model’s reliance on Phi-2 grants it specialized strengths inherited from its "textbook" pre-training. LLaVA-Phi excels in OCR-to-Code tasks, such as interpreting a screenshot of a data table and generating the Python code necessary to visualize that data.

Furthermore, the model demonstrates a degree of empathetic reasoning and cultural understanding. For instance, when presented with memes, LLaVA-Phi can move beyond literal description to explain the underlying humor or emotional context, such as associating a tired animal with the common fatigue associated with the start of a workweek.

Limitations and Future Directions

While LLaVA-Phi represents a breakthrough in efficient multi-modal AI, it has specific limitations:

  • Language Support: The model is currently restricted to English due to the constraints of the Phi-2 tokenizer.
  • Vision Scaling: Future research may explore larger or more specialized vision encoders to see if the SLM backbone can support even higher-resolution visual processing.
  • Refinement: The authors intend to apply advanced tuning techniques, such as Direct Preference Optimization (DPO), to further reduce hallucinations and improve the helpfulness of the model's responses.

Conclusion

LLaVA-Phi proves that high-quality training data and efficient architecture can compensate for lower parameter counts. By outperforming 7B and 13B models on key reasoning benchmarks, LLaVA-Phi sets a new standard for what is possible with small-scale, edge-compatible multi-modal assistants.

Summary updated

BibTeX
@misc{zhu2024llava,
  author = {Yichen Zhu and Minjie Zhu and Ning Liu and Zhiyuan Xu and Yaxin Peng},
  title = {{LLaVA-Phi: Efficient Multi-Modal Assistant with Small Language Model}},
  year = {2024},
  eprint = {2401.02330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.02330},
}
Figure