lbourdois commited on
Commit
b0685c3
·
verified ·
1 Parent(s): fdd3fc9

Improve language tag

Browse files

Hi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.

Files changed (1) hide show
  1. README.md +144 -133
README.md CHANGED
@@ -1,134 +1,145 @@
1
- ---
2
- license: apache-2.0
3
- language:
4
- - ar
5
- - en
6
- base_model:
7
- - Qwen/Qwen2.5-7B-Instruct
8
- pipeline_tag: text2text-generation
9
- library_name: transformers
10
- tags:
11
- - qwen
12
- - text-generation-inference
13
- ---
14
-
15
- <div align="center">
16
- <img src="https://i.ibb.co/CmPSSpq/Screenshot-2024-10-06-at-9-45-06-PM.png" alt="Arcee Meraj Mini" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 100%; height: auto;">
17
- </div>
18
-
19
- Following the release of [Arcee Meraj](https://meraj.arcee.ai/), our enterprise's globally top-performing Arabic LLM, we are thrilled to unveil Arcee Meraj Mini. This open-source model, meticulously fine-tuned from [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct), is expertly designed for both Arabic and English. This model has undergone rigorous evaluation across multiple benchmarks in both languages, demonstrating top-tier performance in Arabic and competitive results in English. Arcee Meraj Mini’s primary objective is to enhance Arabic capabilities while maintaining robust English language proficiency. Benchmark results confirm that Arcee Meraj Mini excels in Arabic, with English performance comparable to leading models — perfectly aligning with our vision for balanced bilingual strength.
20
-
21
- ## Technical Details
22
- Below is an overview of the key stages in Meraj Mini’s development:
23
-
24
- 1. **Data Preparation:** We filter candidate samples from diverse English and Arabic sources to ensure high-quality data. Some of the selected English datasets are translated into Arabic to increase the quantity of Arabic samples and improve the model’s quality in bilingual performance. Then, new [Direct Preference Optimization (DPO)](https://arxiv.org/pdf/2305.18290) datasets are continuously prepared, filtered, and translated to maintain a fresh and diverse dataset that supports better generalization across domains.
25
- 2. **Initial Training:** We train the Qwen2.5 model with 7 billion parameters using these high-quality datasets in both languages. This allows the model to handle diverse linguistic patterns from over 500 million tokens, ensuring strong performance in Arabic and English tasks.
26
- 3. **Iterative Training and Post-Training:** Iterative training and post-training iterations refine the model, enhancing its accuracy and adaptability to ensure it can perform well across varied tasks and language contexts.
27
- 4. **Evaluation:** Arcee Meraj Mini is based on training and evaluating 15 different variants to explore optimal configurations, with assessments done on both Arabic and English benchmarks and leaderboards. This step ensures the model is robust in handling both general and domain-specific tasks.
28
- 5. **Final Model Creation:** We select the best-performing variant and use the [MergeKit](https://arxiv.org/pdf/2403.13257) library to merge the configurations, resulting in the final Arcee Meraj Mini model. This model is not only optimized for language understanding but also serves as a starting point for domain adaptation in different areas.
29
-
30
- With this process, Arcee Meraj Mini is crafted to be more than just a general-purpose language model—it’s an adaptable tool, ready to be fine-tuned for specific industries and applications, empowering users to extend its capabilities for domain-specific tasks.
31
- ## Capabilities and Use Cases
32
-
33
- Arcee Meraj Mini is capable of solving a wide range of language tasks, including the tasks as below:
34
-
35
- 1. **Arabic Language Understanding**: Arcee Meraj Mini excels in general language comprehension, reading comprehension, and common-sense reasoning, all tailored to the Arabic language, providing strong performance in a variety of linguistic tasks.
36
-
37
- 2. **Cultural Adaptation**: The model ensures content creation that goes beyond linguistic accuracy, incorporating cultural nuances to align with Arabic norms and values, making it suitable for culturally relevant applications.
38
-
39
- 3. **Education**: It enables personalized, adaptive learning experiences for Arabic speakers by generating high-quality educational content across diverse subjects, enhancing the overall learning journey.
40
-
41
- 4. **Mathematics and Coding**: With robust support for mathematical reasoning and problem-solving, as well as code generation in Arabic, Arcee Meraj Mini serves as a valuable tool for developers and professionals in technical fields.
42
-
43
- 5. **Customer Service**: The model facilitates the development of advanced Arabic-speaking chatbots and virtual assistants, capable of managing customer queries with a high degree of natural language understanding and precision.
44
-
45
- 6. **Content Creation**: Arcee Meraj Mini generates high-quality Arabic content for various needs, from marketing materials and technical documentation to creative writing, ensuring impactful communication and engagement in the Arabic-speaking world.
46
-
47
- ## Quantized GGUF
48
-
49
- Here are GGUF models:
50
- - [Meraj-Mini-GGUF](https://huggingface.co/MaziyarPanahi/Meraj-Mini-GGUF)
51
-
52
-
53
- ## How to
54
- This model uses ChatML prompt template:
55
-
56
- ```
57
- <|im_start|>system
58
- {System}
59
- <|im_end|>
60
- <|im_start|>user
61
- {User}
62
- <|im_end|>
63
- <|im_start|>assistant
64
- {Assistant}
65
- ```
66
-
67
- ```python
68
- # Use a pipeline as a high-level helper
69
-
70
- from transformers import pipeline
71
-
72
- messages = [
73
- {"role": "user", "content": "مرحبا، كيف حالك؟"},
74
- ]
75
- pipe = pipeline("text-generation", model="arcee-ai/Meraj-Mini")
76
- pipe(messages)
77
-
78
-
79
- # Load model directly
80
-
81
- from transformers import AutoTokenizer, AutoModelForCausalLM
82
-
83
- tokenizer = AutoTokenizer.from_pretrained("arcee-ai/Meraj-Mini")
84
- model = AutoModelForCausalLM.from_pretrained("arcee-ai/Meraj-Mini")
85
- ```
86
-
87
- ## Evaluations
88
- #### Open Arabic LLM Leaderboard (OALL) Benchmarks
89
- Arcee Meraj Mini model consistently outperforms state-of-the-art models on most of the Open Arabic LLM Leaderboard (OALL) benchmarks, highlighting its improvements and effectiveness in Arabic language content, and securing the top performing position on average among the other models.
90
- <div align="center">
91
- <img src="https://i.ibb.co/LQ0z7fH/Screenshot-2024-10-15-at-2-53-45-PM.png" alt="Arcee Meraj Mini Open Arabic LLM Leaderboard (OALL) - table 1" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
92
- </div>
93
- <div align="center">
94
- <img src="https://i.ibb.co/fM6VQR7/Screenshot-2024-10-15-at-2-53-55-PM.png" alt="Arcee Meraj Mini Open Arabic LLM Leaderboard (OALL) - table 2" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
95
- </div>
96
-
97
- #### Translated MMLU
98
- We focused on the multilingual MMLU dataset, as distributed through the LM Evaluation Harness repository, to compare the multilingual strength of different models for this benchmark. Arcee Meraj Mini outperforms the other models, showcasing these models’ superior performance compared to the other state-of-the-art models.
99
- <div align="center">
100
- <img src="https://i.ibb.co/dfwW1W5/W-B-Chart-10-15-2024-2-07-12-PM.png" alt="Arcee Meraj Mini Trnalsated MMLU" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
101
- </div>
102
-
103
- #### English Benchmarks:
104
- Arcee Meraj Mini performs comparably to state-of-the-art models, demonstrating how the model retains its English language knowledge and capabilities while learning Arabic.
105
-
106
- <div align="center">
107
- <img src="https://i.ibb.co/mTcLFzt/W-B-Chart-10-15-2024-2-15-57-PM.png" alt="Arcee Meraj Mini Winogrande" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
108
- </div>
109
-
110
- <div align="center">
111
- <img src="https://i.ibb.co/GRBjjGN/W-B-Chart-10-15-2024-2-17-34-PM.png" alt="Arcee Meraj Mini Arc Challenge" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
112
- </div>
113
-
114
- <div align="center">
115
- <img src="https://i.ibb.co/98s0qTf/W-B-Chart-10-15-2024-2-17-46-PM.png" alt="Arcee Meraj Mini TruthfulQA" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
116
- </div>
117
-
118
- <div align="center">
119
- <img src="https://i.ibb.co/yqvRK3L/W-B-Chart-10-15-2024-2-17-57-PM.png" alt="Arcee Meraj Mini GSM8K" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
120
- </div>
121
-
122
- ## Model Usage
123
-
124
- For a detailed explanation of the model's capabilities, architecture, and applications, please refer to our blog post: https://blog.arcee.ai/arcee-meraj-mini-2/
125
-
126
- To test the model directly, you can try it out using this Google Colab notebook: https://colab.research.google.com/drive/1hXXyNM-X0eKwlZ5OwqhZfO0U8CBq8pFO?usp=sharing
127
-
128
- ## Acknowledgements
129
-
130
- We are grateful to the open-source AI community for their continuous contributions and to the Qwen team for their foundational efforts on the Qwen2.5 model series.
131
-
132
- ## Future Directions
133
-
 
 
 
 
 
 
 
 
 
 
 
134
  As we release the Arcee Meraj Mini to the public, we invite researchers, developers, and businesses to engage with the Arcee Meraj Mini model, particularly in enhancing support for the Arabic language and fostering domain adaptation. We are committed to advancing open-source AI technology and invite the community to explore, contribute, and build upon Arcee Meraj Mini.
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - zho
5
+ - eng
6
+ - fra
7
+ - spa
8
+ - por
9
+ - deu
10
+ - ita
11
+ - rus
12
+ - jpn
13
+ - kor
14
+ - vie
15
+ - tha
16
+ - ara
17
+ base_model:
18
+ - Qwen/Qwen2.5-7B-Instruct
19
+ pipeline_tag: text2text-generation
20
+ library_name: transformers
21
+ tags:
22
+ - qwen
23
+ - text-generation-inference
24
+ ---
25
+
26
+ <div align="center">
27
+ <img src="https://i.ibb.co/CmPSSpq/Screenshot-2024-10-06-at-9-45-06-PM.png" alt="Arcee Meraj Mini" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 100%; height: auto;">
28
+ </div>
29
+
30
+ Following the release of [Arcee Meraj](https://meraj.arcee.ai/), our enterprise's globally top-performing Arabic LLM, we are thrilled to unveil Arcee Meraj Mini. This open-source model, meticulously fine-tuned from [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct), is expertly designed for both Arabic and English. This model has undergone rigorous evaluation across multiple benchmarks in both languages, demonstrating top-tier performance in Arabic and competitive results in English. Arcee Meraj Mini’s primary objective is to enhance Arabic capabilities while maintaining robust English language proficiency. Benchmark results confirm that Arcee Meraj Mini excels in Arabic, with English performance comparable to leading models — perfectly aligning with our vision for balanced bilingual strength.
31
+
32
+ ## Technical Details
33
+ Below is an overview of the key stages in Meraj Mini’s development:
34
+
35
+ 1. **Data Preparation:** We filter candidate samples from diverse English and Arabic sources to ensure high-quality data. Some of the selected English datasets are translated into Arabic to increase the quantity of Arabic samples and improve the model’s quality in bilingual performance. Then, new [Direct Preference Optimization (DPO)](https://arxiv.org/pdf/2305.18290) datasets are continuously prepared, filtered, and translated to maintain a fresh and diverse dataset that supports better generalization across domains.
36
+ 2. **Initial Training:** We train the Qwen2.5 model with 7 billion parameters using these high-quality datasets in both languages. This allows the model to handle diverse linguistic patterns from over 500 million tokens, ensuring strong performance in Arabic and English tasks.
37
+ 3. **Iterative Training and Post-Training:** Iterative training and post-training iterations refine the model, enhancing its accuracy and adaptability to ensure it can perform well across varied tasks and language contexts.
38
+ 4. **Evaluation:** Arcee Meraj Mini is based on training and evaluating 15 different variants to explore optimal configurations, with assessments done on both Arabic and English benchmarks and leaderboards. This step ensures the model is robust in handling both general and domain-specific tasks.
39
+ 5. **Final Model Creation:** We select the best-performing variant and use the [MergeKit](https://arxiv.org/pdf/2403.13257) library to merge the configurations, resulting in the final Arcee Meraj Mini model. This model is not only optimized for language understanding but also serves as a starting point for domain adaptation in different areas.
40
+
41
+ With this process, Arcee Meraj Mini is crafted to be more than just a general-purpose language model—it’s an adaptable tool, ready to be fine-tuned for specific industries and applications, empowering users to extend its capabilities for domain-specific tasks.
42
+ ## Capabilities and Use Cases
43
+
44
+ Arcee Meraj Mini is capable of solving a wide range of language tasks, including the tasks as below:
45
+
46
+ 1. **Arabic Language Understanding**: Arcee Meraj Mini excels in general language comprehension, reading comprehension, and common-sense reasoning, all tailored to the Arabic language, providing strong performance in a variety of linguistic tasks.
47
+
48
+ 2. **Cultural Adaptation**: The model ensures content creation that goes beyond linguistic accuracy, incorporating cultural nuances to align with Arabic norms and values, making it suitable for culturally relevant applications.
49
+
50
+ 3. **Education**: It enables personalized, adaptive learning experiences for Arabic speakers by generating high-quality educational content across diverse subjects, enhancing the overall learning journey.
51
+
52
+ 4. **Mathematics and Coding**: With robust support for mathematical reasoning and problem-solving, as well as code generation in Arabic, Arcee Meraj Mini serves as a valuable tool for developers and professionals in technical fields.
53
+
54
+ 5. **Customer Service**: The model facilitates the development of advanced Arabic-speaking chatbots and virtual assistants, capable of managing customer queries with a high degree of natural language understanding and precision.
55
+
56
+ 6. **Content Creation**: Arcee Meraj Mini generates high-quality Arabic content for various needs, from marketing materials and technical documentation to creative writing, ensuring impactful communication and engagement in the Arabic-speaking world.
57
+
58
+ ## Quantized GGUF
59
+
60
+ Here are GGUF models:
61
+ - [Meraj-Mini-GGUF](https://huggingface.co/MaziyarPanahi/Meraj-Mini-GGUF)
62
+
63
+
64
+ ## How to
65
+ This model uses ChatML prompt template:
66
+
67
+ ```
68
+ <|im_start|>system
69
+ {System}
70
+ <|im_end|>
71
+ <|im_start|>user
72
+ {User}
73
+ <|im_end|>
74
+ <|im_start|>assistant
75
+ {Assistant}
76
+ ```
77
+
78
+ ```python
79
+ # Use a pipeline as a high-level helper
80
+
81
+ from transformers import pipeline
82
+
83
+ messages = [
84
+ {"role": "user", "content": "مرحبا، كيف حالك؟"},
85
+ ]
86
+ pipe = pipeline("text-generation", model="arcee-ai/Meraj-Mini")
87
+ pipe(messages)
88
+
89
+
90
+ # Load model directly
91
+
92
+ from transformers import AutoTokenizer, AutoModelForCausalLM
93
+
94
+ tokenizer = AutoTokenizer.from_pretrained("arcee-ai/Meraj-Mini")
95
+ model = AutoModelForCausalLM.from_pretrained("arcee-ai/Meraj-Mini")
96
+ ```
97
+
98
+ ## Evaluations
99
+ #### Open Arabic LLM Leaderboard (OALL) Benchmarks
100
+ Arcee Meraj Mini model consistently outperforms state-of-the-art models on most of the Open Arabic LLM Leaderboard (OALL) benchmarks, highlighting its improvements and effectiveness in Arabic language content, and securing the top performing position on average among the other models.
101
+ <div align="center">
102
+ <img src="https://i.ibb.co/LQ0z7fH/Screenshot-2024-10-15-at-2-53-45-PM.png" alt="Arcee Meraj Mini Open Arabic LLM Leaderboard (OALL) - table 1" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
103
+ </div>
104
+ <div align="center">
105
+ <img src="https://i.ibb.co/fM6VQR7/Screenshot-2024-10-15-at-2-53-55-PM.png" alt="Arcee Meraj Mini Open Arabic LLM Leaderboard (OALL) - table 2" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
106
+ </div>
107
+
108
+ #### Translated MMLU
109
+ We focused on the multilingual MMLU dataset, as distributed through the LM Evaluation Harness repository, to compare the multilingual strength of different models for this benchmark. Arcee Meraj Mini outperforms the other models, showcasing these models’ superior performance compared to the other state-of-the-art models.
110
+ <div align="center">
111
+ <img src="https://i.ibb.co/dfwW1W5/W-B-Chart-10-15-2024-2-07-12-PM.png" alt="Arcee Meraj Mini Trnalsated MMLU" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
112
+ </div>
113
+
114
+ #### English Benchmarks:
115
+ Arcee Meraj Mini performs comparably to state-of-the-art models, demonstrating how the model retains its English language knowledge and capabilities while learning Arabic.
116
+
117
+ <div align="center">
118
+ <img src="https://i.ibb.co/mTcLFzt/W-B-Chart-10-15-2024-2-15-57-PM.png" alt="Arcee Meraj Mini Winogrande" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
119
+ </div>
120
+
121
+ <div align="center">
122
+ <img src="https://i.ibb.co/GRBjjGN/W-B-Chart-10-15-2024-2-17-34-PM.png" alt="Arcee Meraj Mini Arc Challenge" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
123
+ </div>
124
+
125
+ <div align="center">
126
+ <img src="https://i.ibb.co/98s0qTf/W-B-Chart-10-15-2024-2-17-46-PM.png" alt="Arcee Meraj Mini TruthfulQA" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
127
+ </div>
128
+
129
+ <div align="center">
130
+ <img src="https://i.ibb.co/yqvRK3L/W-B-Chart-10-15-2024-2-17-57-PM.png" alt="Arcee Meraj Mini GSM8K" style="border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); max-width: 80%; height: auto;">
131
+ </div>
132
+
133
+ ## Model Usage
134
+
135
+ For a detailed explanation of the model's capabilities, architecture, and applications, please refer to our blog post: https://blog.arcee.ai/arcee-meraj-mini-2/
136
+
137
+ To test the model directly, you can try it out using this Google Colab notebook: https://colab.research.google.com/drive/1hXXyNM-X0eKwlZ5OwqhZfO0U8CBq8pFO?usp=sharing
138
+
139
+ ## Acknowledgements
140
+
141
+ We are grateful to the open-source AI community for their continuous contributions and to the Qwen team for their foundational efforts on the Qwen2.5 model series.
142
+
143
+ ## Future Directions
144
+
145
  As we release the Arcee Meraj Mini to the public, we invite researchers, developers, and businesses to engage with the Arcee Meraj Mini model, particularly in enhancing support for the Arabic language and fostering domain adaptation. We are committed to advancing open-source AI technology and invite the community to explore, contribute, and build upon Arcee Meraj Mini.