Visual Question Answering
Transformers
Safetensors
English
videollama2_qwen2
text-generation
multimodal large language model
large video-language model
Inference Endpoints
lixin4ever commited on
Commit
4004e51
β€’
1 Parent(s): 9466f28

Update the results of VideoLLaMA2.1

Browse files
Files changed (1) hide show
  1. README.md +117 -116
README.md CHANGED
@@ -1,116 +1,117 @@
1
- ---
2
- license: apache-2.0
3
- datasets:
4
- - OpenGVLab/VideoChat2-IT
5
- - Lin-Chen/ShareGPT4V
6
- - liuhaotian/LLaVA-Instruct-150K
7
- language:
8
- - en
9
- metrics:
10
- - accuracy
11
- library_name: transformers
12
- pipeline_tag: visual-question-answering
13
- tags:
14
- - multimodal large language model
15
- - large video-language model
16
- ---
17
-
18
- <p align="center">
19
- <img src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/ROs4bHIp4zJ7g7vzgUycu.png" width="150" style="margin-bottom: 0.2;"/>
20
- <p>
21
-
22
-
23
- <h3 align="center"><a href="https://arxiv.org/abs/2406.07476">VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs</a></h3>
24
- <h5 align="center"> If you like our project, please give us a star ⭐ on <a href="https://github.com/DAMO-NLP-SG/VideoLLaMA2">Github</a> for the latest update. </h2>
25
-
26
- <p align="center"><video src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/Wj7GuqQ0CB9JRoPo6_GoH.webm" width="800"></p>
27
-
28
- ## πŸ“° News
29
- * **[2024.08.14]** Release checkpoints of [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) and [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B)
30
- * **[2024.07.30]** Release checkpoints of [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) and [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B).
31
- * **[2024.06.25]** πŸ”₯πŸ”₯ As of Jun 25, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [MLVU Leaderboard](https://github.com/JUNJIE99/MLVU?tab=readme-ov-file#trophy-mini-leaderboard).
32
- * **[2024.06.18]** πŸ”₯πŸ”₯ As of Jun 18, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [VideoMME Leaderboard](https://video-mme.github.io/home_page.html#leaderboard).
33
- * **[2024.06.17]** πŸ‘‹πŸ‘‹ Update technical report with the latest results and the missing references. If you have works closely related to VideoLLaMA 2 but not mentioned in the paper, feel free to let us know.
34
- * **[2024.06.14]** πŸ”₯πŸ”₯ [Online Demo](https://huggingface.co/spaces/lixin4ever/VideoLLaMA2) is available.
35
- * **[2024.06.03]** Release training, evaluation, and serving codes of VideoLLaMA 2.
36
-
37
-
38
- ## 🌎 Model Zoo
39
- | Model Name | Type | Visual Encoder | Language Decoder | # Training Frames |
40
- |:-------------------|:--------------:|:----------------|:------------------|:----------------------:|
41
- | [VideoLLaMA2-7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
42
- | [VideoLLaMA2-7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
43
- | [VideoLLaMA2-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
44
- | [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
45
- | [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
46
- | [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
47
- | [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
48
- | [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
49
- | [VideoLLaMA2.1-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F-Base) | Base | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
50
- | [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F) (**This Checkpoint**) | Chat | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
51
-
52
-
53
- ## πŸš€ Main Results
54
-
55
- ### Multi-Choice Video QA & Video Captioning
56
- <p><img src="https://github.com/user-attachments/assets/fbe3e3c2-b0f1-4e29-8b92-bc3611192909" width="800" "/></p>
57
-
58
-
59
- ### Open-Ended Video QA
60
- <p><img src="https://github.com/user-attachments/assets/cee2efe1-309e-4301-a217-e2a848799953" width="800" "/></p>
61
-
62
-
63
-
64
-
65
- ## πŸ€– Inference with VideoLLaMA2
66
- ```python
67
- import sys
68
- sys.path.append('./')
69
- from videollama2 import model_init, mm_infer
70
- from videollama2.utils import disable_torch_init
71
-
72
-
73
- def inference():
74
- disable_torch_init()
75
-
76
- # Video Inference
77
- modal = 'video'
78
- modal_path = 'assets/cat_and_chicken.mp4'
79
- instruct = 'What animals are in the video, what are they doing, and how does the video feel?'
80
-
81
- # Image Inference
82
- modal = 'image'
83
- modal_path = 'assets/sora.png'
84
- instruct = 'What is the woman wearing, what is she doing, and how does the image feel?'
85
-
86
- model_path = 'DAMO-NLP-SG/VideoLLaMA2-7B-16F'
87
- model, processor, tokenizer = model_init(model_path)
88
- output = mm_infer(processor[modal](modal_path), instruct, model=model, tokenizer=tokenizer, do_sample=False, modal=modal)
89
-
90
- print(output)
91
-
92
- if __name__ == "__main__":
93
- inference()
94
- ```
95
-
96
-
97
- ## Citation
98
-
99
- If you find VideoLLaMA useful for your research and applications, please cite using this BibTeX:
100
- ```bibtex
101
- @article{damonlpsg2024videollama2,
102
- title={VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs},
103
- author={Cheng, Zesen and Leng, Sicong and Zhang, Hang and Xin, Yifei and Li, Xin and Chen, Guanzheng and Zhu, Yongxin and Zhang, Wenqi and Luo, Ziyang and Zhao, Deli and Bing, Lidong},
104
- journal={arXiv preprint arXiv:2406.07476},
105
- year={2024},
106
- url = {https://arxiv.org/abs/2406.07476}
107
- }
108
-
109
- @article{damonlpsg2023videollama,
110
- title = {Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding},
111
- author = {Zhang, Hang and Li, Xin and Bing, Lidong},
112
- journal = {arXiv preprint arXiv:2306.02858},
113
- year = {2023},
114
- url = {https://arxiv.org/abs/2306.02858}
115
- }
116
- ```
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - OpenGVLab/VideoChat2-IT
5
+ - Lin-Chen/ShareGPT4V
6
+ - liuhaotian/LLaVA-Instruct-150K
7
+ language:
8
+ - en
9
+ metrics:
10
+ - accuracy
11
+ library_name: transformers
12
+ pipeline_tag: visual-question-answering
13
+ tags:
14
+ - multimodal large language model
15
+ - large video-language model
16
+ ---
17
+
18
+ <p align="center">
19
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/ROs4bHIp4zJ7g7vzgUycu.png" width="150" style="margin-bottom: 0.2;"/>
20
+ <p>
21
+
22
+
23
+ <h3 align="center"><a href="https://arxiv.org/abs/2406.07476">VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs</a></h3>
24
+ <h5 align="center"> If you like our project, please give us a star ⭐ on <a href="https://github.com/DAMO-NLP-SG/VideoLLaMA2">Github</a> for the latest update. </h2>
25
+
26
+ <p align="center"><video src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/Wj7GuqQ0CB9JRoPo6_GoH.webm" width="800"></p>
27
+
28
+ ## πŸ“° News
29
+ * **[2024.10.15]** Release checkpoints of [VideoLLaMA2.1-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F-Base) and [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F)
30
+ * **[2024.08.14]** Release checkpoints of [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) and [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B)
31
+ * **[2024.07.30]** Release checkpoints of [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) and [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B).
32
+ * **[2024.06.25]** πŸ”₯πŸ”₯ As of Jun 25, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [MLVU Leaderboard](https://github.com/JUNJIE99/MLVU?tab=readme-ov-file#trophy-mini-leaderboard).
33
+ * **[2024.06.18]** πŸ”₯πŸ”₯ As of Jun 18, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [VideoMME Leaderboard](https://video-mme.github.io/home_page.html#leaderboard).
34
+ * **[2024.06.17]** πŸ‘‹πŸ‘‹ Update technical report with the latest results and the missing references. If you have works closely related to VideoLLaMA 2 but not mentioned in the paper, feel free to let us know.
35
+ * **[2024.06.14]** πŸ”₯πŸ”₯ [Online Demo](https://huggingface.co/spaces/lixin4ever/VideoLLaMA2) is available.
36
+ * **[2024.06.03]** Release training, evaluation, and serving codes of VideoLLaMA 2.
37
+
38
+
39
+ ## 🌎 Model Zoo
40
+ | Model Name | Type | Visual Encoder | Language Decoder | # Training Frames |
41
+ |:-------------------|:--------------:|:----------------|:------------------|:----------------------:|
42
+ | [VideoLLaMA2-7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
43
+ | [VideoLLaMA2-7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
44
+ | [VideoLLaMA2-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
45
+ | [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
46
+ | [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
47
+ | [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
48
+ | [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
49
+ | [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
50
+ | [VideoLLaMA2.1-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F-Base) | Base | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
51
+ | [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F) (**This Checkpoint**) | Chat | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
52
+
53
+
54
+ ## πŸš€ Main Results
55
+
56
+ ### Multi-Choice Video QA & Video Captioning
57
+ <p><img src="https://private-user-images.githubusercontent.com/58427300/376494651-e87fe4cf-07ea-4fde-998b-a0c63671c3b4.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkzNTAzMTEsIm5iZiI6MTcyOTM1MDAxMSwicGF0aCI6Ii81ODQyNzMwMC8zNzY0OTQ2NTEtZTg3ZmU0Y2YtMDdlYS00ZmRlLTk5OGItYTBjNjM2NzFjM2I0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE5VDE1MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxMTFkM2M4ODJlMzc2YmEwYjkxY2FmMTgxODk3Mjg3NGY2OGJhNDBiODFhMGU3NzNhNDUyZTIzNWI2MDE0NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DfW_zKYcqTKSjP9JleBPEx2UV3PPFY45hHiEwqa7wr8" width="800" "/></p>
58
+
59
+
60
+ ### Open-Ended Video QA
61
+ <p><img src="https://private-user-images.githubusercontent.com/58427300/376494981-80b16c04-75ac-43b8-bc22-6952fdf994bb.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkzNTAzMTEsIm5iZiI6MTcyOTM1MDAxMSwicGF0aCI6Ii81ODQyNzMwMC8zNzY0OTQ5ODEtODBiMTZjMDQtNzVhYy00M2I4LWJjMjItNjk1MmZkZjk5NGJiLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE5VDE1MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3MzdjNmU1Y2MzYWVjNjg3ZGQ2ZDNjNTA1NzAzMTNhMDgxOWQ4MTI3YTY2ODUzYzUyZjdhNGExNzI5YWMyNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EtZR97k8kXC-DtH55z2549ZEkmKL-V8Z5GZdIQG5khw" width="800" "/></p>
62
+
63
+
64
+
65
+
66
+ ## πŸ€– Inference with VideoLLaMA2
67
+ ```python
68
+ import sys
69
+ sys.path.append('./')
70
+ from videollama2 import model_init, mm_infer
71
+ from videollama2.utils import disable_torch_init
72
+
73
+
74
+ def inference():
75
+ disable_torch_init()
76
+
77
+ # Video Inference
78
+ modal = 'video'
79
+ modal_path = 'assets/cat_and_chicken.mp4'
80
+ instruct = 'What animals are in the video, what are they doing, and how does the video feel?'
81
+
82
+ # Image Inference
83
+ modal = 'image'
84
+ modal_path = 'assets/sora.png'
85
+ instruct = 'What is the woman wearing, what is she doing, and how does the image feel?'
86
+
87
+ model_path = 'DAMO-NLP-SG/VideoLLaMA2-7B-16F'
88
+ model, processor, tokenizer = model_init(model_path)
89
+ output = mm_infer(processor[modal](modal_path), instruct, model=model, tokenizer=tokenizer, do_sample=False, modal=modal)
90
+
91
+ print(output)
92
+
93
+ if __name__ == "__main__":
94
+ inference()
95
+ ```
96
+
97
+
98
+ ## Citation
99
+
100
+ If you find VideoLLaMA useful for your research and applications, please cite using this BibTeX:
101
+ ```bibtex
102
+ @article{damonlpsg2024videollama2,
103
+ title={VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs},
104
+ author={Cheng, Zesen and Leng, Sicong and Zhang, Hang and Xin, Yifei and Li, Xin and Chen, Guanzheng and Zhu, Yongxin and Zhang, Wenqi and Luo, Ziyang and Zhao, Deli and Bing, Lidong},
105
+ journal={arXiv preprint arXiv:2406.07476},
106
+ year={2024},
107
+ url = {https://arxiv.org/abs/2406.07476}
108
+ }
109
+
110
+ @article{damonlpsg2023videollama,
111
+ title = {Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding},
112
+ author = {Zhang, Hang and Li, Xin and Bing, Lidong},
113
+ journal = {arXiv preprint arXiv:2306.02858},
114
+ year = {2023},
115
+ url = {https://arxiv.org/abs/2306.02858}
116
+ }
117
+ ```