ChatPaper.aiChatPaper

PyramidDrop: Ускорение ваших крупных моделей видео-языка с помощью пирамиды снижения визуальной избыточности

PyramidDrop: Accelerating Your Large Vision-Language Models via Pyramid Visual Redundancy Reduction

October 22, 2024
Авторы: Long Xing, Qidong Huang, Xiaoyi Dong, Jiajie Lu, Pan Zhang, Yuhang Zang, Yuhang Cao, Conghui He, Jiaqi Wang, Feng Wu, Dahua Lin
cs.AI

Аннотация

В больших моделях видео-языка (LVLM) изображения служат входными данными, несущими обилие информации. Как гласит поговорка "Картинка говорит больше, чем тысяча слов", представление одного изображения в текущих LVLM может потребовать сотен или даже тысяч токенов. Это приводит к значительным вычислительным затратам, которые увеличиваются квадратично по мере увеличения разрешения входного изображения, тем самым серьезно влияя на эффективность как обучения, так и вывода. Предыдущие подходы пытались уменьшить количество токенов изображения либо до, либо в начальных слоях LVLM. Однако эти стратегии неизбежно приводят к потере важной информации об изображении, что в конечном итоге снижает производительность модели. Для решения этой проблемы мы проводим эмпирическое исследование, показывающее, что все визуальные токены необходимы для LVLM в поверхностных слоях, и избыточность токенов постепенно увеличивается в более глубоких слоях модели. Для этой цели мы предлагаем PyramidDrop - стратегию уменьшения визуальной избыточности для LVLM с целью повышения их эффективности как в обучении, так и выводе с незначительной потерей производительности. Конкретно, мы разбиваем LVLM на несколько этапов и удаляем часть токенов изображения в конце каждого этапа с заранее определенным коэффициентом, создавая пирамидоподобные визуальные токены по слоям модели. Удаление основано на легком расчете сходства с незначительной временной нагрузкой. Обширные эксперименты показывают, что PyramidDrop может достичь ускорения времени обучения на 40% и FLOPs вывода на 55% для LLaVA-NeXT с сопоставимой производительностью. Кроме того, PyramidDrop также может служить стратегией "вставь и играй" для ускорения вывода без обучения, с лучшей производительностью и более низкой стоимостью вывода по сравнению с аналогами. Мы надеемся, что идеи и подход, представленные PyramidDrop, вдохновят будущие исследования для дальнейшего изучения роли токенов изображения в LVLM.
English
In large vision-language models (LVLMs), images serve as inputs that carry a wealth of information. As the idiom "A picture is worth a thousand words" implies, representing a single image in current LVLMs can require hundreds or even thousands of tokens. This results in significant computational costs, which grow quadratically as input image resolution increases, thereby severely impacting the efficiency of both training and inference. Previous approaches have attempted to reduce the number of image tokens either before or within the early layers of LVLMs. However, these strategies inevitably result in the loss of crucial image information, ultimately diminishing model performance. To address this challenge, we conduct an empirical study revealing that all visual tokens are necessary for LVLMs in the shallow layers, and token redundancy progressively increases in the deeper layers of the model. To this end, we propose PyramidDrop, a visual redundancy reduction strategy for LVLMs to boost their efficiency in both training and inference with neglectable performance loss. Specifically, we partition the LVLM into several stages and drop part of the image tokens at the end of each stage with a pre-defined ratio, creating pyramid-like visual tokens across model layers. The dropping is based on a lightweight similarity calculation with a negligible time overhead. Extensive experiments demonstrate that PyramidDrop can achieve a 40% training time and 55% inference FLOPs acceleration of LLaVA-NeXT with comparable performance. Besides, the PyramidDrop could also serve as a plug-and-play strategy for inference acceleration without training, with better performance and lower inference cost than counterparts. We hope that the insights and approach introduced by PyramidDrop will inspire future research to further investigate the role of image tokens in LVLMs.

Summary

AI-Generated Summary

PDF482November 16, 2024