RichardErkhov commited on
Commit
5ba8f6d
·
verified ·
1 Parent(s): b661214

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +876 -0
README.md ADDED
@@ -0,0 +1,876 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Atlas-Chat-2B - bnb 4bits
11
+ - Model creator: https://huggingface.co/MBZUAI-Paris/
12
+ - Original model: https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: gemma
20
+ library_name: transformers
21
+ pipeline_tag: text-generation
22
+ extra_gated_button_content: Acknowledge license
23
+ tags:
24
+ - conversational
25
+ language:
26
+ - ar
27
+ - ary
28
+ datasets:
29
+ - MBZUAI-Paris/Darija-SFT-Mixture
30
+ base_model:
31
+ - google/gemma-2-2b-it
32
+ ---
33
+
34
+
35
+ # JAIS Intiative: Atlas-Chat Models
36
+
37
+
38
+ ## Model Overview
39
+
40
+ 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:
41
+ * [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.
42
+ * [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.
43
+ * [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.
44
+
45
+ The models are designed to assist with:
46
+
47
+ * Conversational agents and chatbots that operate in Darija.
48
+ * Translation, summarization, and content generation in informal dialect.
49
+ * Cultural research related to Morocco and its language.
50
+
51
+ **Paper:** [Atlas-Chat: Adapting Large Language Models for Low-Resource Moroccan Arabic Dialect](https://arxiv.org/abs/2409.17912)
52
+
53
+ ## 👥 Our Team
54
+
55
+ The model is developed by MBZUAI France Lab, an AI research center in Paris affiliated with the [Mohamed bin Zayed University of Artificial Intelligence (MBZUAI)](https://mbzuai.ac.ae/) headquartered in Abu Dhabi.
56
+
57
+
58
+ ## Usage
59
+
60
+ Below we share some code snippets on how to get quickly started with running the model. First, install the Transformers library with:
61
+
62
+ ```sh
63
+ pip install -U transformers sentencepiece
64
+ ```
65
+
66
+ Then, copy the snippet from the section that is relevant for your use case.
67
+
68
+ #### Running with the `pipeline` API
69
+
70
+ ```python
71
+ import torch
72
+ from transformers import pipeline
73
+
74
+ pipe = pipeline(
75
+ "text-generation",
76
+ model="MBZUAI-Paris/Atlas-Chat-2B",
77
+ model_kwargs={"torch_dtype": torch.bfloat16},
78
+ device="cuda" # replace with "mps" to run on a Mac device
79
+ )
80
+
81
+ messages = [
82
+ {"role": "user", "content": 'شكون لي صنعك؟'},
83
+ ]
84
+
85
+ outputs = pipe(messages, max_new_tokens=256, temperature=0.0)
86
+ assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
87
+ print(assistant_response)
88
+ ```
89
+
90
+ - Response:
91
+
92
+
93
+ >قادّوني الباحثين والمهندسين ديال جامعة محمد بن زايد للذكاء الاصطناعي. جامعة محمد بن زايد للذكاء الاصطناعي هي جامعة ديال البحت والدراسات العليا، كتّخصّص فتعزيز الذكاء الاصطناعي والاستعمال ديالو لمصلحة الإنسانية. يمكن ليك تزور https://mbzuai.ac.ae/ar/about/ باش تعرف كثر على جامعة محمد بن زايد للذكاء الاصطناعي والمهمة ديالها!
94
+
95
+
96
+ #### Running the model on a single / multi GPU
97
+
98
+ ```sh
99
+ pip install accelerate
100
+ ```
101
+
102
+ ```python
103
+ from transformers import AutoTokenizer, AutoModelForCausalLM
104
+ import torch
105
+
106
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
107
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
108
+ model = AutoModelForCausalLM.from_pretrained(
109
+ model_id,
110
+ device_map="auto",
111
+ torch_dtype=torch.bfloat16,
112
+ )
113
+
114
+ messages = [
115
+ {"role": "user", "content": "شنو كيتسمى المنتخب المغربي ؟"},
116
+ ]
117
+
118
+ input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True, , add_generation_prompt=True)
119
+
120
+ outputs = model.generate(**input_ids, max_new_tokens=256)
121
+
122
+ print(tokenizer.decode(outputs[0]))
123
+ ```
124
+
125
+ - Response:
126
+ >المنتخب المغربي كيتسمى "أسود الاطلس".
127
+
128
+
129
+
130
+ #### Quantized Versions through `bitsandbytes`
131
+
132
+ <details>
133
+ <summary>
134
+ Using 8-bit precision (int8)
135
+ </summary>
136
+
137
+ ```sh
138
+ pip install bitsandbytes accelerate
139
+ ```
140
+
141
+ ```python
142
+ # pip install bitsandbytes accelerate
143
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
144
+
145
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
146
+ quantization_config = BitsAndBytesConfig(load_in_8bit=True)
147
+
148
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
149
+ model = AutoModelForCausalLM.from_pretrained(
150
+ model_id,
151
+ quantization_config=quantization_config,
152
+ )
153
+ text = f"""
154
+ شرح ليا هاد الهضرة:
155
+ في القرن 19 لقاو الذّهب في كاليفورنيا، ناضو لّي كيبيعو العتلة والفاس كيقنعو الناس بلي غيديرو لاباس يلا قلبو على الذهب... فالأخير اغتنى تجار أدوات التنقيب والحفر. وحاليا كاين لّي كيقنع الأخرين بلي هو مليونير، وعندو الوقت يورّي للآخرين كيفاش يديرو لاباس.
156
+ """
157
+ messages = [
158
+ {"role": "user", "content": text},
159
+ ]
160
+ input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
161
+
162
+ outputs = model.generate(**input_ids, max_new_tokens=256)
163
+ print(tokenizer.decode(outputs[0]).split("<start_of_turn>model")[-1])
164
+ ```
165
+
166
+ - Response:
167
+
168
+
169
+ >ف القرن 19، لقاو الذهب ف كاليفورنيا، وهاد الشي جاب بزاف ديال الناس باش يمشيو ليه. هاد الناس كانو كيبيعو العتلة والفاس وكيتظاهرو بلي إلا قلبو على الذهب غادي يلقاو ليه. ف الآخر، هاد التجار ديال التنقيب والحفر كانو كيتغلبو على الناس اللي بغاو يقلبو على الذهب.
170
+ >
171
+ >دابا، كاينين ناس اللي كيتظاهرو بلي هوما مليونيرين وكيتظاهرو بلي عندهم الوقت يورّيو للناس كيفاش يلقاو الذهب. هاد الناس كيتظاهرو بلي عندهم الخبرة والخبرة باش يلقاو الذهب، ولكن ف الحقيقة، هاد الشي ماشي صحيح.
172
+
173
+
174
+ </details>
175
+
176
+ <details>
177
+ <summary>
178
+ Using 4-bit precision
179
+ </summary>
180
+
181
+ ```python
182
+ # pip install bitsandbytes accelerate
183
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
184
+
185
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
186
+ quantization_config = BitsAndBytesConfig(load_in_4bit=True)
187
+
188
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
189
+ model = AutoModelForCausalLM.from_pretrained(
190
+ model_id,
191
+ quantization_config=quantization_config,
192
+ )
193
+ text = f"""ترجم للدارجة:
194
+ Atlas Chat is the first open source large language model that talks in Darija.
195
+ """
196
+ messages = [
197
+ {"role": "user", "content": text},
198
+ ]
199
+ input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True, add_generation_prompt=True)
200
+
201
+ outputs = model.generate(**input_ids, max_new_tokens=256, temperature=0.0)
202
+ print(tokenizer.decode(outputs[0]).split("<start_of_turn>model")[-1])
203
+ ```
204
+
205
+ - Response:
206
+
207
+ >إن أطلاس شات هو أول نموذج لغة كبير مفتوح المصدر كيهضر بالدارجة.
208
+
209
+
210
+ </details>
211
+
212
+
213
+ ### Chat Template
214
+
215
+ The models use a chat template that must be adhered to conversational use.
216
+ The easiest way to apply it is using the tokenizer's built-in chat template, as shown in the following snippet.
217
+
218
+ Let's load the model and apply the chat template to a conversation. In this example, we'll start with a single user interaction:
219
+
220
+ ```python
221
+ from transformers import AutoTokenizer, AutoModelForCausalLM
222
+ import transformers
223
+ import torch
224
+
225
+ model_id = "MBZUAI-Paris/Atlas-Chat-2B"
226
+ dtype = torch.bfloat16
227
+
228
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
229
+ model = AutoModelForCausalLM.from_pretrained(
230
+ model_id,
231
+ device_map="cuda",
232
+ torch_dtype=dtype,)
233
+
234
+ chat = [
235
+ { "role": "user", "content": "اشنو هو الطاجين ؟"},
236
+ ]
237
+ prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
238
+ ```
239
+
240
+ At this point, the prompt contains the following text:
241
+
242
+ ```
243
+ <bos><start_of_turn>user
244
+ اشنو هو الطاجين ؟<end_of_turn>
245
+ <start_of_turn>model
246
+ ```
247
+
248
+ As you can see, each turn is preceded by a `<start_of_turn>` delimiter and then the role of the entity
249
+ (either `user`, for content supplied by the user, or `model` for LLM responses). Turns finish with
250
+ the `<end_of_turn>` token.
251
+
252
+ You can follow this format to build the prompt manually, if you need to do it without the tokenizer's
253
+ chat template.
254
+
255
+ After the prompt is ready, generation can be performed like this:
256
+
257
+ ```python
258
+ inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
259
+ outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=512)
260
+ print(tokenizer.decode(outputs[0]))
261
+ ```
262
+
263
+ - Response:
264
+
265
+ >الطاجين هو طبق تقليدي مغربي كيتصاوب من اللحم ولا الدجاج ولا الخضرة، مع الخضرة، والبهارات، والصلصة. كيتطيب فالمقلاة ولا فالمقلى على نار هادية لمدة طويلة، وهاد الشي كيخلي اللحم يطيب بشوية ويبدا يذوب. الطاجين معروف بعمق النكهة ديالو والريحة ديالو، وغالبا كيتقدم مع الرز ولا الخبز.
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ ### Inputs and outputs
276
+
277
+ * **Input:** Text string, such as a question, a prompt, or a document to be
278
+ summarized.
279
+ * **Output:** Generated Darija text in response to the input, such
280
+ as an answer to a question, or a summary of a document.
281
+
282
+ ### Chatbot interface using Ollama
283
+
284
+ You can also use Ollama and chatbot-ollama to create a chatbot user-interface to better test the model.
285
+ 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:
286
+ ```bash
287
+
288
+ huggingface-cli download MBZUAI-Paris/Atlas-Chat-2B --local-dir Atlas-Chat-2B/
289
+ ollama create Atlas-Chat-2B -f Atlas-Chat-2B/modelfile
290
+ ollama serve
291
+ ```
292
+ Finally, in a new terminal clone chatbot-ollama repository from Github and run it:
293
+ ```bash
294
+ git clone https://github.com/ivanfioravanti/chatbot-ollama.git
295
+ cd chatbot-ollama
296
+ npm ci
297
+ npm run dev
298
+ ```
299
+ You can start chatting with the model by visiting http://localhost:3000.
300
+ ### Citation
301
+ If you use Atlas-Chat in your research, please cite our paper:
302
+ ```none
303
+ @article{shang2024atlaschatadaptinglargelanguage,
304
+ title={Atlas-Chat: Adapting Large Language Models for Low-Resource Moroccan Arabic Dialect},
305
+ author={Guokan Shang and Hadi Abdine and Yousef Khoubrane and Amr Mohamed and Yassine Abbahaddou and Sofiane Ennadir and Imane Momayiz and Xuguang Ren and Eric Moulines and Preslav Nakov and Michalis Vazirgiannis and Eric Xing},
306
+ year={2024},
307
+ eprint={2409.17912},
308
+ archivePrefix={arXiv},
309
+ primaryClass={cs.CL},
310
+ url={https://arxiv.org/abs/2409.17912},
311
+ }
312
+ ```
313
+
314
+
315
+
316
+
317
+ ## Training Data
318
+ The model was trained on diverse datasets focusing on Darija consisting for approximatley 450k instructions of a maximum length of 2048 tokens, including:
319
+
320
+ * Synthetic instructions created to guide the model in processing various types of language tasks tailord towards Moroccan culture.
321
+ * Instruction samples created from publicly available Moroccan Arabic datasets including translation, summarization and sentiment analysis.
322
+ * Translated English and multi-lingual instruction-tuning datasets.
323
+
324
+ Our training dataset [Darija-SFT-Mixture](https://huggingface.co/datasets/MBZUAI-Paris/Darija-SFT-Mixture) is publicly available.
325
+
326
+
327
+ ## Implementation Information
328
+ 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.
329
+
330
+
331
+ ## Evaluation
332
+ 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:
333
+
334
+ * **DarijaMMLU:** A Darija version of ArabicMMLU and MMLU benchmarks translated from MSA and English respectively.
335
+ * **DarijaHellaSwag:** A Darija version of HellaSwag.
336
+ * **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.
337
+ * **DarijaAlpacaEval:** A Darija version of AlpacaEval translated to Darija and adapted to the Moroccan culture.
338
+ * **Sentiment Analysis.**
339
+ * **Translation:** Including six directions and four languages: Darija, MSA, English and French.
340
+ * **Transliteration:** Transforming a sentence from Darija (written in Arabic characters) to Arabizi (Written in Latin characters) and vice-versa.
341
+ * **Summarization.**
342
+
343
+ 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.
344
+
345
+ **LLMs Benchmarks:**
346
+ <table>
347
+ <tr>
348
+ <td>Model</td>
349
+ <td><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaMMLU" target="_blank">DarijaMMLU</a></td>
350
+ <td><a href="MBZUAI-Paris/DarijaHellaSwag" target="_blank">DarijaHellaSwag</a></td>
351
+ <td ><a href="https://huggingface.co/datasets/facebook/belebele/viewer/ary_Arab" target="_blank">Belebele Ary</a></td>
352
+ <td ><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaAlpacaEval" target="_blank">DarijaAlpacaEval</a></td>
353
+ </tr>
354
+ <tr>
355
+ <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
356
+ <td>35.39</td>
357
+ <td>27.71</td>
358
+ <td>38.33</td>
359
+ <td>35.56</td>
360
+ </tr>
361
+ <tr>
362
+ <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
363
+ <td>37.44</td>
364
+ <td>29.10</td>
365
+ <td>44.11</td>
366
+ <td>52.97</td>
367
+ </tr>
368
+ <tr>
369
+ <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
370
+ <td>28.58</td>
371
+ <td>32.42</td>
372
+ <td>25.22</td>
373
+ <td>58.67</td>
374
+ </tr>
375
+ <tr>
376
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
377
+ <td>27.66</td>
378
+ <td>26.88</td>
379
+ <td>28.89</td>
380
+ <td>23.57</td>
381
+ </tr>
382
+ <tr>
383
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
384
+ <td>32.60</td>
385
+ <td>28.33</td>
386
+ <td>38.00</td>
387
+ <td>47.62</td>
388
+ </tr>
389
+ <tr>
390
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
391
+ <td><b>44.97</b></td>
392
+ <td><b>35.08</b></td>
393
+ <td><b>53.89</b></td>
394
+ <td><b>92.31</b></td>
395
+ </tr>
396
+ <tr style="border-top: 4px solid;"></tr>
397
+ <tr>
398
+ <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
399
+ <td>39.96</td>
400
+ <td>32.64</td>
401
+ <td>51.22</td>
402
+ <td>65.18</td>
403
+ </tr>
404
+ <tr>
405
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
406
+ <td>39.30</td>
407
+ <td>29.55</td>
408
+ <td>43.67</td>
409
+ <td>61.84</td>
410
+ </tr>
411
+ <tr>
412
+ <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
413
+ <td>45.11</td>
414
+ <td>33.98</td>
415
+ <td>58.67</td>
416
+ <td>69.93</td>
417
+ </tr>
418
+ <tr>
419
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
420
+ <td>45.20</td>
421
+ <td>32.84</td>
422
+ <td>49.67</td>
423
+ <td>77.52</td>
424
+ </tr>
425
+ <tr>
426
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
427
+ <td>35.98</td>
428
+ <td>30.33</td>
429
+ <td>30.11</td>
430
+ <td>47.31</td>
431
+ </tr>
432
+ <tr>
433
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
434
+ <td>41.09</td>
435
+ <td>38.35</td>
436
+ <td>33.11</td>
437
+ <td>52.79</td>
438
+ </tr>
439
+ <tr>
440
+ <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
441
+ <td>35.91</td>
442
+ <td>32.19</td>
443
+ <td>31.00</td>
444
+ <td>90.86</td>
445
+ </tr>
446
+ <tr>
447
+ <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
448
+ <td>44.13</td>
449
+ <td>31.40</td>
450
+ <td>47.00</td>
451
+ <td>78.08</td>
452
+ </tr>
453
+ <tr>
454
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
455
+ <td><b>58.23</b></td>
456
+ <td><b>43.65</b></td>
457
+ <td><b>74.56</b></td>
458
+ <td><b>95.62</b></td>
459
+ </tr>
460
+ <tr style="border-top: 4px solid;"></tr>
461
+ <tr>
462
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
463
+ <td>51.88</td>
464
+ <td>35.61</td>
465
+ <td>65.67</td>
466
+ <td>24.64</td>
467
+ </tr>
468
+ <tr>
469
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
470
+ <td>36.47</td>
471
+ <td>37.04</td>
472
+ <td>35.78</td>
473
+ <td>95.07</td>
474
+ </tr>
475
+ <tr>
476
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
477
+ <td><b>61.95</b></td>
478
+ <td><b>48.37</b></td>
479
+ <td><b>75.67</b></td>
480
+ <td><b>96.58</b></td>
481
+ </tr>
482
+ </table>
483
+
484
+ **Standard NLP Tasks:**
485
+ <table>
486
+ <tr>
487
+ <td rowspan="2">Model</td>
488
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Translation)</a></td>
489
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MADAR (Translation)</a></td>
490
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">FLORES+ (Translation)</a></td>
491
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">NLLB-Seed (Translation)</a></td>
492
+ <td colspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">DODa-10k (Transliteration)</a></td>
493
+ <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">MArSum (Summarization)</a><br/>(LLM as a judge)</td>
494
+ <td rowspan="2"><a href="https://huggingface.co/datasets/MBZUAI-Paris/DarijaBench" target="_blank">Sentiment Analysis</a></td>
495
+ </tr>
496
+ <tr>
497
+ <td>BLEU</td>
498
+ <td>chrF</td>
499
+ <td>BLEU</td>
500
+ <td>chrF</td>
501
+ <td>BLEU</td>
502
+ <td>chrF</td>
503
+ <td>BLEU</td>
504
+ <td>chrF</td>
505
+ <td>BLEU</td>
506
+ <td>chrF</td>
507
+ </tr>
508
+ <tr>
509
+ <td><a href="https://huggingface.co/inceptionai/jais-family-1p3b-chat" target="_blank">jais-family-1p3b-chat</a></td>
510
+ <td>00.13</td>
511
+ <td>06.18</td>
512
+ <td>00.50</td>
513
+ <td>15.43</td>
514
+ <td>02.44</td>
515
+ <td>19.14</td>
516
+ <td>01.99</td>
517
+ <td>12.60</td>
518
+ <td>00.01</td>
519
+ <td>03.01</td>
520
+ <td>00.50</td>
521
+ <td>45.29</td>
522
+ </tr>
523
+ <tr>
524
+ <td><a href="https://huggingface.co/inceptionai/jais-family-2p7b-chat" target="_blank">jais-family-2p7b-chat</a></td>
525
+ <td>00.25</td>
526
+ <td>07.46</td>
527
+ <td>00.62</td>
528
+ <td>16.36</td>
529
+ <td>04.25</td>
530
+ <td>18.22</td>
531
+ <td>03.10</td>
532
+ <td>08.19</td>
533
+ <td>00.01</td>
534
+ <td>03.27</td>
535
+ <td>00.90</td>
536
+ <td>51.56</td>
537
+ </tr>
538
+ <tr>
539
+ <td><a href="https://huggingface.co/google/gemma-2-2b-it" target="_blank">gemma-2-2b-it</a></td>
540
+ <td>00.10</td>
541
+ <td>04.96</td>
542
+ <td>00.12</td>
543
+ <td>06.66</td>
544
+ <td>01.55</td>
545
+ <td>18.59</td>
546
+ <td>02.78</td>
547
+ <td>23.69</td>
548
+ <td>00.01</td>
549
+ <td>02.08</td>
550
+ <td>06.80</td>
551
+ <td>53.36</td>
552
+ </tr>
553
+ <tr>
554
+ <td><a href="meta-llama/Llama-3.2-1B-Instruct" target="_blank">Llama-3.2-1B-Instruct</a></td>
555
+ <td>00.07</td>
556
+ <td>05.95</td>
557
+ <td>00.80</td>
558
+ <td>18.71</td>
559
+ <td>04.53</td>
560
+ <td>18.39</td>
561
+ <td>04.52</td>
562
+ <td>17.06</td>
563
+ <td>00.02</td>
564
+ <td>03.74</td>
565
+ <td>08.23</td>
566
+ <td>46.27</td>
567
+ </tr>
568
+ <tr>
569
+ <td><a href="meta-llama/Llama-3.2-3B-Instruct" target="_blank">Llama-3.2-3B-Instruct</a></td>
570
+ <td>00.62</td>
571
+ <td>13.67</td>
572
+ <td>01.18</td>
573
+ <td>22.12</td>
574
+ <td>08.59</td>
575
+ <td>35.21</td>
576
+ <td>13.75</td>
577
+ <td>43.63</td>
578
+ <td>00.21</td>
579
+ <td>09.68</td>
580
+ <td>08.23</td>
581
+ <td>49.20</td>
582
+ </tr>
583
+ <tr>
584
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-2B" target="_blank">Atlas-Chat-2B</a></strong></td>
585
+ <td><b>22.76</td>
586
+ <td><b>44.86</td>
587
+ <td><b>16.67</td>
588
+ <td><b>41.64</td>
589
+ <td><b>14.92</td>
590
+ <td><b>43.03</td>
591
+ <td><b>23.88</td>
592
+ <td><b>52.19</td>
593
+ <td><b>08.18</td>
594
+ <td><b>21.54</td>
595
+ <td><b>55.22</td>
596
+ <td><b>73.99</td>
597
+ </tr>
598
+ <tr style="border-top: 4px solid;"></tr>
599
+ <tr>
600
+ <td><a href="https://huggingface.co/inceptionai/jais-family-6p7b-chat" target="_blank">jais-family-6p7b-chat</a></td>
601
+ <td>00.73</td>
602
+ <td>11.85</td>
603
+ <td>01.88</td>
604
+ <td>23.22</td>
605
+ <td>04.25</td>
606
+ <td>18.22</td>
607
+ <td>04.62</td>
608
+ <td>20.22</td>
609
+ <td>00.02</td>
610
+ <td>03.79</td>
611
+ <td>03.02</td>
612
+ <td>56.78</td>
613
+ </tr>
614
+ <tr>
615
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-7b-chat" target="_blank">jais-adapted-7b-chat</a></td>
616
+ <td>00.60</td>
617
+ <td>09.43</td>
618
+ <td>03.45</td>
619
+ <td>25.88</td>
620
+ <td>07.25</td>
621
+ <td>23.21</td>
622
+ <td>01.25</td>
623
+ <td>02.22</td>
624
+ <td>00.04</td>
625
+ <td>03.24</td>
626
+ <td>02.82</td>
627
+ <td>52.72</td>
628
+ </tr>
629
+ <tr>
630
+ <td><a href="https://huggingface.co/inceptionai/jais-family-13b-chat" target="_blank">jais-family-13b-chat</a></td>
631
+ <td>00.92</td>
632
+ <td>11.71</td>
633
+ <td>04.01</td>
634
+ <td>28.48</td>
635
+ <td>05.70</td>
636
+ <td>27.24</td>
637
+ <td>04.50</td>
638
+ <td>22.56</td>
639
+ <td>00.03</td>
640
+ <td>03.57</td>
641
+ <td>01.77</td>
642
+ <td>41.73</td>
643
+ </tr>
644
+ <tr>
645
+ <td><a href="https://huggingface.co/inceptionai/jais-adapted-13b-chat" target="_blank">jais-adapted-13b-chat</a></td>
646
+ <td>00.87</td>
647
+ <td>10.52</td>
648
+ <td>04.02</td>
649
+ <td>25.29</td>
650
+ <td>06.66</td>
651
+ <td>23.46</td>
652
+ <td>20.14</td>
653
+ <td>47.87</td>
654
+ <td>0.04</td>
655
+ <td>04.77</td>
656
+ <td>01.92</td>
657
+ <td>66.68</td>
658
+ </tr>
659
+ <tr>
660
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat" target="_blank">AceGPT-7b-chat</a></td>
661
+ <td>00.44</td>
662
+ <td>11.33</td>
663
+ <td>01.05</td>
664
+ <td>19.24</td>
665
+ <td>06.92</td>
666
+ <td>36.03</td>
667
+ <td>11.05</td>
668
+ <td>44.55</td>
669
+ <td>00.06</td>
670
+ <td>04.74</td>
671
+ <td>02.28</td>
672
+ <td>40.23</td>
673
+ </tr>
674
+ <tr>
675
+ <td><a href="https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat" target="_blank">AceGPT-13b-chat</a></td>
676
+ <td>00.98</td>
677
+ <td>16.70</td>
678
+ <td>00.81</td>
679
+ <td>20.23</td>
680
+ <td>08.73</td>
681
+ <td>40.76</td>
682
+ <td>14.02</td>
683
+ <td>48.28</td>
684
+ <td>00.12</td>
685
+ <td>06.32</td>
686
+ <td>02.80</td>
687
+ <td>59.58</td>
688
+ </tr>
689
+ <tr>
690
+ <td><a href="https://huggingface.co/google/gemma-2-9b-it" target="_blank">gemma-2-9b-it</a></td>
691
+ <td>03.10</td>
692
+ <td>19.16</td>
693
+ <td>01.72</td>
694
+ <td>24.35</td>
695
+ <td>05.18</td>
696
+ <td>36.96</td>
697
+ <td>08.23</td>
698
+ <td>43.57</td>
699
+ <td>00.17</td>
700
+ <td>09.14</td>
701
+ <td>13.81</td>
702
+ <td>59.87</td>
703
+ </tr>
704
+ <tr>
705
+ <td><a href="meta-llama/Meta-Llama-3.1-8B-Instruct" target="_blank">Llama-3.1-8B-Instruct</a></td>
706
+ <td>00.92</td>
707
+ <td>14.19</td>
708
+ <td>01.46</td>
709
+ <td>23.82</td>
710
+ <td>08.89</td>
711
+ <td>33.08</td>
712
+ <td>11.85</td>
713
+ <td>35.51</td>
714
+ <td>00.11</td>
715
+ <td>06.02</td>
716
+ <td>16.14</td>
717
+ <td>44.08</td>
718
+ </tr>
719
+ <tr>
720
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-9B" target="_blank">Atlas-Chat-9B</a></strong></td>
721
+ <td><b>28.08</td>
722
+ <td><b>50.48</td>
723
+ <td><b>18.16</td>
724
+ <td><b>43.91</td>
725
+ <td><b>18.63</td>
726
+ <td><b>47.53</td>
727
+ <td><b>29.98</td>
728
+ <td><b>58.26</td>
729
+ <td><b>22.08</td>
730
+ <td><b>34.17</td>
731
+ <td><b>59.76</td>
732
+ <td><b>81.89</td>
733
+ </tr>
734
+ <tr style="border-top: 4px solid;"></tr>
735
+ <tr>
736
+ <td><a href="https://huggingface.co/inceptionai/jais-family-30b-8k-chat" target="_blank">jais-family-30b-8k-chat</a></td>
737
+ <td>01.10</td>
738
+ <td>14.40</td>
739
+ <td>01.67</td>
740
+ <td>23.37</td>
741
+ <td>08.52</td>
742
+ <td>35.41</td>
743
+ <td>13.71</td>
744
+ <td>41.33</td>
745
+ <td>00.05</td>
746
+ <td>04.48</td>
747
+ <td>00.46</td>
748
+ <td>56.73</td>
749
+ </tr>
750
+ <tr>
751
+ <td><a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">gemma-2-27b-it</a></td>
752
+ <td>00.67</td>
753
+ <td>13.04</td>
754
+ <td>01.74</td>
755
+ <td>24.63</td>
756
+ <td>05.17</td>
757
+ <td>37.08</td>
758
+ <td>07.36</td>
759
+ <td>42.49</td>
760
+ <td>00.03</td>
761
+ <td>04.94</td>
762
+ <td>11.10</td>
763
+ <td>57.59</td>
764
+ </tr>
765
+ <tr>
766
+ <td><strong><a href="https://huggingface.co/MBZUAI-Paris/Atlas-Chat-27B" target="_blank">Atlas-Chat-27B</a></strong></td>
767
+ <td><b>29.55</td>
768
+ <td><b>51.74</td>
769
+ <td><b>19.66</td>
770
+ <td><b>45.65</td>
771
+ <td><b>20.34</td>
772
+ <td><b>49.19</td>
773
+ <td><b>31.61</td>
774
+ <td><b>59.37</td>
775
+ <td><b>33.03</td>
776
+ <td><b>40.95</td>
777
+ <td><b>60.70</td>
778
+ <td>73.00</td>
779
+ </tr>
780
+
781
+
782
+
783
+ </table>
784
+
785
+ ## Usage and Limitations
786
+
787
+ These models have certain limitations that users should be aware of.
788
+ <details>
789
+ <summary>Intended Usage</summary>
790
+
791
+ Open Large Language Models (LLMs) have a wide range of applications across
792
+ various industries and domains. The following list of potential uses is not
793
+ comprehensive. The purpose of this list is to provide contextual information
794
+ about the possible use-cases that the model creators considered as part of model
795
+ training and development.
796
+
797
+ * Content Creation and Communication
798
+ * Text Generation: These models can be used to generate creative text formats
799
+ such as poems, scripts, code, marketing copy, and email drafts.
800
+ * Chatbots and Conversational AI: Power conversational interfaces for customer
801
+ service, virtual assistants, or interactive applications.
802
+ * Text Summarization: Generate concise summaries of a text corpus, research
803
+ papers, or reports.
804
+ * Research and Education
805
+ * Natural Language Processing (NLP) Research: These models can serve as a
806
+ foundation for researchers to experiment with NLP techniques, develop
807
+ algorithms, and contribute to the advancement of the field.
808
+ * Language Learning Tools: Support interactive language learning experiences,
809
+ aiding in grammar correction or providing writing practice.
810
+ * Knowledge Exploration: Assist researchers in exploring large bodies of text
811
+ by generating summaries or answering questions about specific topics.
812
+ </details>
813
+ <details>
814
+ <summary>Limitations</summary>
815
+
816
+ * Training Data
817
+ * The quality and diversity of the training data significantly influence the
818
+ model's capabilities. Biases or gaps in the training data can lead to
819
+ limitations in the model's responses.
820
+ * The scope of the training dataset determines the subject areas the model can
821
+ handle effectively.
822
+ * Context and Task Complexity
823
+ * LLMs are better at tasks that can be framed with clear prompts and
824
+ instructions. Open-ended or highly complex tasks might be challenging.
825
+ * A model's performance can be influenced by the amount of context provided
826
+ (longer context generally leads to better outputs, up to a certain point).
827
+ * Language Ambiguity and Nuance
828
+ * Natural language is inherently complex. LLMs might struggle to grasp subtle
829
+ nuances, sarcasm, or figurative language.
830
+ * Factual Accuracy
831
+ * LLMs generate responses based on information they learned from their
832
+ training datasets, but they are not knowledge bases. They may generate
833
+ incorrect or outdated factual statements.
834
+ * Common Sense
835
+ * LLMs rely on statistical patterns in language. They might lack the ability
836
+ to apply common sense reasoning in certain situations.
837
+ </details>
838
+ <details>
839
+ <summary> Ethical Considerations and Risks</summary>
840
+
841
+ The development of large language models (LLMs) raises several ethical concerns.
842
+ In creating an open model, we have carefully considered the following:
843
+
844
+ * Bias and Fairness
845
+ * LLMs trained on large-scale, real-world text data can reflect socio-cultural
846
+ biases embedded in the training material.
847
+ * Misinformation and Misuse
848
+ * LLMs can be misused to generate text that is false, misleading, or harmful.
849
+ * Guidelines are provided for responsible use with the model, see the
850
+ [Responsible Generative AI Toolkit][rai-toolkit].
851
+ * Transparency and Accountability:
852
+ * This model card summarizes details on the models' architecture,
853
+ capabilities, limitations, and evaluation processes.
854
+ * A responsibly developed open model offers the opportunity to share
855
+ innovation by making LLM technology accessible to developers and researchers
856
+ across the AI ecosystem.
857
+
858
+ Risks identified and mitigations:
859
+
860
+ * Perpetuation of biases: It's encouraged to perform continuous monitoring
861
+ (using evaluation metrics, human review) and the exploration of de-biasing
862
+ techniques during model training, fine-tuning, and other use cases.
863
+ * Generation of harmful content: Mechanisms and guidelines for content safety
864
+ are essential. Developers are encouraged to exercise caution and implement
865
+ appropriate content safety safeguards based on their specific product policies
866
+ and application use cases.
867
+ * Privacy violations: Models were trained on data filtered for removal of PII
868
+ (Personally Identifiable Information). Developers are encouraged to adhere to
869
+ privacy regulations with privacy-preserving techniques.
870
+
871
+ </details>
872
+
873
+
874
+ ## Acknowledgement
875
+ We would like to express our gratitude to the following institutions for their contributions to this work: École Polytechnique, LINAGORA and KTH Royal Institute of Technology. Additionally, we extend our thanks to the AtlasIA community.
876
+