ChatPaper.aiChatPaper

γ-MoD: Исследование адаптации смеси глубин для мультимодальных крупных языковых моделей

γ-MoD: Exploring Mixture-of-Depth Adaptation for Multimodal Large Language Models

October 17, 2024
Авторы: Yaxin Luo, Gen Luo, Jiayi Ji, Yiyi Zhou, Xiaoshuai Sun, Zhiqiang Shen, Rongrong Ji
cs.AI

Аннотация

Несмотря на значительный прогресс в мультимодальных моделях больших языков (MLLM), их высокая вычислительная стоимость остается барьером для внедрения в реальный мир. Вдохновленные смешением глубин (MoDs) в обработке естественного языка, мы стремимся решить это ограничение с точки зрения "активированных токенов". Наш ключевой инсайт заключается в том, что если большинство токенов избыточны для вычисления слоя, их можно пропустить непосредственно через слой MoD. Однако прямое преобразование плотных слоев MLLM в слои MoD приводит к существенному снижению производительности. Для решения этой проблемы мы предлагаем инновационную стратегию адаптации MoD для существующих MLLM под названием gamma-MoD. В gamma-MoD предлагается новая метрика для направления развертывания MoD в MLLM, а именно ранг карт внимания (ARank). Через ARank мы можем эффективно определить, какой слой избыточен и должен быть заменен слоем MoD. Основываясь на ARank, мы далее предлагаем два новых дизайна для максимизации вычислительной разреженности MLLM, сохраняя при этом его производительность, а именно общий маршрутизатор видения-языка и обучение маскированной маршрутизации. С помощью этих дизайнов более 90% плотных слоев MLLM могут быть эффективно преобразованы в слои MoD. Для проверки нашего метода мы применяем его к трем популярным MLLM и проводим обширные эксперименты на 9 наборах данных для тестирования. Экспериментальные результаты не только подтверждают значительную выгоду в эффективности gamma-MoD для существующих MLLM, но также подтверждают его способность к обобщению на различные MLLM. Например, с незначительным снижением производительности, т.е. -1,5%, gamma-MoD может сократить время обучения и вывода LLaVA-HR на 31,0% и 53,2% соответственно.
English
Despite the significant progress in multimodal large language models (MLLMs), their high computational cost remains a barrier to real-world deployment. Inspired by the mixture of depths (MoDs) in natural language processing, we aim to address this limitation from the perspective of ``activated tokens''. Our key insight is that if most tokens are redundant for the layer computation, then can be skipped directly via the MoD layer. However, directly converting the dense layers of MLLMs to MoD layers leads to substantial performance degradation. To address this issue, we propose an innovative MoD adaptation strategy for existing MLLMs called gamma-MoD. In gamma-MoD, a novel metric is proposed to guide the deployment of MoDs in the MLLM, namely rank of attention maps (ARank). Through ARank, we can effectively identify which layer is redundant and should be replaced with the MoD layer. Based on ARank, we further propose two novel designs to maximize the computational sparsity of MLLM while maintaining its performance, namely shared vision-language router and masked routing learning. With these designs, more than 90% dense layers of the MLLM can be effectively converted to the MoD ones. To validate our method, we apply it to three popular MLLMs, and conduct extensive experiments on 9 benchmark datasets. Experimental results not only validate the significant efficiency benefit of gamma-MoD to existing MLLMs but also confirm its generalization ability on various MLLMs. For example, with a minor performance drop, i.e., -1.5%, gamma-MoD can reduce the training and inference time of LLaVA-HR by 31.0% and 53.2%, respectively.

Summary

AI-Generated Summary

PDF82November 16, 2024