Upload 10 files
Browse files- .gitattributes +7 -0
- README.md +244 -184
- assets_hf/.DS_Store +0 -0
- assets_hf/AIN.png +3 -0
- assets_hf/Eval_CAMEL.png +3 -0
- assets_hf/ain_can_see.png +3 -0
- assets_hf/intro_bar.png +0 -0
- assets_hf/qualitative.png +3 -0
- assets_hf/radar_chart.png +3 -0
- assets_hf/toxicity.png +3 -0
- assets_hf/verify_pipeline.png +3 -0
.gitattributes
CHANGED
@@ -34,3 +34,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
assets_hf/ain_can_see.png filter=lfs diff=lfs merge=lfs -text
|
38 |
+
assets_hf/AIN.png filter=lfs diff=lfs merge=lfs -text
|
39 |
+
assets_hf/Eval_CAMEL.png filter=lfs diff=lfs merge=lfs -text
|
40 |
+
assets_hf/qualitative.png filter=lfs diff=lfs merge=lfs -text
|
41 |
+
assets_hf/radar_chart.png filter=lfs diff=lfs merge=lfs -text
|
42 |
+
assets_hf/toxicity.png filter=lfs diff=lfs merge=lfs -text
|
43 |
+
assets_hf/verify_pipeline.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,199 +1,259 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
# Model Card for Model ID
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
|
|
10 |
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
- **
|
26 |
-
- **
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
|
190 |
|
191 |
-
|
|
|
192 |
|
193 |
-
## Model Card Authors [optional]
|
194 |
|
195 |
-
|
|
|
196 |
|
197 |
-
|
198 |
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
- ar
|
6 |
+
base_model:
|
7 |
+
- qwen2-VL-7B
|
8 |
+
pipeline_tag: image-text-to-text
|
9 |
+
tags:
|
10 |
+
- LMM
|
11 |
+
- Arabic
|
12 |
+
- OCR
|
13 |
---
|
14 |
|
|
|
15 |
|
16 |
+
<div style="display: flex; align-items: center;">
|
17 |
+
<img src="assets_hf/AIN.png" width="10%" alt="logo" style="margin-right: 10px;" />
|
18 |
+
<h1 style="margin: 0; font-size: 28px;";">AIN: The Arabic INclusive Large Multimodal Model</h1>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
[Ahmed Heakl](https://huggingface.co/ahmedheakl) <sup> * </sup>
|
22 |
+
[Sara Ghaboura](https://huggingface.co/SLMLAH) <sup> * </sup>
|
23 |
+
[Omkar Thawakar](https://omkarthawakar.github.io)
|
24 |
+
[Fahad Shahbaz Khan](https://scholar.google.com/citations?hl=en&user=zvaeYnUAAAAJ)
|
25 |
+
[Hisham Cholakkal](https://scholar.google.com/citations?hl=en&user=bZ3YBRcAAAAJ)
|
26 |
+
[Rao M. Anwer](https://scholar.google.com/citations?hl=en&user=_KlvMVoAAAAJ)
|
27 |
+
[Salman Khan](https://scholar.google.com/citations?hl=en&user=M59O9lkAAAAJ)
|
28 |
+
<br>
|
29 |
+
<em> <sup> *Equal Contribution </sup> </em>
|
30 |
+
<br>
|
31 |
+
#### **Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI), UAE**
|
32 |
+
[](https://arxiv.org/abs/2502.00094)
|
33 |
+
[](https://mbzuai-oryx.github.io/AIN/)
|
34 |
+
[](https://github.com/mbzuai-oryx/AIN)
|
35 |
+
[](https://github.com/mbzuai-oryx/AIN/issues)
|
36 |
+
[](https://github.com/mbzuai-oryx/AIN/stargazers)
|
37 |
+
[](https://github.com/mbzuai-oryx/AIN/blob/main/LICENSE)
|
38 |
|
39 |
+
---
|
40 |
|
41 |
|
42 |
+
<div class="abstract-container">
|
43 |
+
<h2>Abstract</h2>
|
44 |
+
<div class="abstract-content">
|
45 |
+
<p>
|
46 |
+
Amid the swift progress of large language models (LLMs) and their evolution into large multimodal models (LMMs), significant strides have been made in high-resource languages such as English and Chinese. While Arabic LLMs have seen notable progress, Arabic LMMs remain largely unexplored, often narrowly focusing on a few specific aspects of the language and visual understanding. To bridge this gap, we introduce <b><em>AIN - the Arabic Inclusive Multimodal Model-</em></b> designed to excel across diverse domains.
|
47 |
+
AIN is an English-Arabic <b>bilingual LMM</b> designed to excel in English and Arabic, leveraging carefully constructed <b>3.6 million</b> high-quality Arabic-English multimodal data samples. AIN demonstrates state-of-the-art Arabic performance, while also possessing strong English-language visual capabilities.
|
48 |
+
</p>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
## 🌟 Key Features
|
55 |
+
- The **first Arabic-centric inclusive Large Multimodal Model (LMM)** trained on **3.6M samples**.
|
56 |
+
- Includes **35% authentic Arabic data** within its Arabic data subset.
|
57 |
+
- Achieves **superior performance compared to open- and closed-source models** (e.g., GPT-4o) and open-source models (e.g., Qwen2-VL-7B) across tasks such as OCR and specialized domains.
|
58 |
+
- Demonstrates **robust bilingual capabilities** (Arabic/English), **validated** through **comprehensive testing** and **human evaluation** across 17 Arab countries.
|
59 |
+
- Exhibits **advanced cultural understanding** and domain expertise in fields such as **medical imaging**, **agriculture**, and **scientific visualization**.
|
60 |
+
|
61 |
+
|
62 |
+
<p align="center">
|
63 |
+
<img src="assets_hf/intro_bar.png" width="70%" alt="intro_bar" style="margin-right: 2px";/>
|
64 |
+
<h6>
|
65 |
+
<em> <b>Figure 1.</b> Comparative performance of AIN-7B against other models across key domains, including OCR & Document Understanding, Remote Sensing, Agricultural Understanding, and overall performance across all domains. </em>
|
66 |
+
</h6>
|
67 |
+
</p>
|
68 |
+
|
69 |
+
<p align="center" >
|
70 |
+
<img src="assets_hf/radar_chart.png" width="52%" alt="radar_chart" style="margin-right: 2px";/>
|
71 |
+
<h6>
|
72 |
+
<em> <b>Figure 2.</b> showcases a comprehensive performance analysis of AIN-7B across CAMEL-Bench domains, comparing it with prominent closed-source models as well as open-source counterparts. <strong>OCR:</strong> "OCR & Document Understanding", <strong>Video:</strong> "General Video & Multi-Image Understanding", <strong>RS:</strong> "Remote Sensing Understanding", <strong>CDT:</strong> "Chart, Diagram & Table Understanding", <strong>Agro.:</strong> "Agricultural Image Understanding", <strong>Cultural:</strong> "Cultural-Specific Understanding", <strong>Medical:</strong> "Medical Image Understanding".
|
73 |
+
</em>
|
74 |
+
</h6>
|
75 |
+
|
76 |
+
---
|
77 |
+
## ⚖️ Quantitative Evaluation and Results
|
78 |
+
AIN demonstrates state-of-the-art performance across diverse domains, surpassing both open- and closed-source models. Notably, it achieves an aggregate performance score of 63.77%, with significant gains in OCR, remote sensing, and agricultural image understanding.
|
79 |
+
|
80 |
+
<div align="center" >
|
81 |
+
<table>
|
82 |
+
<caption>
|
83 |
+
<h6>
|
84 |
+
<strong>Table 1. Performance comparison of AIN and different closed- and open-source LMMs across CAMEL-Bench domains.</strong>
|
85 |
+
<br> <em>Best performance is marked with 🥇; second-best is 🥈.</em>
|
86 |
+
<strong>OCR</strong>: "OCR & Document Understanding",
|
87 |
+
<strong>Video</strong>: "General Video & Multi-Image Understanding",
|
88 |
+
<strong>RS</strong>: "Remote Sensing Understanding",
|
89 |
+
<strong>CDT</strong>: "Chart, Diagram & Table Understanding",
|
90 |
+
<strong>Agro.</strong>: "Agricultural Image Understanding",
|
91 |
+
<strong>Cult.</strong>: "Cultural-Specific Understanding",
|
92 |
+
<strong>Med.</strong>: "Medical Image Understanding".
|
93 |
+
</h6>
|
94 |
+
</caption>
|
95 |
+
<thead>
|
96 |
+
<tr style="background-color: #e0e0e0;">
|
97 |
+
<th>Models</th>
|
98 |
+
<th>VQA</th>
|
99 |
+
<th>OCR</th>
|
100 |
+
<th>Video</th>
|
101 |
+
<th>RS</th>
|
102 |
+
<th>CDT</th>
|
103 |
+
<th>Agro.</th>
|
104 |
+
<th>Cult.</th>
|
105 |
+
<th>Med.</th>
|
106 |
+
<th style="background-color: #d0d0d0;">Total</th>
|
107 |
+
</tr>
|
108 |
+
</thead>
|
109 |
+
<tbody>
|
110 |
+
<tr>
|
111 |
+
<td>GPT-4o</td>
|
112 |
+
<td>🥈55.15</td>
|
113 |
+
<td>🥈54.98</td>
|
114 |
+
<td>🥇69.65</td>
|
115 |
+
<td>🥈27.36</td>
|
116 |
+
<td>🥈62.35</td>
|
117 |
+
<td>🥈80.75</td>
|
118 |
+
<td>🥇80.86</td>
|
119 |
+
<td>🥇49.91</td>
|
120 |
+
<td style="background-color: #d0d0d0;">🥈60.13</td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td>GPT-4o-mini</td>
|
124 |
+
<td>48.83</td>
|
125 |
+
<td>39.38</td>
|
126 |
+
<td>🥈66.28</td>
|
127 |
+
<td>16.93</td>
|
128 |
+
<td>56.37</td>
|
129 |
+
<td>78.80</td>
|
130 |
+
<td>65.92</td>
|
131 |
+
<td>🥈47.37</td>
|
132 |
+
<td style="background-color: #d0d0d0;">52.49</td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td>Gemini-1.5-Pro</td>
|
136 |
+
<td>46.68</td>
|
137 |
+
<td>28.68</td>
|
138 |
+
<td>42.95</td>
|
139 |
+
<td>17.07</td>
|
140 |
+
<td>47.06</td>
|
141 |
+
<td>72.14</td>
|
142 |
+
<td>56.24</td>
|
143 |
+
<td>33.78</td>
|
144 |
+
<td style="background-color: #d0d0d0;">52.38</td>
|
145 |
+
</tr>
|
146 |
+
<tr>
|
147 |
+
<td>Gemini-1.5-flash</td>
|
148 |
+
<td>45.59</td>
|
149 |
+
<td>27.58</td>
|
150 |
+
<td>53.31</td>
|
151 |
+
<td>14.95</td>
|
152 |
+
<td>48.26</td>
|
153 |
+
<td>76.07</td>
|
154 |
+
<td>46.54</td>
|
155 |
+
<td>42.87</td>
|
156 |
+
<td style="background-color: #d0d0d0;">44.40</td>
|
157 |
+
</tr>
|
158 |
+
<tr>
|
159 |
+
<td>InternVL-8B </td>
|
160 |
+
<td>30.41 </td>
|
161 |
+
<td>15.91 </td>
|
162 |
+
<td>51.42 </td>
|
163 |
+
<td>5.36 </td>
|
164 |
+
<td>30.27 </td>
|
165 |
+
<td>44.47 </td>
|
166 |
+
<td>20.88 </td>
|
167 |
+
<td>29.48 </td>
|
168 |
+
<td style="background-color: #d0d0d0;">28.52 </td>
|
169 |
+
</tr>
|
170 |
+
<tr>
|
171 |
+
<td>InternVL2.5-1B </td>
|
172 |
+
<td>27.22 </td>
|
173 |
+
<td>19.45 </td>
|
174 |
+
<td>38.20 </td>
|
175 |
+
<td>3.39 </td>
|
176 |
+
<td>30.75 </td>
|
177 |
+
<td>39.53 </td>
|
178 |
+
<td>35.68 </td>
|
179 |
+
<td>21.27 </td>
|
180 |
+
<td style="background-color: #d0d0d0;">26.94 </td>
|
181 |
+
</tr>
|
182 |
+
<tr>
|
183 |
+
<td>Qwen-VL-2B </td>
|
184 |
+
<td>41.02 </td>
|
185 |
+
<td>22.93 </td>
|
186 |
+
<td>38.90 </td>
|
187 |
+
<td>12.56 </td>
|
188 |
+
<td>27.83 </td>
|
189 |
+
<td>52.02 </td>
|
190 |
+
<td>34.28 </td>
|
191 |
+
<td>29.12 </td>
|
192 |
+
<td style="background-color: #d0d0d0;">32.33 </td>
|
193 |
+
</tr>
|
194 |
+
<tr>
|
195 |
+
<td>AIN-7B <em>(ours)</em> </td>
|
196 |
+
<td>🥇56.78 </td>
|
197 |
+
<td>🥇72.35 </td>
|
198 |
+
<td>64.09 </td>
|
199 |
+
<td>🥇45.92 </td>
|
200 |
+
<td>🥇64.10 </td>
|
201 |
+
<td>🥇85.05 </td>
|
202 |
+
<td>🥈78.09 </td>
|
203 |
+
<td>43.77 </td>
|
204 |
+
<td style="background-color: #d0d0d0;">🏆63.77 </td>
|
205 |
+
</tr>
|
206 |
+
</tbody>
|
207 |
+
</table>
|
208 |
+
</div>
|
209 |
+
|
210 |
+
---
|
211 |
+
## 🎯 Qualitative Evaluation
|
212 |
+
The qualitative evaluation showcases AIN's advanced capabilities in handling diverse, complex tasks, including OCR, medical imaging, remote sensing, and cultural-specific understanding, with remarkable precision and contextual relevance. Unlike GPT-4o and LLaVA, AIN demonstrates superior performance in identifying intricate details and maintaining accuracy across varied query formats and multi-domain challenges.
|
|
|
213 |
|
214 |
+
<div align="center">
|
215 |
+
<img src="assets_hf/qualitative.png" width="75%" alt="qualitative" />
|
216 |
+
<h6>
|
217 |
+
<em> <b>Figure 3.</b> Qualitative examples showcasing AIN-7B’s capabilities across various domains, including general VQA, OCR & Document Understanding, Remote Sensing, Medical Imaging, Agricultural Understanding, and Cultural-Specific tasks. </em>
|
218 |
+
</h6>
|
219 |
+
</div>
|
220 |
|
221 |
+
---
|
222 |
+
## 🧐 Data Verification and Toxicity Filtering
|
223 |
+
A multi-step verification pipeline was implemented to ensure high-quality translations and safe visual data. Translation accuracy was assessed through human evaluation, where native Arabic speakers rated outputs against reference translations, and semantic similarity checks were conducted using **LaBSE**. Additionally, translated samples were reverse-translated and validated using **BLEU, METEOR, and ROUGE scores** to measure correctness, correlation, and overlap. For visual data, toxicity filtering was applied using **LLavaGuard’s safety policies and GPT-4o**, identifying and removing unsafe content related to violence, substance abuse, and harmful imagery, ensuring compliance with ethical AI standards.
|
224 |
+
|
225 |
+
<p align="center">
|
226 |
+
<img src="assets_hf/verify_pipeline.png" width="75%" alt="verify" style="margin-right: 2px";/>
|
227 |
+
<h6>
|
228 |
+
<em> <b>Figure 4.</b> Data verification and filtering pipeline for textual and visual data, ensuring high-quality training data through semantic similarity checks, translation quality evaluations, and toxicity screening for safety compliance. </em>
|
229 |
+
</h6>
|
230 |
+
</p>
|
231 |
+
<p align="center">
|
232 |
+
<img src="assets_hf/toxicity.png" width=48%" alt="verify" style="margin-right: 2px";/>
|
233 |
+
<h6>
|
234 |
+
<em> <b>Figure 5.</b> Distribution of visual data toxicity filtering results, showing that 95% of the data is classified as safe, while 5% is identified as unsafe due to categories like weapons or substance abuse, violence, and animal cruelty. </em>
|
235 |
+
</h6>
|
236 |
+
</p>
|
237 |
|
238 |
+
---
|
239 |
|
240 |
+
## 🔒 License
|
241 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
242 |
|
|
|
243 |
|
244 |
+
## 💬 Contact us
|
245 |
+
For questions or suggestions, feel free to reach out to us on [GitHub Discussions](https://github.com/mbzuai-oryx/AIN/discussions).
|
246 |
|
247 |
+
---
|
248 |
|
249 |
+
If you use AIN in your research, please cite our work as follows:
|
250 |
+
|
251 |
+
```
|
252 |
+
@misc{heakl2025ainarabicinclusivelarge,
|
253 |
+
title={AIN: The Arabic INclusive Large Multimodal Model},
|
254 |
+
author={Ahmed Heakl and Sara Ghaboura and Omkar Thawkar and Fahad Shahbaz Khan and Hisham Cholakkal and Rao Muhammad Anwer and Salman Khan},
|
255 |
+
year={2025},
|
256 |
+
eprint={2502.00094},
|
257 |
+
url={https://arxiv.org/abs/2502.00094},
|
258 |
+
```
|
259 |
+
---
|
assets_hf/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
assets_hf/AIN.png
ADDED
![]() |
Git LFS Details
|
assets_hf/Eval_CAMEL.png
ADDED
![]() |
Git LFS Details
|
assets_hf/ain_can_see.png
ADDED
![]() |
Git LFS Details
|
assets_hf/intro_bar.png
ADDED
![]() |
assets_hf/qualitative.png
ADDED
![]() |
Git LFS Details
|
assets_hf/radar_chart.png
ADDED
![]() |
Git LFS Details
|
assets_hf/toxicity.png
ADDED
![]() |
Git LFS Details
|
assets_hf/verify_pipeline.png
ADDED
![]() |
Git LFS Details
|