amr-mohamed commited on
Commit
ac2a128
1 Parent(s): b5f203c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +812 -123
README.md CHANGED
@@ -14,14 +14,15 @@ base_model:
14
  ---
15
 
16
 
17
- # Atlas-Chat Model Card
18
 
19
 
20
  ## Model Overview
21
 
22
- Atlas-Chat is a family of open models instruction-tuned for Darija, the colloquial Arabic of Morocco, developed as part of the [Jais](https://arxiv.org/abs/2308.16149) project for standard Arabic and its extentions to dialectal Arabic. These models are designed for language generation and excel in various applications such as question answering, summarization, and translation. Thanks to their compact size, Atlas-Chat models can be deployed in resource-constrained environments like laptops, desktops, or personal cloud setups, making advanced AI accessible to Darija speakers and promoting widespread innovation. Two versions are available:
23
  * [Atlas-Chat-2B](https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B): A small-sized version with 2 billion parameters, capable of generating fluent Moroccan Darija text while maintaining efficiency.
24
- * [Atlas-Chat-9B](https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B): A larger version with 9 billion parameters, providing more nuanced, contextually rich language generation for complex tasks.
 
25
 
26
  The models are designed to assist with:
27
 
@@ -54,7 +55,7 @@ from transformers import pipeline
54
 
55
  pipe = pipeline(
56
  "text-generation",
57
- model="MBZUAI-Paris/Atlas-Chat-9B",
58
  model_kwargs={"torch_dtype": torch.bfloat16},
59
  device="cuda" # replace with "mps" to run on a Mac device
60
  )
@@ -71,7 +72,7 @@ print(assistant_response)
71
  - Response:
72
 
73
 
74
- >صنعاتني جامعة محمد بن زايد للذكاء الاصطناعي، لي هي جامعة بحثية ديال الدراسات العليا الهدف ديالها أنها تزيد بالذكاء الاصطناعي لقدّام وتنفع بيه الإنسانية. يمكن ليك تزور https://mbzuai.ac.ae/ar/about/ باش تعرف كثر على جامعة محمد بن زايد للذكاء الاصطناعي والمهمة ديالها!
75
 
76
 
77
  #### Running the model on a single / multi GPU
@@ -84,7 +85,7 @@ pip install accelerate
84
  from transformers import AutoTokenizer, AutoModelForCausalLM
85
  import torch
86
 
87
- model_id = "MBZUAI-Paris/Atlas-Chat-9B"
88
  tokenizer = AutoTokenizer.from_pretrained(model_id)
89
  model = AutoModelForCausalLM.from_pretrained(
90
  model_id,
@@ -104,48 +105,9 @@ print(tokenizer.decode(outputs[0]))
104
  ```
105
 
106
  - Response:
107
- >المنتخب المغربي كيتسمى أيضا "أسود الأطلس"
108
 
109
 
110
- <!-- You can ensure the correct chat template is applied by using `tokenizer.apply_chat_template` as follows:
111
- ```python
112
-
113
- from transformers import AutoTokenizer, AutoModelForCausalLM
114
- import torch
115
-
116
- model_id = "MBZUAI-Paris/Atlas-Chat-9B"
117
- tokenizer = AutoTokenizer.from_pretrained(model_id)
118
- model = AutoModelForCausalLM.from_pretrained(
119
- model_id,
120
- device_map="auto",
121
- torch_dtype=torch.bfloat16,
122
- )
123
-
124
- messages = [
125
- {"role": "user", "content": "شنو هيا الإيجابيات ديال الطاقة المتجددة؟"},
126
- ]
127
- input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True, add_generation_prompt=True)
128
-
129
- outputs = model.generate(**input_ids, max_new_tokens=256, temperature=0.0)
130
-
131
- print(tokenizer.decode(outputs[0]))
132
- ```
133
-
134
- - Response:
135
- ```text
136
- <bos><start_of_turn>user
137
- شنو هيا الإيجابيات ديال الطاقة المتجددة؟<end_of_turn>
138
- <start_of_turn>model
139
- الطاقة المتجددة عندها بزاف ديال الإيجابيات، منها:
140
-
141
- 1. الاستدامة: مصادر الطاقة المتجددة بحال الريح، الشمس، والطاقة الكهرومائية كيتجددو بشكل طبيعي، يعني ما غاديش ينفدو مع الوقت. هاد الشي كيخليهم مصدر طاقة مستدام اللي ممكن نعتمدو عليه على المدى الطويل.
142
-
143
- 2. تقليل انبعاثات الكربون: مصادر الطاقة المتجددة عموماً عندها انبعاثات كربونية أقل من الوقود الأحفوري، وهاد الشي كيساعد فالتخفيف من التغير المناخي وتقليل تلوث الهواء.
144
-
145
- 3. الاستقلال الطاقي: مصادر الطاقة المتجددة ممكن نستعملوها باش نقللو من الاعتماد على الوقود الأحفوري المستورد، وهاد الشي كيزيد من الاستقلال الطاقي وكيقلل من خطر التقطيع.
146
-
147
- 4. خلق فرص الشغل: صناعة الطاقة المتجددة كتخلق فرص شغل فمجالات بحال تركيب الألواح الشمسية، صيانة توربينات الرياح، وبناء محطات
148
- ``` -->
149
 
150
  #### Quantized Versions through `bitsandbytes`
151
 
@@ -162,7 +124,7 @@ pip install bitsandbytes accelerate
162
  # pip install bitsandbytes accelerate
163
  from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
164
 
165
- model_id = "MBZUAI-Paris/Atlas-Chat-9B"
166
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
167
 
168
  tokenizer = AutoTokenizer.from_pretrained(model_id)
@@ -185,9 +147,10 @@ print(tokenizer.decode(outputs[0]).split("<start_of_turn>model")[-1])
185
 
186
  - Response:
187
 
188
- >هاد الهضرة كتهضر على قصة قديمة من القرن 19 فين تكتشف الذهب فكاليفورنيا. هاد الشي خلق حالة ديال الجنون على الذهب، فين بزاف ديال الناس مشاو لتما باش يقلبو عليه. كانو حتى ناس اللي كانو كيبيعو أدوات التنقيب بحال الفاس والعتلة، وكانو كيقنعو الناس بلي غادي يربحو الفلوس إلا مشاو يقلبو على الذهب. فالنهاية، هادوك اللي كانو كيبيعو هاد الأدوات هوما اللي ربحو بزاف، حيت كانو كيربحو من كل واحد اللي كان كيشري منهم.
 
189
  >
190
- >هاد القصة كتشبه للي كاينة دابا، فين كاينين ناس اللي كيدعيو بلي هوما مليونير وكيبيعو نصائح على كيفاش تربح الفلوس. بحال هادوك اللي كانو كيبيعو الأدوات فالماضي، حتى هاد الناس كيربحو من هاد الشي، حيت كياخدو الفلوس من الناس اللي كيشريو منهم النصائح ديالهم.
191
 
192
 
193
  </details>
@@ -201,7 +164,7 @@ print(tokenizer.decode(outputs[0]).split("<start_of_turn>model")[-1])
201
  # pip install bitsandbytes accelerate
202
  from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
203
 
204
- model_id = "MBZUAI-Paris/Atlas-Chat-9B"
205
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)
206
 
207
  tokenizer = AutoTokenizer.from_pretrained(model_id)
@@ -223,7 +186,7 @@ print(tokenizer.decode(outputs[0]).split("<start_of_turn>model")[-1])
223
 
224
  - Response:
225
 
226
- >أطلّاس شات هو أول نموذج لغوي كبير مفتوح المصدر كايهضر بالدارجة.
227
 
228
 
229
  </details>
@@ -241,7 +204,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
241
  import transformers
242
  import torch
243
 
244
- model_id = "MBZUAI-Paris/Atlas-Chat-9B"
245
  dtype = torch.bfloat16
246
 
247
  tokenizer = AutoTokenizer.from_pretrained(model_id)
@@ -251,7 +214,7 @@ model = AutoModelForCausalLM.from_pretrained(
251
  torch_dtype=dtype,)
252
 
253
  chat = [
254
- { "role": "user", "content": "أشنو كايمييز المملكة المغربية." },
255
  ]
256
  prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
257
  ```
@@ -260,7 +223,7 @@ At this point, the prompt contains the following text:
260
 
261
  ```
262
  <bos><start_of_turn>user
263
- أشنو كايمييز المملكة المغربية.<end_of_turn>
264
  <start_of_turn>model
265
  ```
266
 
@@ -281,17 +244,12 @@ print(tokenizer.decode(outputs[0]))
281
 
282
  - Response:
283
 
284
- >المغرب كايميزو بزاف ديال الحوايج، منهم:
285
- >
286
- >1. التنوع الثقافي: المغرب بلاد فيها بزاف ديال الثقافات، كل وحدة فيهم عندها التقاليد ديالها واللغة ديالها والماكلة ديالها. هاد التنوع كايبان فالموسيقى والرقص والفنون التقليدية.
287
- >
288
- >2. التراث التاريخي: المغرب عندو تاريخ غني كايمتد لآلاف السنين، فيه حضارات قديمة بحال مملكة موريطانيا، والرومان، والبيزنطيين، والفتوحات الإسلامية. هاد التراث كايبان فالمعالم التاريخية بحال مدينة فاس، والمدينة القديمة ديال مراكش، والمدينة القديمة ديال شفشاون.
289
- >
290
- >3. المناظر الطبيعية: المغرب بلاد فيها مناظر طبيعية متنوعة، من السواحل الزرقة والصحاري الكبيرة، للجبال العالية والوديان الخضراء. هاد التنوع كايمكنك من ممارسة أنشطة خارجية بحال المشي لمسافات طويلة، والتخييم، والرياضات المائية.
291
- >
292
- >4. الماكلة: الماكلة المغربية معروفة بالتنوع ديالها والطعم ديالها. من بين الأطباق الأكثر شعبية كاين الطاجين، والكسكس، والبريوات، والكوكتيل ديال الفواكه.
293
- >
294
- >5. الناس: المغاربة معروفين بالضيافة ديالهم والترحاب ديالهم. كايكونو فرحانين باش يشاركو الثقافة والتقاليد ديالهم مع الزوار.
295
 
296
 
297
 
@@ -309,8 +267,8 @@ You can also use Ollama and chatbot-ollama to create a chatbot user-interface to
309
  First you need to install Ollama on your machine from [here](https://github.com/ollama/ollama) and have node.js installed as well. Then, download and prepare the model as follows:
310
  ```bash
311
 
312
- huggingface-cli download MBZUAI-Paris/Atlas-Chat-9B --local-dir Atlas-Chat-9B/
313
- ollama create Atlas-Chat-9B -f Atlas-Chat-9B/modelfile
314
  ollama serve
315
  ```
316
  Finally, in a new terminal clone chatbot-ollama repository from Github and run it:
@@ -352,6 +310,7 @@ Our training dataset [Darija-SFT-Mixture](https://huggingface.co/datasets/MBZUAI
352
  Atlas-Chat models are based on Gemma 2 models. The Atlas-Chat models were trained using 8 Nvidia's A100 80 GB GPUs in parallel using FSDP on AWS Sagemaker. The model is trained using HuggingFace transformers and parameter-efficient fine-tuning with LoRA rank of 256.
353
 
354
 
 
355
  ## Evaluation
356
  The Atlas-Chat models were evaluated on a comprehensive suite of tasks using various datasets and benchmarks to assess their performance across multiple dimensions. These included tasks such as:
357
 
@@ -360,161 +319,891 @@ The Atlas-Chat models were evaluated on a comprehensive suite of tasks using var
360
  * **Belebele Ary_Arab:** Belebele is a multiple-choice machine reading comprehension dataset published by Facebook spanning 122 language variants. The Evaluation is done on the Ary_Arab part of Belebele that refers to Darija.
361
  * **Sentiment Analysis.**
362
  * **Translation:** Including six directions and four languages: Darija, MSA, English and French.
 
363
  * **Summarization.**
364
 
365
  The models were compared against a collection of existing open-source Arabic models to gauge their effectiveness, with a particular focus on performance in Darija. All scores are based on zero-shot performance. The prompts are written mainly in Darija. The metric used for DarijaMMLU, DarijaHellaSwag, Belebele Ary and Sentiment Analysis is the normalized accuracy. We used [Language Model Evaluation Harness](https://github.com/MBZUAI-Paris/lm-evaluation-harness-atlas-chat) to conduct these evaluations.
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  <table>
368
  <tr>
369
  <td rowspan="2">Model</td>
370
- <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaMMLU" target="_blank">DarijaMMLU</a></td>
371
- <td rowspan="2"><a href="MBZUAI-Paris/DarijaHellaSwag" target="_blank">DarijaHellaSwag</a></td>
372
- <td rowspan="2"><a href="https://huggingface.co/datasets/facebook/belebele/viewer/ary_Arab" target="_blank">Belebele Ary</a></td>
373
- <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">Sentiment Analysis</a></td>
374
- <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DoDa-10k (Translation)</a></td>
375
  <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MArSum (Summarization)</a><br/>(LLM as a judge)</td>
 
376
  </tr>
377
  <tr>
378
  <td>BLEU</td>
379
  <td>chrF</td>
 
 
 
 
 
 
 
 
380
  </tr>
381
  <tr>
382
  <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
383
- <td>35.39</td>
384
- <td>32.51</td>
385
- <td>38.33</td>
386
- <td>45.29</td>
387
  <td>00.13</td>
388
  <td>06.18</td>
389
  <td>00.50</td>
 
 
 
 
 
 
 
 
 
390
  </tr>
391
  <tr>
392
  <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
393
- <td>37.44</td>
394
- <td>34.49</td>
395
- <td>44.11</td>
396
- <td>51.56</td>
397
  <td>00.25</td>
398
  <td>07.46</td>
 
 
 
 
 
 
 
 
399
  <td>00.90</td>
 
400
  </tr>
401
  <tr>
402
  <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
403
- <td>28.58</td>
404
- <td>32.42</td>
405
- <td>25.22</td>
406
- <td>53.36</td>
407
  <td>00.10</td>
408
  <td>04.96</td>
 
 
 
 
 
 
 
 
409
  <td>06.80</td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  </tr>
411
  <tr>
412
  <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
413
- <td><b>44.97</td>
414
- <td><b>41.48</td>
415
- <td><b>53.89</td>
416
- <td><b>73.99</td>
417
  <td><b>22.76</td>
418
  <td><b>44.86</td>
 
 
 
 
 
 
 
 
419
  <td><b>55.22</td>
 
420
  </tr>
421
  <tr style="border-top: 4px solid;"></tr>
422
  <tr>
423
  <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
424
- <td>39.96</td>
425
- <td>41.57</td>
426
- <td>51.22</td>
427
- <td>56.78</td>
428
  <td>00.73</td>
429
  <td>11.85</td>
 
 
 
 
 
 
 
 
430
  <td>03.02</td>
 
431
  </tr>
432
  <tr>
433
  <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
434
- <td>39.30</td>
435
- <td>35.19</td>
436
- <td>43.67</td>
437
- <td>52.72</td>
438
  <td>00.60</td>
439
  <td>09.43</td>
 
 
 
 
 
 
 
 
440
  <td>02.82</td>
 
441
  </tr>
442
  <tr>
443
  <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
444
- <td>45.11</td>
445
- <td>43.90</td>
446
- <td>58.67</td>
447
- <td>41.73</td>
448
  <td>00.92</td>
449
  <td>11.71</td>
 
 
 
 
 
 
 
 
450
  <td>01.77</td>
 
451
  </tr>
452
  <tr>
453
  <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
454
- <td>45.20</td>
455
- <td>40.65</td>
456
- <td>49.67</td>
457
- <td>66.68</td>
458
  <td>00.87</td>
459
  <td>10.52</td>
 
 
 
 
 
 
 
 
460
  <td>01.92</td>
 
461
  </tr>
462
  <tr>
463
  <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
464
- <td>35.98</td>
465
- <td>36.57</td>
466
- <td>30.11</td>
467
- <td>40.23</td>
468
  <td>00.44</td>
469
  <td>11.33</td>
 
 
 
 
 
 
 
 
470
  <td>02.28</td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  </tr>
472
  <tr>
473
  <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
474
  <td>41.09</td>
475
  <td>38.35</td>
476
  <td>33.11</td>
477
- <td>59.58</td>
478
- <td>00.98</td>
479
- <td>16.70</td>
480
- <td>02.80</td>
481
  </tr>
482
  <tr>
483
  <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
484
  <td>35.91</td>
485
  <td>42.43</td>
486
  <td>31.00</td>
487
- <td>59.87</td>
488
- <td>03.10</td>
489
- <td>19.16</td>
490
- <td>13.81</td>
491
  </tr>
492
  <tr>
493
  <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
494
  <td>44.13</td>
495
  <td>38.24</td>
496
  <td>47.00</td>
497
- <td>44.08</td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
498
  <td>00.92</td>
499
  <td>14.19</td>
500
- <td>01.28</td>
 
 
 
 
 
 
 
 
 
501
  </tr>
502
  <tr>
503
  <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
504
- <td><b>58.23</td>
505
- <td><b>57.75</td>
506
- <td><b>74.56</td>
507
- <td><b>81.89</td>
508
  <td><b>28.08</td>
509
  <td><b>50.48</td>
 
 
 
 
 
 
 
 
510
  <td><b>59.76</td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  </tr>
512
 
513
 
514
 
515
  </table>
516
 
517
-
518
  ## Usage and Limitations
519
 
520
  These models have certain limitations that users should be aware of.
 
14
  ---
15
 
16
 
17
+ # JAIS Intiative: Atlas-Chat Models
18
 
19
 
20
  ## Model Overview
21
 
22
+ Atlas-Chat is a family of open models instruction-tuned for Darija, the colloquial Arabic of Morocco, developed as part of the [Jais](https://arxiv.org/abs/2308.16149) project for standard Arabic and its extentions to dialectal Arabic. These models are designed for language generation and excel in various applications such as question answering, summarization, and translation. Thanks to their compact size, Atlas-Chat models can be deployed in resource-constrained environments like laptops, desktops, or personal cloud setups, making advanced AI accessible to Darija speakers and promoting widespread innovation. Three sizes are available:
23
  * [Atlas-Chat-2B](https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B): A small-sized version with 2 billion parameters, capable of generating fluent Moroccan Darija text while maintaining efficiency.
24
+ * [Atlas-Chat-9B](https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B): A medium-sized with 9 billion parameters, providing more nuanced, contextually rich language generation for complex tasks.
25
+ * [Atlas-Chat-27B](https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B): A large-sized version with 27 billion parameters, offering even more advanced capabilities for complex tasks and nuanced language generation compared to the 2B and 9B versions.
26
 
27
  The models are designed to assist with:
28
 
 
55
 
56
  pipe = pipeline(
57
  "text-generation",
58
+ model="MBZUAI-Paris/Atlas-Chat-2B",
59
  model_kwargs={"torch_dtype": torch.bfloat16},
60
  device="cuda" # replace with "mps" to run on a Mac device
61
  )
 
72
  - Response:
73
 
74
 
75
+ >قادّوني الباحثين والمهندسين ديال جامعة محمد بن زايد للذكاء الاصطناعي. جامعة محمد بن زايد للذكاء الاصطناعي هي جامعة ديال البحت والدراسات العليا، كتّخصّص فتعزيز الذكاء الاصطناعي والاستعمال ديالو لمصلحة الإنسانية. يمكن ليك تزور https://mbzuai.ac.ae/ar/about/ باش تعرف كثر على جامعة محمد بن زايد للذكاء الاصطناعي والمهمة ديالها!
76
 
77
 
78
  #### Running the model on a single / multi GPU
 
85
  from transformers import AutoTokenizer, AutoModelForCausalLM
86
  import torch
87
 
88
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
89
  tokenizer = AutoTokenizer.from_pretrained(model_id)
90
  model = AutoModelForCausalLM.from_pretrained(
91
  model_id,
 
105
  ```
106
 
107
  - Response:
108
+ >المنتخب المغربي كيتسمى "أسود الاطلس".
109
 
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
  #### Quantized Versions through `bitsandbytes`
113
 
 
124
  # pip install bitsandbytes accelerate
125
  from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
126
 
127
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
128
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
129
 
130
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
147
 
148
  - Response:
149
 
150
+
151
+ >ف القرن 19، لقاو الذهب ف كاليفورنيا، وهاد الشي جاب بزاف ديال الناس باش يمشيو ليه. هاد الناس كانو كيبيعو العتلة والفاس وكيتظاهرو بلي إلا قلبو على الذهب غادي يلقاو ليه. ف الآخر، هاد التجار ديال التنقيب والحفر كانو كيتغلبو على الناس اللي بغاو يقلبو على الذهب.
152
  >
153
+ >دابا، كاينين ناس اللي كيتظاهرو بلي هوما مليونيرين وكيتظاهرو بلي عندهم الوقت يورّيو للناس كيفاش يلقاو الذهب. هاد الناس كيتظاهرو بلي عندهم الخبرة والخبرة باش يلقاو الذهب، ولكن ف الحقيقة، هاد الشي ماشي صحيح.
154
 
155
 
156
  </details>
 
164
  # pip install bitsandbytes accelerate
165
  from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
166
 
167
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
168
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)
169
 
170
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
186
 
187
  - Response:
188
 
189
+ >إن أطلاس شات هو أول نموذج لغة كبير مفتوح المصدر كيهضر بالدارجة.
190
 
191
 
192
  </details>
 
204
  import transformers
205
  import torch
206
 
207
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
208
  dtype = torch.bfloat16
209
 
210
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
214
  torch_dtype=dtype,)
215
 
216
  chat = [
217
+ { "role": "user", "content": "اشنو هو الطاجين ؟"},
218
  ]
219
  prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
220
  ```
 
223
 
224
  ```
225
  <bos><start_of_turn>user
226
+ اشنو هو الطاجين ؟<end_of_turn>
227
  <start_of_turn>model
228
  ```
229
 
 
244
 
245
  - Response:
246
 
247
+ >الطاجين هو طبق تقليدي مغربي كيتصاوب من اللحم ولا الدجاج ولا الخضرة، مع الخضرة، والبهارات، والصلصة. كيتطيب فالمقلاة ولا فالمقلى على نار هادية لمدة طويلة، وهاد الشي كيخلي اللحم يطيب بشوية ويبدا يذوب. الطاجين معروف بعمق النكهة ديالو والريحة ديالو، وغالبا كيتقدم مع الرز ولا الخبز.
248
+
249
+
250
+
251
+
252
+
 
 
 
 
 
253
 
254
 
255
 
 
267
  First you need to install Ollama on your machine from [here](https://github.com/ollama/ollama) and have node.js installed as well. Then, download and prepare the model as follows:
268
  ```bash
269
 
270
+ huggingface-cli download MBZUAI-Paris/Atlas-Chat-2B --local-dir Atlas-Chat-2B/
271
+ ollama create Atlas-Chat-2B -f Atlas-Chat-2B/modelfile
272
  ollama serve
273
  ```
274
  Finally, in a new terminal clone chatbot-ollama repository from Github and run it:
 
310
  Atlas-Chat models are based on Gemma 2 models. The Atlas-Chat models were trained using 8 Nvidia's A100 80 GB GPUs in parallel using FSDP on AWS Sagemaker. The model is trained using HuggingFace transformers and parameter-efficient fine-tuning with LoRA rank of 256.
311
 
312
 
313
+ <!--
314
  ## Evaluation
315
  The Atlas-Chat models were evaluated on a comprehensive suite of tasks using various datasets and benchmarks to assess their performance across multiple dimensions. These included tasks such as:
316
 
 
319
  * **Belebele Ary_Arab:** Belebele is a multiple-choice machine reading comprehension dataset published by Facebook spanning 122 language variants. The Evaluation is done on the Ary_Arab part of Belebele that refers to Darija.
320
  * **Sentiment Analysis.**
321
  * **Translation:** Including six directions and four languages: Darija, MSA, English and French.
322
+ * **Transliteration:** Transforming a sentence from Darija (written in Arabic characters) to Arabizi (Written in Latin characters) and vice-versa.
323
  * **Summarization.**
324
 
325
  The models were compared against a collection of existing open-source Arabic models to gauge their effectiveness, with a particular focus on performance in Darija. All scores are based on zero-shot performance. The prompts are written mainly in Darija. The metric used for DarijaMMLU, DarijaHellaSwag, Belebele Ary and Sentiment Analysis is the normalized accuracy. We used [Language Model Evaluation Harness](https://github.com/MBZUAI-Paris/lm-evaluation-harness-atlas-chat) to conduct these evaluations.
326
 
327
+
328
+ **LLMs Benchmarks:**
329
+ <table>
330
+ <tr>
331
+ <td>Model</td>
332
+ <td><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaMMLU" target="_blank">DarijaMMLU</a></td>
333
+ <td><a href="MBZUAI-Paris/DarijaHellaSwag" target="_blank">DarijaHellaSwag</a></td>
334
+ <td ><a href="https://huggingface.co/datasets/facebook/belebele/viewer/ary_Arab" target="_blank">Belebele Ary</a></td>
335
+ </tr>
336
+ <tr>
337
+ <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
338
+ <td>35.39</td>
339
+ <td>32.51</td>
340
+ <td>38.33</td>
341
+ </tr>
342
+ <tr>
343
+ <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
344
+ <td>37.44</td>
345
+ <td>34.49</td>
346
+ <td>44.11</td>
347
+ </tr>
348
+ <tr>
349
+ <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
350
+ <td>28.58</td>
351
+ <td>32.42</td>
352
+ <td>25.22</td>
353
+ </tr>
354
+ <tr>
355
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
356
+ <td>27.66</td>
357
+ <td>26.88</td>
358
+ <td>28.89</td>
359
+ </tr>
360
+ <tr>
361
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
362
+ <td>32.60</td>
363
+ <td>28.33</td>
364
+ <td>38.00</td>
365
+ </tr>
366
+ <tr>
367
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
368
+ <td><b>44.97</td>
369
+ <td><b>41.48</td>
370
+ <td><b>53.89</td>
371
+ </tr>
372
+ <tr style="border-top: 4px solid;"></tr>
373
+ <tr>
374
+ <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
375
+ <td>39.96</td>
376
+ <td>41.57</td>
377
+ <td>51.22</td>
378
+ </tr>
379
+ <tr>
380
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
381
+ <td>39.30</td>
382
+ <td>35.19</td>
383
+ <td>43.67</td>
384
+ </tr>
385
+ <tr>
386
+ <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
387
+ <td>45.11</td>
388
+ <td>43.90</td>
389
+ <td>58.67</td>
390
+ </tr>
391
+ <tr>
392
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
393
+ <td>45.20</td>
394
+ <td>40.65</td>
395
+ <td>49.67</td>
396
+ </tr>
397
+ <tr>
398
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
399
+ <td>35.98</td>
400
+ <td>36.57</td>
401
+ <td>30.11</td>
402
+ </tr>
403
+ <tr>
404
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
405
+ <td>41.09</td>
406
+ <td>38.35</td>
407
+ <td>33.11</td>
408
+ </tr>
409
+ <tr>
410
+ <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
411
+ <td>35.91</td>
412
+ <td>42.43</td>
413
+ <td>31.00</td>
414
+ </tr>
415
+ <tr>
416
+ <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
417
+ <td>44.13</td>
418
+ <td>38.24</td>
419
+ <td>47.00</td>
420
+ </tr>
421
+ <tr>
422
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
423
+ <td><b>58.23</td>
424
+ <td><b>57.75</td>
425
+ <td><b>74.56</td>
426
+ </tr>
427
+ <tr style="border-top: 4px solid;"></tr>
428
+ <tr>
429
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
430
+ <td>51.88</td>
431
+ <td>35.61</td>
432
+ <td>65.67</td>
433
+ </tr>
434
+ <tr>
435
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
436
+ <td>36.47</td>
437
+ <td>37.04</td>
438
+ <td>35.78</td>
439
+ </tr>
440
+ <tr>
441
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
442
+ <td><b>61.95</td>
443
+ <td><b>48.37</td>
444
+ <td><b>75.67</td>
445
+ </tr>
446
+
447
+
448
+
449
+ </table>
450
+
451
+ **Standard NLP Tasks:**
452
  <table>
453
  <tr>
454
  <td rowspan="2">Model</td>
455
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Translation)</a></td>
456
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MADAR (Translation)</a></td>
457
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">FLORES+ (Translation)</a></td>
458
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">NLLB-Seed (Translation)</a></td>
459
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Transliteration)</a></td>
460
  <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MArSum (Summarization)</a><br/>(LLM as a judge)</td>
461
+ <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">Sentiment Analysis</a></td>
462
  </tr>
463
  <tr>
464
  <td>BLEU</td>
465
  <td>chrF</td>
466
+ <td>BLEU</td>
467
+ <td>chrF</td>
468
+ <td>BLEU</td>
469
+ <td>chrF</td>
470
+ <td>BLEU</td>
471
+ <td>chrF</td>
472
+ <td>BLEU</td>
473
+ <td>chrF</td>
474
  </tr>
475
  <tr>
476
  <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
 
 
 
 
477
  <td>00.13</td>
478
  <td>06.18</td>
479
  <td>00.50</td>
480
+ <td>15.43</td>
481
+ <td>02.44</td>
482
+ <td>19.14</td>
483
+ <td>01.99</td>
484
+ <td>12.60</td>
485
+ <td>00.01</td>
486
+ <td>03.01</td>
487
+ <td>00.50</td>
488
+ <td>45.29</td>
489
  </tr>
490
  <tr>
491
  <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
 
 
 
 
492
  <td>00.25</td>
493
  <td>07.46</td>
494
+ <td>00.62</td>
495
+ <td>16.36</td>
496
+ <td>04.25</td>
497
+ <td>18.22</td>
498
+ <td>03.10</td>
499
+ <td>08.19</td>
500
+ <td>00.01</td>
501
+ <td>03.27</td>
502
  <td>00.90</td>
503
+ <td>51.56</td>
504
  </tr>
505
  <tr>
506
  <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
 
 
 
 
507
  <td>00.10</td>
508
  <td>04.96</td>
509
+ <td>00.12</td>
510
+ <td>06.66</td>
511
+ <td>01.55</td>
512
+ <td>18.59</td>
513
+ <td>02.78</td>
514
+ <td>23.69</td>
515
+ <td>00.01</td>
516
+ <td>02.08</td>
517
  <td>06.80</td>
518
+ <td>53.36</td>
519
+ </tr>
520
+ <tr>
521
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
522
+ <td>00.07</td>
523
+ <td>05.95</td>
524
+ <td>00.80</td>
525
+ <td>18.71</td>
526
+ <td>04.53</td>
527
+ <td>18.39</td>
528
+ <td>04.52</td>
529
+ <td>17.06</td>
530
+ <td>00.02</td>
531
+ <td>03.74</td>
532
+ <td>08.23</td>
533
+ <td>46.27</td>
534
+ </tr>
535
+ <tr>
536
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
537
+ <td>00.62</td>
538
+ <td>13.67</td>
539
+ <td>01.18</td>
540
+ <td>22.12</td>
541
+ <td>08.59</td>
542
+ <td>35.21</td>
543
+ <td>13.75</td>
544
+ <td>43.63</td>
545
+ <td>00.21</td>
546
+ <td>09.68</td>
547
+ <td>08.23</td>
548
+ <td>49.20</td>
549
  </tr>
550
  <tr>
551
  <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
 
 
 
 
552
  <td><b>22.76</td>
553
  <td><b>44.86</td>
554
+ <td><b>16.67</td>
555
+ <td><b>41.64</td>
556
+ <td><b>14.92</td>
557
+ <td><b>43.03</td>
558
+ <td><b>23.88</td>
559
+ <td><b>52.19</td>
560
+ <td><b>08.18</td>
561
+ <td><b>21.54</td>
562
  <td><b>55.22</td>
563
+ <td><b>73.99</td>
564
  </tr>
565
  <tr style="border-top: 4px solid;"></tr>
566
  <tr>
567
  <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
 
 
 
 
568
  <td>00.73</td>
569
  <td>11.85</td>
570
+ <td>01.88</td>
571
+ <td>23.22</td>
572
+ <td>04.25</td>
573
+ <td>18.22</td>
574
+ <td>04.62</td>
575
+ <td>20.22</td>
576
+ <td>00.02</td>
577
+ <td>03.79</td>
578
  <td>03.02</td>
579
+ <td>56.78</td>
580
  </tr>
581
  <tr>
582
  <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
 
 
 
 
583
  <td>00.60</td>
584
  <td>09.43</td>
585
+ <td>03.45</td>
586
+ <td>25.88</td>
587
+ <td>07.25</td>
588
+ <td>23.21</td>
589
+ <td>01.25</td>
590
+ <td>02.22</td>
591
+ <td>00.04</td>
592
+ <td>03.24</td>
593
  <td>02.82</td>
594
+ <td>52.72</td>
595
  </tr>
596
  <tr>
597
  <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
 
 
 
 
598
  <td>00.92</td>
599
  <td>11.71</td>
600
+ <td>04.01</td>
601
+ <td>28.48</td>
602
+ <td>05.70</td>
603
+ <td>27.24</td>
604
+ <td>04.50</td>
605
+ <td>22.56</td>
606
+ <td>00.03</td>
607
+ <td>03.57</td>
608
  <td>01.77</td>
609
+ <td>41.73</td>
610
  </tr>
611
  <tr>
612
  <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
 
 
 
 
613
  <td>00.87</td>
614
  <td>10.52</td>
615
+ <td>04.02</td>
616
+ <td>25.29</td>
617
+ <td>06.66</td>
618
+ <td>23.46</td>
619
+ <td>20.14</td>
620
+ <td>47.87</td>
621
+ <td>0.04</td>
622
+ <td>04.77</td>
623
  <td>01.92</td>
624
+ <td>66.68</td>
625
  </tr>
626
  <tr>
627
  <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
 
 
 
 
628
  <td>00.44</td>
629
  <td>11.33</td>
630
+ <td>01.05</td>
631
+ <td>19.24</td>
632
+ <td>06.92</td>
633
+ <td>36.03</td>
634
+ <td>11.05</td>
635
+ <td>44.55</td>
636
+ <td>00.06</td>
637
+ <td>04.74</td>
638
  <td>02.28</td>
639
+ <td>40.23</td>
640
+ </tr>
641
+ <tr>
642
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
643
+ <td>00.98</td>
644
+ <td>16.70</td>
645
+ <td>00.81</td>
646
+ <td>20.23</td>
647
+ <td>08.73</td>
648
+ <td>40.76</td>
649
+ <td>14.02</td>
650
+ <td>48.28</td>
651
+ <td>00.12</td>
652
+ <td>06.32</td>
653
+ <td>02.80</td>
654
+ <td>59.58</td>
655
+ </tr>
656
+ <tr>
657
+ <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
658
+ <td>03.10</td>
659
+ <td>19.16</td>
660
+ <td>01.72</td>
661
+ <td>24.35</td>
662
+ <td>05.18</td>
663
+ <td>36.96</td>
664
+ <td>08.23</td>
665
+ <td>43.57</td>
666
+ <td>00.17</td>
667
+ <td>09.14</td>
668
+ <td>13.81</td>
669
+ <td>59.87</td>
670
+ </tr>
671
+ <tr>
672
+ <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
673
+ <td>00.92</td>
674
+ <td>14.19</td>
675
+ <td>01.46</td>
676
+ <td>23.82</td>
677
+ <td>08.89</td>
678
+ <td>33.08</td>
679
+ <td>11.85</td>
680
+ <td>35.51</td>
681
+ <td>00.11</td>
682
+ <td>06.02</td>
683
+ <td>01.28</td>
684
+ <td>44.08</td>
685
+ </tr>
686
+ <tr>
687
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
688
+ <td><b>28.08</td>
689
+ <td><b>50.48</td>
690
+ <td><b>18.16</td>
691
+ <td><b>43.91</td>
692
+ <td><b>18.63</td>
693
+ <td><b>47.53</td>
694
+ <td><b>29.98</td>
695
+ <td><b>58.26</td>
696
+ <td><b>22.08</td>
697
+ <td><b>34.17</td>
698
+ <td><b>59.76</td>
699
+ <td><b>81.89</td>
700
+ </tr>
701
+ <tr style="border-top: 4px solid;"></tr>
702
+ <tr>
703
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
704
+ <td>01.10</td>
705
+ <td>14.40</td>
706
+ <td>01.67</td>
707
+ <td>23.37</td>
708
+ <td>08.52</td>
709
+ <td>35.41</td>
710
+ <td>13.71</td>
711
+ <td>41.33</td>
712
+ <td>00.05</td>
713
+ <td>04.48</td>
714
+ <td>00.46</td>
715
+ <td>56.73</td>
716
+ </tr>
717
+ <tr>
718
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
719
+ <td>00.67</td>
720
+ <td>13.04</td>
721
+ <td>01.74</td>
722
+ <td>24.63</td>
723
+ <td>05.17</td>
724
+ <td>37.08</td>
725
+ <td>07.36</td>
726
+ <td>42.49</td>
727
+ <td>00.03</td>
728
+ <td>04.94</td>
729
+ <td>11.10</td>
730
+ <td>57.59</td>
731
+ </tr>
732
+ <tr>
733
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
734
+ <td><b>29.55</td>
735
+ <td><b>51.74</td>
736
+ <td><b>19.66</td>
737
+ <td><b>45.65</td>
738
+ <td><b>20.34</td>
739
+ <td><b>49.19</td>
740
+ <td><b>31.61</td>
741
+ <td><b>59.37</td>
742
+ <td><b>33.03</td>
743
+ <td><b>40.95</td>
744
+ <td><b>60.70</td>
745
+ <td>73.00</td>
746
+ </tr>
747
+
748
+
749
+
750
+ </table>
751
+ -->
752
+
753
+ ## Evaluation
754
+ The Atlas-Chat models were evaluated on a comprehensive suite of tasks using various datasets and benchmarks to assess their performance across multiple dimensions. These included tasks such as:
755
+
756
+ * **DarijaMMLU:** A Darija version of ArabicMMLU and MMLU benchmarks translated from MSA and English respectively.
757
+ * **DarijaHellaSwag:** A Darija version of HellaSwag.
758
+ * **Belebele Ary_Arab:** Belebele is a multiple-choice machine reading comprehension dataset published by Facebook spanning 122 language variants. The Evaluation is done on the Ary_Arab part of Belebele that refers to Darija.
759
+ * **DarijaAlpacaEval:** A Darija version of AlpacaEval translated to Darija and adapted to the Moroccan culture.
760
+ * **Sentiment Analysis.**
761
+ * **Translation:** Including six directions and four languages: Darija, MSA, English and French.
762
+ * **Transliteration:** Transforming a sentence from Darija (written in Arabic characters) to Arabizi (Written in Latin characters) and vice-versa.
763
+ * **Summarization.**
764
+
765
+ The models were compared against a collection of existing open-source Arabic models to gauge their effectiveness, with a particular focus on performance in Darija. All scores are based on zero-shot performance. The prompts are written mainly in Darija. The metric used for DarijaMMLU, DarijaHellaSwag, Belebele Ary and Sentiment Analysis is the normalized accuracy. We used [Language Model Evaluation Harness](https://github.com/MBZUAI-Paris/lm-evaluation-harness-atlas-chat) to conduct these evaluations.
766
+
767
+ **LLMs Benchmarks:**
768
+ <table>
769
+ <tr>
770
+ <td>Model</td>
771
+ <td><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaMMLU" target="_blank">DarijaMMLU</a></td>
772
+ <td><a href="MBZUAI-Paris/DarijaHellaSwag" target="_blank">DarijaHellaSwag</a></td>
773
+ <td ><a href="https://huggingface.co/datasets/facebook/belebele/viewer/ary_Arab" target="_blank">Belebele Ary</a></td>
774
+ <td ><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaAlpacaEval" target="_blank">DarijaAlpacaEval</a></td>
775
+ </tr>
776
+ <tr>
777
+ <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
778
+ <td>35.39</td>
779
+ <td>32.51</td>
780
+ <td>38.33</td>
781
+ <td>35.56</td>
782
+ </tr>
783
+ <tr>
784
+ <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
785
+ <td>37.44</td>
786
+ <td>34.49</td>
787
+ <td>44.11</td>
788
+ <td>52.97</td>
789
+ </tr>
790
+ <tr>
791
+ <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
792
+ <td>28.58</td>
793
+ <td>32.42</td>
794
+ <td>25.22</td>
795
+ <td>58.67</td>
796
+ </tr>
797
+ <tr>
798
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
799
+ <td>27.66</td>
800
+ <td>26.88</td>
801
+ <td>28.89</td>
802
+ <td>23.57</td>
803
+ </tr>
804
+ <tr>
805
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
806
+ <td>32.60</td>
807
+ <td>28.33</td>
808
+ <td>38.00</td>
809
+ <td>47.62</td>
810
+ </tr>
811
+ <tr>
812
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
813
+ <td><b>44.97</b></td>
814
+ <td><b>41.48</b></td>
815
+ <td><b>53.89</b></td>
816
+ <td><b>92.31</b></td>
817
+ </tr>
818
+ <tr style="border-top: 4px solid;"></tr>
819
+ <tr>
820
+ <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
821
+ <td>39.96</td>
822
+ <td>41.57</td>
823
+ <td>51.22</td>
824
+ <td>65.18</td>
825
+ </tr>
826
+ <tr>
827
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
828
+ <td>39.30</td>
829
+ <td>35.19</td>
830
+ <td>43.67</td>
831
+ <td>61.84</td>
832
+ </tr>
833
+ <tr>
834
+ <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
835
+ <td>45.11</td>
836
+ <td>43.90</td>
837
+ <td>58.67</td>
838
+ <td>69.93</td>
839
+ </tr>
840
+ <tr>
841
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
842
+ <td>45.20</td>
843
+ <td>40.65</td>
844
+ <td>49.67</td>
845
+ <td>77.52</td>
846
+ </tr>
847
+ <tr>
848
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
849
+ <td>35.98</td>
850
+ <td>36.57</td>
851
+ <td>30.11</td>
852
+ <td>47.31</td>
853
  </tr>
854
  <tr>
855
  <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
856
  <td>41.09</td>
857
  <td>38.35</td>
858
  <td>33.11</td>
859
+ <td>52.79</td>
 
 
 
860
  </tr>
861
  <tr>
862
  <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
863
  <td>35.91</td>
864
  <td>42.43</td>
865
  <td>31.00</td>
866
+ <td>90.86</td>
 
 
 
867
  </tr>
868
  <tr>
869
  <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
870
  <td>44.13</td>
871
  <td>38.24</td>
872
  <td>47.00</td>
873
+ <td>78.08</td>
874
+ </tr>
875
+ <tr>
876
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
877
+ <td><b>58.23</b></td>
878
+ <td><b>57.75</b></td>
879
+ <td><b>74.56</b></td>
880
+ <td><b>95.62</b></td>
881
+ </tr>
882
+ <tr style="border-top: 4px solid;"></tr>
883
+ <tr>
884
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
885
+ <td>51.88</td>
886
+ <td>35.61</td>
887
+ <td>65.67</td>
888
+ <td>24.64</td>
889
+ </tr>
890
+ <tr>
891
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
892
+ <td>36.47</td>
893
+ <td>37.04</td>
894
+ <td>35.78</td>
895
+ <td>95.07</td>
896
+ </tr>
897
+ <tr>
898
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
899
+ <td><b>61.95</b></td>
900
+ <td><b>48.37</b></td>
901
+ <td><b>75.67</b></td>
902
+ <td><b>96.58</b></td>
903
+ </tr>
904
+ </table>
905
+
906
+ **Standard NLP Tasks:**
907
+ <table>
908
+ <tr>
909
+ <td rowspan="2">Model</td>
910
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Translation)</a></td>
911
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MADAR (Translation)</a></td>
912
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">FLORES+ (Translation)</a></td>
913
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">NLLB-Seed (Translation)</a></td>
914
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Transliteration)</a></td>
915
+ <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MArSum (Summarization)</a><br/>(LLM as a judge)</td>
916
+ <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">Sentiment Analysis</a></td>
917
+ </tr>
918
+ <tr>
919
+ <td>BLEU</td>
920
+ <td>chrF</td>
921
+ <td>BLEU</td>
922
+ <td>chrF</td>
923
+ <td>BLEU</td>
924
+ <td>chrF</td>
925
+ <td>BLEU</td>
926
+ <td>chrF</td>
927
+ <td>BLEU</td>
928
+ <td>chrF</td>
929
+ </tr>
930
+ <tr>
931
+ <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
932
+ <td>00.13</td>
933
+ <td>06.18</td>
934
+ <td>00.50</td>
935
+ <td>15.43</td>
936
+ <td>02.44</td>
937
+ <td>19.14</td>
938
+ <td>01.99</td>
939
+ <td>12.60</td>
940
+ <td>00.01</td>
941
+ <td>03.01</td>
942
+ <td>00.50</td>
943
+ <td>45.29</td>
944
+ </tr>
945
+ <tr>
946
+ <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
947
+ <td>00.25</td>
948
+ <td>07.46</td>
949
+ <td>00.62</td>
950
+ <td>16.36</td>
951
+ <td>04.25</td>
952
+ <td>18.22</td>
953
+ <td>03.10</td>
954
+ <td>08.19</td>
955
+ <td>00.01</td>
956
+ <td>03.27</td>
957
+ <td>00.90</td>
958
+ <td>51.56</td>
959
+ </tr>
960
+ <tr>
961
+ <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
962
+ <td>00.10</td>
963
+ <td>04.96</td>
964
+ <td>00.12</td>
965
+ <td>06.66</td>
966
+ <td>01.55</td>
967
+ <td>18.59</td>
968
+ <td>02.78</td>
969
+ <td>23.69</td>
970
+ <td>00.01</td>
971
+ <td>02.08</td>
972
+ <td>06.80</td>
973
+ <td>53.36</td>
974
+ </tr>
975
+ <tr>
976
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
977
+ <td>00.07</td>
978
+ <td>05.95</td>
979
+ <td>00.80</td>
980
+ <td>18.71</td>
981
+ <td>04.53</td>
982
+ <td>18.39</td>
983
+ <td>04.52</td>
984
+ <td>17.06</td>
985
+ <td>00.02</td>
986
+ <td>03.74</td>
987
+ <td>08.23</td>
988
+ <td>46.27</td>
989
+ </tr>
990
+ <tr>
991
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
992
+ <td>00.62</td>
993
+ <td>13.67</td>
994
+ <td>01.18</td>
995
+ <td>22.12</td>
996
+ <td>08.59</td>
997
+ <td>35.21</td>
998
+ <td>13.75</td>
999
+ <td>43.63</td>
1000
+ <td>00.21</td>
1001
+ <td>09.68</td>
1002
+ <td>08.23</td>
1003
+ <td>49.20</td>
1004
+ </tr>
1005
+ <tr>
1006
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
1007
+ <td><b>22.76</td>
1008
+ <td><b>44.86</td>
1009
+ <td><b>16.67</td>
1010
+ <td><b>41.64</td>
1011
+ <td><b>14.92</td>
1012
+ <td><b>43.03</td>
1013
+ <td><b>23.88</td>
1014
+ <td><b>52.19</td>
1015
+ <td><b>08.18</td>
1016
+ <td><b>21.54</td>
1017
+ <td><b>55.22</td>
1018
+ <td><b>73.99</td>
1019
+ </tr>
1020
+ <tr style="border-top: 4px solid;"></tr>
1021
+ <tr>
1022
+ <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
1023
+ <td>00.73</td>
1024
+ <td>11.85</td>
1025
+ <td>01.88</td>
1026
+ <td>23.22</td>
1027
+ <td>04.25</td>
1028
+ <td>18.22</td>
1029
+ <td>04.62</td>
1030
+ <td>20.22</td>
1031
+ <td>00.02</td>
1032
+ <td>03.79</td>
1033
+ <td>03.02</td>
1034
+ <td>56.78</td>
1035
+ </tr>
1036
+ <tr>
1037
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
1038
+ <td>00.60</td>
1039
+ <td>09.43</td>
1040
+ <td>03.45</td>
1041
+ <td>25.88</td>
1042
+ <td>07.25</td>
1043
+ <td>23.21</td>
1044
+ <td>01.25</td>
1045
+ <td>02.22</td>
1046
+ <td>00.04</td>
1047
+ <td>03.24</td>
1048
+ <td>02.82</td>
1049
+ <td>52.72</td>
1050
+ </tr>
1051
+ <tr>
1052
+ <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
1053
+ <td>00.92</td>
1054
+ <td>11.71</td>
1055
+ <td>04.01</td>
1056
+ <td>28.48</td>
1057
+ <td>05.70</td>
1058
+ <td>27.24</td>
1059
+ <td>04.50</td>
1060
+ <td>22.56</td>
1061
+ <td>00.03</td>
1062
+ <td>03.57</td>
1063
+ <td>01.77</td>
1064
+ <td>41.73</td>
1065
+ </tr>
1066
+ <tr>
1067
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
1068
+ <td>00.87</td>
1069
+ <td>10.52</td>
1070
+ <td>04.02</td>
1071
+ <td>25.29</td>
1072
+ <td>06.66</td>
1073
+ <td>23.46</td>
1074
+ <td>20.14</td>
1075
+ <td>47.87</td>
1076
+ <td>0.04</td>
1077
+ <td>04.77</td>
1078
+ <td>01.92</td>
1079
+ <td>66.68</td>
1080
+ </tr>
1081
+ <tr>
1082
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
1083
+ <td>00.44</td>
1084
+ <td>11.33</td>
1085
+ <td>01.05</td>
1086
+ <td>19.24</td>
1087
+ <td>06.92</td>
1088
+ <td>36.03</td>
1089
+ <td>11.05</td>
1090
+ <td>44.55</td>
1091
+ <td>00.06</td>
1092
+ <td>04.74</td>
1093
+ <td>02.28</td>
1094
+ <td>40.23</td>
1095
+ </tr>
1096
+ <tr>
1097
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
1098
+ <td>00.98</td>
1099
+ <td>16.70</td>
1100
+ <td>00.81</td>
1101
+ <td>20.23</td>
1102
+ <td>08.73</td>
1103
+ <td>40.76</td>
1104
+ <td>14.02</td>
1105
+ <td>48.28</td>
1106
+ <td>00.12</td>
1107
+ <td>06.32</td>
1108
+ <td>02.80</td>
1109
+ <td>59.58</td>
1110
+ </tr>
1111
+ <tr>
1112
+ <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
1113
+ <td>03.10</td>
1114
+ <td>19.16</td>
1115
+ <td>01.72</td>
1116
+ <td>24.35</td>
1117
+ <td>05.18</td>
1118
+ <td>36.96</td>
1119
+ <td>08.23</td>
1120
+ <td>43.57</td>
1121
+ <td>00.17</td>
1122
+ <td>09.14</td>
1123
+ <td>13.81</td>
1124
+ <td>59.87</td>
1125
+ </tr>
1126
+ <tr>
1127
+ <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
1128
  <td>00.92</td>
1129
  <td>14.19</td>
1130
+ <td>01.46</td>
1131
+ <td>23.82</td>
1132
+ <td>08.89</td>
1133
+ <td>33.08</td>
1134
+ <td>11.85</td>
1135
+ <td>35.51</td>
1136
+ <td>00.11</td>
1137
+ <td>06.02</td>
1138
+ <td>16.14</td>
1139
+ <td>44.08</td>
1140
  </tr>
1141
  <tr>
1142
  <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
 
 
 
 
1143
  <td><b>28.08</td>
1144
  <td><b>50.48</td>
1145
+ <td><b>18.16</td>
1146
+ <td><b>43.91</td>
1147
+ <td><b>18.63</td>
1148
+ <td><b>47.53</td>
1149
+ <td><b>29.98</td>
1150
+ <td><b>58.26</td>
1151
+ <td><b>22.08</td>
1152
+ <td><b>34.17</td>
1153
  <td><b>59.76</td>
1154
+ <td><b>81.89</td>
1155
+ </tr>
1156
+ <tr style="border-top: 4px solid;"></tr>
1157
+ <tr>
1158
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
1159
+ <td>01.10</td>
1160
+ <td>14.40</td>
1161
+ <td>01.67</td>
1162
+ <td>23.37</td>
1163
+ <td>08.52</td>
1164
+ <td>35.41</td>
1165
+ <td>13.71</td>
1166
+ <td>41.33</td>
1167
+ <td>00.05</td>
1168
+ <td>04.48</td>
1169
+ <td>00.46</td>
1170
+ <td>56.73</td>
1171
+ </tr>
1172
+ <tr>
1173
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
1174
+ <td>00.67</td>
1175
+ <td>13.04</td>
1176
+ <td>01.74</td>
1177
+ <td>24.63</td>
1178
+ <td>05.17</td>
1179
+ <td>37.08</td>
1180
+ <td>07.36</td>
1181
+ <td>42.49</td>
1182
+ <td>00.03</td>
1183
+ <td>04.94</td>
1184
+ <td>11.10</td>
1185
+ <td>57.59</td>
1186
+ </tr>
1187
+ <tr>
1188
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
1189
+ <td><b>29.55</td>
1190
+ <td><b>51.74</td>
1191
+ <td><b>19.66</td>
1192
+ <td><b>45.65</td>
1193
+ <td><b>20.34</td>
1194
+ <td><b>49.19</td>
1195
+ <td><b>31.61</td>
1196
+ <td><b>59.37</td>
1197
+ <td><b>33.03</td>
1198
+ <td><b>40.95</td>
1199
+ <td><b>60.70</td>
1200
+ <td>73.00</td>
1201
  </tr>
1202
 
1203
 
1204
 
1205
  </table>
1206
 
 
1207
  ## Usage and Limitations
1208
 
1209
  These models have certain limitations that users should be aware of.