LLaMA-VID: An Image is Worth 2 Tokens in Large Language Models

28 Nov 2023  ·  Yanwei Li, Chengyao Wang, Jiaya Jia ·

In this work, we present a novel method to tackle the token generation challenge in Vision Language Models (VLMs) for video and image understanding, called LLaMA-VID. Current VLMs, while proficient in tasks like image captioning and visual question answering, face computational burdens when processing long videos due to the excessive visual tokens. LLaMA-VID addresses this issue by representing each frame with two distinct tokens, namely context token and content token. The context token encodes the overall image context based on user input, whereas the content token encapsulates visual cues in each frame. This dual-token strategy significantly reduces the overload of long videos while preserving critical information. Generally, LLaMA-VID empowers existing frameworks to support hour-long videos and pushes their upper limit with an extra context token. It is proved to surpass previous methods on most of video- or image-based benchmarks. Code is available https://github.com/dvlab-research/LLaMA-VID}{https://github.com/dvlab-research/LLaMA-VID

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Video Question Answering ActivityNet-QA LLaMA-VID-13B (2 Token) Accuracy 47.5 # 11
Confidence score 3.3 # 2
Zero-Shot Video Question Answer ActivityNet-QA LLaMA-VID-13B (2 Token) Confidence Score 3.3 # 5
Accuracy 47.5 # 6
Zero-Shot Video Question Answer ActivityNet-QA LLaMA-VID-7B (2 Token) Confidence Score 3.3 # 5
Accuracy 47.4 # 7
Video Question Answering ActivityNet-QA LLaMA-VID-7B (2 Token) Accuracy 47.4 # 12
Confidence score 3.3 # 2
Zero-Shot Video Question Answer MSRVTT-QA LLaMA-VID-13B (2 Token) Accuracy 58.9 # 9
Confidence Score 3.3 # 6
Zero-Shot Video Question Answer MSRVTT-QA LLaMA-VID-7B (2 Token) Accuracy 57.7 # 10
Confidence Score 3.2 # 10
Zero-Shot Video Question Answer MSVD-QA LLaMA-VID-7B (2 Token) Accuracy 69.7 # 10
Confidence Score 3.7 # 6
Zero-Shot Video Question Answer MSVD-QA LLaMA-VID-13B (2 Token) Accuracy 70.0 # 8
Confidence Score 3.7 # 6
Video-based Generative Performance Benchmarking VideoInstruct LLaMA-VID-7B (2 Token) Correctness of Information 2.96 # 7
Detail Orientation 3.00 # 6
Contextual Understanding 3.53 # 5
Temporal Understanding 2.46 # 9
Consistency 2.51 # 9
mean 2.89 # 9
Video-based Generative Performance Benchmarking VideoInstruct LLaMA-VID-13B (2 Token) Correctness of Information 3.07 # 5
Detail Orientation 3.05 # 4
Contextual Understanding 3.60 # 4
Temporal Understanding 2.58 # 7
Consistency 2.63 # 8
mean 2.99 # 6

Methods


No methods listed for this paper. Add relevant methods here