Introduction
Large Vision-Language Models (LVLMs), such as LLaVA, have demonstrated remarkable capabilities in multi-modal reasoning. However, their deployment on edge devices like smartphones or robotics is hindered by massive memory requirements and slow inference speeds. Post-training quantization (PTQ) is a common technique to address these issues by converting high-precision weights and activations into lower-bit formats (e.g., INT4).
Traditional PTQ methods often optimize rounding functions on a layer-by-layer basis. This "greedy" approach fails to account for cross-layer dependencies, where quantization errors accumulate and compound across the network. While a global search across all layers would be ideal, it is computationally intractable. Q-VLM addresses this by identifying interdependent layers and grouping them into blocks for joint optimization, striking a balance between efficiency and accuracy.
Methodology
Q-VLM introduces two primary innovations to enhance the quantization process for LVLMs:
1. Mining Cross-Layer Dependency via Entropy
The core of Q-VLM is the discovery that Information Entropy of a layer's activations serves as a reliable proxy for its sensitivity to quantization noise from preceding layers. By partitioning the model into blocks based on entropy levels, the framework can perform a joint search for rounding functions within these blocks. This minimizes cumulative discretization errors that a simple layer-wise search would overlook.
2. Visual Encoder Optimization
The visual encoder's output significantly impacts the activation distribution of the subsequent language model. Q-VLM fine-tunes the visual encoder using a multi-objective loss function that combines Auto-Regressive loss with a Discretization loss. This optimization helps "disentangle" cross-layer dependencies, creating a more manageable search space and allowing for effective quantization with lower search costs.
Key Insights
A pivotal finding in this work is the strong linear correlation ($R^2 \approx 0.97$) between activation entropy and the Discretization Error Difference (DED). DED represents the performance gap between sequential and joint layer optimization. High entropy typically indicates a more homogeneous data distribution, which is more susceptible to quantization noise.
Furthermore, the authors found that a block-wise search with a maximum depth of approximately 3 layers provides an optimal trade-off. This depth captures significant cross-layer dependencies without the exponential search cost associated with deeper blocks.
Experimental Results
The Q-VLM framework was evaluated across several benchmarks, including ScienceQA, VizWiz, VQA v2, and Hateful Memes, using LLaVA (7B/13B) and MoE-LLaVA (1.6B) models.
- Efficiency: For the LLaVA-13B model, Q-VLM achieved a 2.78x memory compression and a 1.44x speedup in generation.
- Accuracy: In 4-bit (W4A4) settings on ScienceQA, Q-VLM reached an accuracy of 79.79% on LLaVA-7B, outperforming the QLoRA baseline by 2.26%.
- Robustness: Qualitative analysis indicates that Q-VLM maintains superior reasoning capabilities compared to other 4-bit methods like AWQ, which often suffer from hallucinations or incorrect answers in complex visual tasks.
Conclusion
Q-VLM provides a robust framework for deploying LVLMs on resource-constrained hardware. By leveraging activation entropy to guide block-wise quantization and optimizing the visual encoder, it achieves significant compression and speedup with minimal impact on model performance. Future work will focus on extending these techniques to ultra-low bitwidths (e.g., 2-bit) and validating performance on specialized edge hardware such as mobile NPUs.
Summary updated