TL;DR
This paper tackles the significant challenge of deploying large, computationally expensive multimodal models (LMMs) in real-world applications by proposing an iterative, multi-stage compression strategy. Their method combines structured pruning and a novel distillation loss to drastically reduce model size and latency while maintaining high performance, paving the way for more energy-efficient AI.
What Problem Does This Paper Address?
Large Multimodal Models (LMMs) are revolutionizing various fields, from content recommendation to advertising analysis, by enabling models to understand and process both text and images. However, their sheer size leads to substantial latency and high energy consumption, making them impractical for many real-time applications and contradicting the growing need for "Green AI." This paper focuses on compressing Ant Group's proprietary LMM, AntGMM, which is used in critical applications like Alipay's advertisement auditing. The core problem is to shrink these massive models significantly without sacrificing their accuracy and efficiency, a task complicated by the inherent redundancy in LMMs and the challenges of distilling knowledge from generative models.
Methods
The authors introduce a three-stage iterative compression strategy for AntGMM:
- Multi-Stage Pruning: Instead of a single, aggressive pruning step, they employ a phased approach to tackle redundancy at different levels:
- Block Pruning: Removes entire blocks (layers) from the end of the model, offering the coarsest but most impactful reduction.
- Inter-Module Dimension Pruning: Targets and reduces the dimensionality of hidden layers within Feed-Forward Networks (FFNs) and attention mechanisms.
-
Input/Output Dimension Pruning: Further refines the model by reducing input and output dimensions across all blocks, ensuring consistency. Each pruning step is followed by distillation to recover any performance loss.
-
Advanced Distillation Loss: To address the complexities of generative tasks, they propose a novel distillation loss that combines standard KL divergence with a pairwise loss. This pairwise component specifically prioritizes correct token predictions over incorrect ones, helping to mitigate cascading errors in sequential generation.
- Small Sample Size Training: The methodology is designed to work effectively even with small training sample sizes for distillation, making the process more efficient and less data-intensive.
Datasets
- Multimodal Advertisement Audition Dataset (MAAD): A novel dataset constructed from real-world advertisement auditing scenarios within Alipay. It comprises 12,000 training samples and 3,000 test samples, covering tasks like background color recognition, manifestation identification, content classification, logo recognition, and style identification.
Key Insights and Ideas
- Iterative Pruning is Crucial: The paper strongly suggests that a multi-stage, iterative approach to pruning is far more effective than a single-shot method. Aggressive one-shot pruning leads to significant performance degradation that subsequent distillation cannot fully recover.
- Distillation is Key to Recovery: Each pruning stage is followed by distillation. This iterative process of pruning-then-distilling is essential for maintaining model performance and recovering accuracy lost during compression.
- Novel Distillation Loss for Generative Tasks: The pairwise loss component in their distillation strategy is a critical innovation for generative LMMs, directly addressing the challenge of generating contextually accurate sequences.
- Small Datasets are Sufficient: The compression strategy demonstrates effectiveness even with relatively small distillation datasets, reducing the burden of data collection and preparation.
Key Results
- Massive Reduction in Model Size: The compressed AntGMM model was reduced from 5.4 billion parameters to 0.3 billion, a reduction of approximately 18 times.
- Significant Latency Improvement: Service latency was reduced from an average of 700ms to 90ms in online deployment.
- Performance Maintained: Despite the drastic compression, the model maintained online performance with only a marginal decrease of 0.8% in seven-day average accuracy. Specific task accuracies even saw slight improvements (e.g., Manifestations accuracy increased from 0.967 to 0.971).
- Inference Speed-up: Inference speed on an A10 GPU increased by roughly 7.7 times (from 1.38 to 7.62 samples/second).
- Estimated Energy Savings: The compressed model is projected to reduce annual electricity consumption by approximately 75 million kWh.
Limitations and Future Work
- Limitations: The paper acknowledges that while the model's performance is maintained across most tasks, there are specific tasks where performance might slightly decrease. The authors also note that some misclassified samples in their case study were difficult even for humans to categorize, suggesting inherent ambiguities in the task itself.
- Future Work: The authors are exploring other approaches and employing various techniques to further improve their service quality. The paper also mentions the ongoing anonymization of user data in MAAD and its planned release to the research community, which will facilitate further research in this area.
Summary updated