jjw0126 commited on
Commit
71d6013
·
verified ·
1 Parent(s): 2f47029

Upload files

Browse files
Files changed (5) hide show
  1. DATA.md +163 -0
  2. LICENSE +201 -0
  3. README.md +216 -0
  4. cog.yaml +50 -0
  5. pyproject.toml +34 -0
DATA.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Data
2
+
3
+ ### Data Format
4
+
5
+ We follow the data format below, which is similar to LLaVA. You can directly use the original file path or pack the multi-modal files into patches following [create_patch.py](https://github.com/Ola-Omni/Ola/blob/main/tools/create_patch.py). Patch is a binary file containing continuous image or video files in byte format, which may accelerate reading speed in some cases.
6
+
7
+
8
+ - Image Data:
9
+
10
+ ```
11
+ [
12
+ {
13
+ 'id': ID of the data
14
+ 'image': ***.png (path to the image file or positions in patches)
15
+ 'conversations': [{"from": "human", "value": "<image>\n"}, {"from": "gpt", "value": ""}]
16
+ }
17
+ ]
18
+ ```
19
+
20
+ The format for image patch is:
21
+
22
+ ```
23
+ {
24
+ "patch": "patch_00000",
25
+ "start_num": 846113989,
26
+ "size": 27141
27
+ }
28
+ ```
29
+
30
+ - Video Frame Data:
31
+
32
+ ```
33
+ [
34
+ {
35
+ 'id': ID of the data
36
+ 'video': ***.mp4 (path to the video file or positions in patches)
37
+ 'conversations': [{"from": "human", "value": "<image>\n"}, {"from": "gpt", "value": ""}]
38
+ }
39
+ ]
40
+ ```
41
+
42
+ The format for video patch is:
43
+
44
+ ```
45
+ {
46
+ "patch": "patch_000000",
47
+ "size": [ 5605, 8902, 7917, 5562, 9249, 8785, 8379, 10389, 10505, 10337, 8481, 8164, 5562, 8844, 10565, 8035, 7768, 8969, 5643, 10478, 7632, 10980, 9986, 3602, 2848, 7591, 10766, 7813, 5605, 9840, 9664, 5605, 7726, 4828, 8006, 5562, 9711, 7903, 9542, 10626, 8827, 11268, 11115, 1832, 11354, 9222, 3965, 10426, 10427, 7311, 9726, 7655, 10025, 5350, 10098, 10470, 4877, 10273, 9730, 10150, 5604, 7203, 9881, 2246, 11114, 3790, 5567, 10490, 4072, 1701],
48
+ "start_num": 26608266
49
+ }
50
+ ```
51
+
52
+ - Video + Audio Data:
53
+
54
+ ```
55
+ [
56
+ {
57
+ 'id': ID of the data
58
+ 'video': ***.mp4 (path to the video file or positions in patches)
59
+ 'audio': ***.wav (path to the audio file)
60
+ 'conversations': [{"from": "human", "value": "<speech><image>\n"}, {"from": "gpt", "value": ""}]
61
+ }
62
+ ]
63
+ ```
64
+
65
+ - Image + Audio Data:
66
+
67
+ ```
68
+ [
69
+ {
70
+ 'id': ID of the data
71
+ 'audio_q': ***.wav (path to the audio file)
72
+ 'image': ***.png (path to the image file or positions in patches)
73
+ 'conversations': [{"from": "human", "value": ""<image>\nUser's question in speech: <speech>""}, {"from": "gpt", "value": ""}]
74
+ }
75
+ ]
76
+ ```
77
+
78
+ - Audio Data:
79
+
80
+ ```
81
+ [
82
+ {
83
+ 'id': ID of the data
84
+ 'audio': ***.wav (path to the audio file)
85
+ 'conversations': [{"from": "human", "value": "<speech>\n"}, {"from": "gpt", "value": ""}]
86
+ }
87
+ ]
88
+ ```
89
+
90
+ ### Instruction for Ola Data
91
+
92
+ **You can simply mix up the separated training jsons for joint training with image/video/audio data.**
93
+
94
+ #### **Ola-Video-1.9M**
95
+
96
+ 1. Download [Ola-video-1.9M.json](https://huggingface.co/datasets/THUdyh/Ola-Data/blob/main/video_data/video-data.json) from huggingface.
97
+
98
+ 2. Download all the [video patches](https://huggingface.co/datasets/THUdyh/Ola-Data/tree/main/video_data) from huggingface.
99
+
100
+ 3. Check and modify the video patch path in the json to the true path in your machine.
101
+
102
+ #### **Ola-Audio-1.1M**
103
+
104
+ 1. Download [Ola_audio_1169k.json](https://huggingface.co/datasets/THUdyh/Ola-Data/blob/main/Ola_audio_1169k.json) from huggingface.
105
+
106
+ 2. Download [wav tar file](https://huggingface.co/datasets/THUdyh/Ola-Data/tree/main/ola_audio) from huggingface and unzip all the files.
107
+
108
+ 3. Check the file structure:
109
+
110
+ ```
111
+ │ola_audio/
112
+ ├── Ola_audio_1169k.json
113
+ ├── AudioCaps/
114
+ ├── Clotho/
115
+ ├── GigaSpeech/
116
+ ├── LibriSpeech/
117
+ ├── MillionSongDatasetSpotify/
118
+ ├── MusicCaps/
119
+ ├── WavCaps/
120
+ ```
121
+
122
+ 4. Check and modify the audio file path in the json to the true path in your machine.
123
+
124
+ #### **Ola-Cross-Modality-298k**
125
+
126
+ 1. Download [Ola_cross_modality_finevideo_175k.json](https://huggingface.co/datasets/THUdyh/Ola-Data/blob/main/Ola_cross_modality_finevideo_175k.json) and [Ola_cross_modality_llava_123k.json](https://huggingface.co/datasets/THUdyh/Ola-Data/blob/main/Ola_cross_modality_llava_123k.json) from huggingface.
127
+
128
+ 2. Download [FineVideo](https://huggingface.co/datasets/HuggingFaceFV/finevideo/tree/main) from huggingface.
129
+
130
+ 3. Download [LLaVA-Video-178k](https://huggingface.co/datasets/lmms-lab/LLaVA-Video-178K/tree/main) from huggingface.
131
+
132
+ 4. Extract pure video from FineVideo and LLaVA-Video-178k.
133
+
134
+ 5. Transfer and save the wav file of the videos using [convert_mp4_wav.py](https://github.com/Ola-Omni/Ola/blob/main/tools/convert_mp4_wav.py).
135
+
136
+ 6. Check the file structure:
137
+
138
+ ```
139
+ │ola_cross_modality_298k/
140
+ ├── Ola_cross_modality_finevideo_175k.json
141
+ ├── Ola_cross_modality_llava_123k.json
142
+ ├── finevideo_audios/
143
+ │ ├── lltmlYR56dI.wav
144
+ │ ├── ......
145
+ ├── finevideo_videos/
146
+ │ ├── lltmlYR56dI.mp4
147
+ │ ├── ......
148
+ ├── llava_audios/
149
+ │ ├── academic_source
150
+ │ ├── ActivityNet-QA
151
+ │ ├── liwei_youtube_videos
152
+ │ ├── NextQA
153
+ │ ├── perception_test
154
+ ├── llava_videos/
155
+ │ ├── academic_source
156
+ │ ├── ActivityNet-QA
157
+ │ ├── liwei_youtube_videos
158
+ │ ├── NextQA
159
+ │ ├── perception_test
160
+ ```
161
+
162
+ 7. Check and modify the video and audio path in the json to the true path in your machine.
163
+
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="center" width="100%">
2
+ <img src="https://ola-omni.github.io/static/images/ola-icon.png" alt="967023137dff29e65b21544e7620e0f7.webp" width=60%>
3
+ </p>
4
+ <div>
5
+
6
+ ## Ola: Pushing the Frontiers of Omni-Modal Language Model
7
+
8
+ <p align="left">
9
+ <a href='https://github.com/liuzuyan' target='_blank'>Zuyan Liu<sup>*,1,2</sup></a>&emsp;
10
+ <a href='https://github.com/dongyh20/' target='_blank'>Yuhao Dong<sup>*,2,3</sup></a>&emsp;
11
+ Jiahui Wang<sup>1</sup></a>&emsp;<br>
12
+ <a href='https://liuziwei7.github.io/' target='_blank'>Ziwei Liu<sup>3</sup></a>&emsp;
13
+ Winston Hu<sup>2</sup></a>&emsp;
14
+ <a href='https://scholar.google.com/citations?user=TN8uDQoAAAAJ' target='_blank'>Jiwen Lu<sup>1,&#x2709</sup></a>&emsp;
15
+ <a href='https://raoyongming.github.io/' target='_blank'>Yongming Rao<sup>2,1,&#x2709</sup></a>&emsp;
16
+ </p>
17
+
18
+
19
+ <p align="left"><sup>1</sup>Tsinghua University &ensp; <sup>2</sup>Tencent Hunyuan Research&ensp; <sup>3</sup>S-Lab, NTU&ensp; </p>
20
+
21
+ <p align="left"><sup>*</sup> Equal Contribution<sup>&ensp; &#x2709</sup> Corresponding Author</p>
22
+
23
+ [![Ola](https://img.shields.io/badge/Rank_1-OpenCampass(<15B)-blue)](https://rank.opencompass.org.cn/leaderboard-multimodal/?m=REALTIME) [![Ola](https://img.shields.io/badge/Rank_8-VideoMME-red)](https://video-mme.github.io/home_page.html#leaderboard)
24
+
25
+ ---
26
+
27
+ **Project Page:** [![Ola](https://img.shields.io/badge/Ola-project_page-orange)](https://ola-omni.github.io)
28
+
29
+ **Weights in Huggingface:** [![hf_checkpoint](https://img.shields.io/badge/🤗-Ola_7b-green)](https://huggingface.co/THUdyh/Ola-7b) [![hf_checkpoint](https://img.shields.io/badge/🤗-Ola_Image-green)](https://huggingface.co/THUdyh/Ola-Image) [![hf_checkpoint](https://img.shields.io/badge/🤗-Ola_Video-green)](https://huggingface.co/THUdyh/Ola-Video)
30
+
31
+ **arXiv Paper:** [![arxiv](https://img.shields.io/badge/Arxiv-2502.04328-b31b1b.svg?logo=arXiv)](https://arxiv.org/abs/2502.04328)
32
+
33
+ **Demo by Gradio:** [![demo](https://img.shields.io/badge/Ola-Demo-yellow)](https://huggingface.co/spaces/THUdyh/Ola)
34
+
35
+ **Training Data:** [![data](https://img.shields.io/badge/Ola-Data-purple)](https://huggingface.co/datasets/THUdyh/Ola-Data)
36
+
37
+ **中文解读**: [![chinese](https://img.shields.io/badge/Ola-机器之心-cyan)](https://mp.weixin.qq.com/s/N4bjcHOejJudtxTFZVAXmg)
38
+
39
+ Contact: Leave an issue or contact liuzuyan19@gmail.com . We are on call to respond.
40
+
41
+ ## 📢 News
42
+
43
+ - 🔥[28/2/2025] We release the intermediate model, Ola-Image and Ola-Video, try building your own omni-modal models!
44
+
45
+ - 🚀[19/2/2025] We release the huggingface demo of Ola, try the advanced omni-modal model on your own!
46
+
47
+ - 🔥[18/2/2025] The training data, training script for Ola-7b is released!
48
+
49
+ - 🎉[07/2/2025] The Ola is released! Check our [project page](https://ola-omni.github.io), [model weights](https://huggingface.co/THUdyh/Ola-7b), [arXiv paper](https://arxiv.org/pdf/2502.04328) for the strong omni-modal understanding model!
50
+
51
+ - 🔥[06/2/2025] [Ola-7b](https://huggingface.co/THUdyh/Ola-7b) achieves **Rank #1** on the OpenCompass Multi-modal Leaderboard among all the models under 15B parameters with average score of **72.6**. Check the impressive results [here](https://rank.opencompass.org.cn/leaderboard-multimodal/?m=REALTIME)!
52
+
53
+ ## 🚀Coming Soon
54
+
55
+ - [x] Evaluation code on omni-modal benchmarks
56
+ - [x] Gradio Demo
57
+ - [x] Training Data (Video, Audio, Cross-Modality)
58
+
59
+ ## 🌟 Introduction
60
+
61
+ ### Roads to Ola
62
+
63
+ <p align="center" width="100%">
64
+ <img src="https://ola-omni.github.io/static/images/road.png" alt="road.png" width=100%>
65
+ </p>
66
+ <div>
67
+
68
+ **Ola** is an Omni-modal language model that achieves competitive performance across image, video, and audio understanding compared to specialized counterparts. We conduct a comprehensive exploration of architectural design, data curation, and training strategies essential for building a robust omni-modal model.
69
+
70
+ <p align="center" width="100%">
71
+ <img src="https://ola-omni.github.io/static/images/teaser.png" alt="teaser.png" width=100%>
72
+ </p>
73
+ <div>
74
+
75
+ ### Architecture
76
+
77
+ <p align="center" width="100%">
78
+ <img src="https://ola-omni.github.io/static/images/method.png" alt="method.png" width=100%>
79
+ </p>
80
+ <div>
81
+
82
+ Ola supports omni-modal inputs including text, image, video, and audio, capable of processing the inputs simultaneously with competitive performance on understanding tasks for all these modalities. Meanwhile, Ola supports user-friendly real-time streaming decoding for texts and speeches thanks to the text detokenizer and the speech decoder.
83
+
84
+ ### Training Strategies
85
+
86
+ <p align="center" width="100%">
87
+ <img src="https://ola-omni.github.io/static/images/training.png" alt="training.png" width=100%>
88
+ </p>
89
+ <div>
90
+
91
+ We visualize the relationships among modalities in the left part. Speech acts as the connection between language and audio knowledge, while video constructs the bridge with highly relevant visual and audio information. Therefore, we design the progressive alignment training strategy from primary to periphery. Furthermore, we design the cross-modality video-audio data to better capture the relationships among modalities.
92
+
93
+ ### Performance
94
+
95
+ <p align="center" width="100%">
96
+ <img src="https://ola-omni.github.io/static/images/results.png" alt="results.png" width=100%>
97
+ </p>
98
+ <div>
99
+
100
+ Ola achieves competitive performance across major multi-modal benchmarks when compared to state-of-the-art specialist-modal LLMs.
101
+
102
+ ## Installation
103
+
104
+
105
+ #### 1. Clone this repository:
106
+ ```bash
107
+ git clone https://github.com/Ola-Omni/Ola
108
+ cd Ola
109
+ ```
110
+
111
+ #### 2. Install the required package:
112
+ ```bash
113
+ conda create -n ola python=3.10 -y
114
+ conda activate ola
115
+ pip install --upgrade pip
116
+ pip install -e .
117
+ ```
118
+ #### 3.Install additional packages for training cases
119
+
120
+ ```bash
121
+ pip install -e ".[train]"
122
+ pip install flash-attn --no-build-isolation
123
+ ```
124
+
125
+ ## Model Zoo
126
+
127
+ We provide our checkpoints at [Huggingface](https://huggingface.co/collections/THUdyh/ola-67b8220eb93406ec87aeec37)
128
+
129
+ | Model | Link | Size | Modal |
130
+ |:---:|:---:|:---:|:---:|
131
+ |Ola-7b | [Huggingface](https://huggingface.co/THUdyh/Ola-7b) | 7B | Text, Image, Video, Audio |
132
+ |Ola-Image | [Huggingface](https://huggingface.co/THUdyh/Ola-Image) | 7B | Text, Image |
133
+ |Ola-Video | [Huggingface](https://huggingface.co/THUdyh/Ola-Video) | 7B | Text, Image, Video |
134
+
135
+
136
+ ## Quick Start
137
+
138
+ 1. Download `Ola-7b` from [Huggingface](https://huggingface.co/THUdyh/Ola-7b) or skip the step to using the online weights directly.
139
+
140
+ 2. Download audio encoder from [Huggingface](https://huggingface.co/THUdyh/Ola_speech_encoders/tree/main) and put the weights `large-v3.pt` and `BEATs_iter3_plus_AS2M_finetuned_on_AS2M_cpt2.pt` under repo directory `path/to/Ola/`
141
+
142
+ 3. Run `inference/infer.py`
143
+
144
+ - Text & Image Understanding
145
+
146
+ ```
147
+ python3 inference/infer.py --image_path *.png,jpg --text user_instruction
148
+ ```
149
+
150
+ - Text & Video Understanding
151
+
152
+ ```
153
+ python3 inference/infer.py --video_path *.mp4 --text user_instruction
154
+ ```
155
+
156
+ - Text & Audio Understanding
157
+
158
+ ```
159
+ python3 inference/infer.py --audio_path *.wav,mp3 --text user_instruction
160
+ ```
161
+
162
+ - Audio & Image Understanding
163
+
164
+ ```
165
+ python3 inference/infer.py --audio_path *.png,jpg --audio_path *.wav,mp3
166
+ ```
167
+
168
+ ## Evaluation
169
+
170
+ You can evaluate Ola model with [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) and [lmms-eval](https://github.com/EvolvingLMMs-Lab/lmms-eval).
171
+
172
+ ## Training
173
+
174
+ ### Data Preparation
175
+
176
+ Please refer to [DATA.md](https://github.com/Ola-Omni/Ola/blob/main/DATA.md) for instructions of customized finetuning or using the provided datasets.
177
+
178
+ ### Start Training
179
+
180
+ Please follow the script below to start training. Make sure you have created the correct datasets for fine-tuning.
181
+
182
+ 1. Finetuning Ola-7b Model:
183
+
184
+ ```
185
+ bash ./scripts/finetune_ola.sh
186
+ ```
187
+
188
+ 2. Finetuning Ola-Image Model (Ola Stage1 or Stage2)
189
+
190
+ ```
191
+ bash ./scripts/finetune_ola_image.sh
192
+ ```
193
+
194
+ 3. Finetuning Ola-Video Model (Ola Stage3):
195
+
196
+ ```
197
+ bash ./scripts/finetune_ola_video.sh
198
+ ```
199
+
200
+ ## Citation
201
+
202
+ If you find it useful for your research and applications, please cite our paper using this BibTeX:
203
+ ```bibtex
204
+ @article{liu2025ola,
205
+ title={Ola: Pushing the Frontiers of Omni-Modal Language Model with Progressive Modality Alignment},
206
+ author={Liu, Zuyan and Dong, Yuhao and Wang, Jiahui and Liu, Ziwei and Hu, Winston and Lu, Jiwen and Rao, Yongming},
207
+ journal={arXiv preprint arXiv:2502.04328},
208
+ year={2025}
209
+ }
210
+ ```
211
+
212
+ ## Acknowledgement
213
+
214
+ - Our codebase is conducted on [LLaVA](https://github.com/LLaVA-VL/LLaVA-NeXT)
215
+
216
+ - Thanks [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) and [lmms-eval](https://github.com/EvolvingLMMs-Lab/lmms-eval) team for the evaluation system!
cog.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration for Cog ⚙️
2
+ # Reference: https://cog.run/yaml
3
+
4
+ build:
5
+ # set to true if your model requires a GPU
6
+ gpu: true
7
+
8
+ # a list of ubuntu apt packages to install
9
+ system_packages:
10
+ - "libgl1-mesa-glx"
11
+ - "libglib2.0-0"
12
+
13
+ # python version in the form '3.11' or '3.11.4'
14
+ python_version: "3.10"
15
+
16
+ # a list of packages in the format <package-name>==<version>
17
+ python_packages:
18
+ - "torch==2.1.2"
19
+ - "torchvision==0.16.2"
20
+ - "torchaudio==2.1.2"
21
+ - "transformers==4.43.4"
22
+ - "tokenizers==0.19.1"
23
+ - "sentencepiece==0.1.99"
24
+ - "shortuuid"
25
+ - "accelerate==0.33.0"
26
+ - "peft==0.11.1"
27
+ - "bitsandbytes==0.43.1"
28
+ - "pydantic<2"
29
+ - "markdown2[all]"
30
+ - "numpy"
31
+ - "scikit-learn==1.2.2"
32
+ - "gradio_client==1.3.0"
33
+ - "requests"
34
+ - "httpx==0.27.2"
35
+ - "uvicorn"
36
+ - "fastapi"
37
+ - "soundfile"
38
+ - "einops==0.6.1"
39
+ - "einops-exts==0.0.4"
40
+ - "timm==0.6.13"
41
+ - "openai-whisper"
42
+ - "setuptools==59.5.0"
43
+ - "omegaconf==2.0.6"
44
+ run:
45
+ - git clone https://github.com/pytorch/fairseq && cd fairseq && pip install -e . --no-build-isolation
46
+ - pip install flash-attn --no-build-isolation
47
+ - curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/download/v0.8.2/pget_linux_x86_64" && chmod +x /usr/local/bin/pget
48
+
49
+ # predict.py defines how predictions are run on your model
50
+ predict: "predict.py:Predictor"
pyproject.toml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ola"
7
+ version = "1.0.0"
8
+ description = "Omni-Modal Language Model"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "License :: OSI Approved :: Apache Software License",
14
+ ]
15
+ dependencies = [
16
+ "torch==2.1.2", "torchvision==0.16.2", "torchaudio==2.1.2",
17
+ "transformers==4.43.4", "tokenizers==0.19.1", "sentencepiece==0.1.99", "shortuuid",
18
+ "accelerate==0.33.0", "peft==0.11.1", "bitsandbytes==0.43.1",
19
+ "pydantic", "markdown2[all]", "numpy", "scikit-learn==1.2.2",
20
+ "gradio==4.43.0", "gradio_client==1.3.0",
21
+ "requests", "httpx==0.27.2", "uvicorn", "fastapi", "soundfile",
22
+ "einops==0.6.1", "einops-exts==0.0.4", "timm==0.9.16",
23
+ "openai-whisper", "setuptools==59.5.0", "omegaconf==2.0.6", "loguru", "av", "librosa",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ train = ["deepspeed==0.12.6", "ninja", "wandb", "tensorboardX"]
28
+ build = ["build", "twine"]
29
+
30
+ [tool.setuptools.packages.find]
31
+ exclude = ["data", "checkpoints", "logs", "models", "fairseq", "flash-attention"]
32
+
33
+ [tool.wheel]
34
+ exclude = ["data", "checkpoints", "logs", "models", "fairseq", "flash-attention"]