GGUF
Inference Endpoints
conversational
fritzwijaya commited on
Commit
b479575
1 Parent(s): 278b978

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +337 -0
README.md ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - GoToCompany/llama3-8b-cpt-sahabatai-v1-instruct
4
+ language:
5
+ - en
6
+ - id
7
+ - jv
8
+ - su
9
+ license: llama3
10
+ ---
11
+
12
+ # Llama3 8B CPT Sahabat-AI v1 Instruct
13
+
14
+ **Sahabat-AI** (Indonesian language for “close friends”) is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for Indonesian language and its various dialects. Sahabat-AI ecosystem is co-initiated by Indonesian tech and telecommunication companies: GoTo Group and Indosat Ooredoo Hutchison.
15
+
16
+ Llama3 8B CPT Sahabat-AI v1 Instruct is an Indonesian-focused model which has been fine-tuned with around **448,000 Indonesian instruction-completion pairs** alongside an Indonesian-dialect pool consisting of **96,000 instruction-completion pairs in Javanese** and **98,000 instruction-completion pairs in Sundanese**. Additionally, we added a pool of **129,000 instruction-completion pairs in English**.
17
+
18
+ - **Co-initiated by:** PT GoTo Gojek Tokopedia Tbk, Indosat Ooredoo Hutchison
19
+ - **Developed by:** PT GoTo Gojek Tokopedia Tbk, AI Singapore
20
+ - **Model type:** Decoder
21
+ - **Languages:** English, Indonesian, Javanese, Sundanese
22
+ - **License:** [Llama3 Community License](https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE)
23
+
24
+ ## Model Details
25
+
26
+ ### Model Description
27
+ We performed instruction tuning in Indonesian, Javanese, Sundanese as well as English on our [continued pre-trained Llama3 8B CPT Sahabat-AI v1 base](https://huggingface.co/GoToCompany/llama3-8b-cpt-sahabatai-v1-base), a decoder model using the Llama3 architecture, to create Llama3 8B CPT Sahabat-AI v1 Instruct.
28
+
29
+ For tokenisation, the model employs the default tokenizer used in Llama-3-8B. The model has a context length of 8192.
30
+
31
+ ### Benchmark Performance
32
+ We evaluated Llama3 8B CPT Sahabat-AI V1 Instruct on both general language capabilities and instruction-following capabilities.
33
+
34
+ #### General Language Capabilities
35
+ For the evaluation of general language capabilities, we employed the
36
+ - [SEA HELM (also known as BHASA) evaluation benchmark](https://arxiv.org/abs/2309.06085v2) across a variety of tasks.
37
+ - These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarization (Summ), Causal Reasoning (Causal) and Natural Language Inference (NLI).
38
+ - We also added support for Javanese and Sundanese for the BHASA tasks whenever applicable
39
+ - [IndoMMLU](https://arxiv.org/pdf/2310.04928)
40
+ - These tasks include examination questions on Humanities, Indonesian language, Local languages and cultures, Social science and STEM across primary, middle, and high school levels.
41
+ - and the common English tasks from the [HuggingFace LLM Leaderboard](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard).
42
+ - These tasks consist of [IFEval, BBH, Math Lvl 5, GPQA, MuSR, and MMLU-PRO.](https://huggingface.co/docs/leaderboards/open_llm_leaderboard/about)
43
+ - **Caveat**: Our results differ from the HuggingFace LLM Leaderboard because we have used [VLLM](https://docs.vllm.ai/en/latest/) as our inference platform. VLLM caps the context size at **4096 tokens** while HuggingFace was set to **8192 tokens**.
44
+
45
+ Note: SEA HELM is implemented using prompts to elicit answers in a strict format. For all tasks, the model is expected to provide an answer tag from which the answer is automatically extracted. For tasks where options are provided, the answer should comprise one of the pre-defined options. The scores for each task is normalised to account for baseline performance due to random chance.
46
+
47
+ The evaluation was done **zero-shot** with native prompts on a sample of 100-1000 instances for each dataset.
48
+
49
+
50
+ #### Instruction-following Capabilities
51
+ Since Llama3 8B CPT Sahabat-AI v1 Instruct is an instruction-following model, we also evaluated it on instruction-following capabilities with the [IFEval](https://arxiv.org/abs/2311.07911) dataset.
52
+
53
+ As this dataset was in English, the linguists and native speakers in the team worked together to filter, localize and translate the dataset into the respective target languages to ensure that the examples remained reasonable, meaningful and natural.
54
+
55
+ **IFEval**
56
+
57
+ IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. Additionally, accuracy is normalized by the proportion of responses in the correct language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task).
58
+
59
+ *Note*: IFEval was only used on Bahasa Indonesia. We are currently working on adding it for Javanese and Sundanese for our upcoming releases.
60
+
61
+ #### Results
62
+
63
+ #### Indonesian Results
64
+
65
+ #### SEA HELM (also known as BHASA)
66
+ <table style="border-collapse: collapse; width: 100%; font-size: 10px">
67
+ <tr>
68
+ <th style="border: 2px solid black; padding: 8px; font-weight: bold;">Language / Model Name [Instruct]</th>
69
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2-7B</th>
70
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2.5-7B</th>
71
+ <th style="border: 1px solid gray; padding: 8px;">Llama-3-8B</th>
72
+ <th style="border: 1px solid gray; padding: 8px;">Llama-3.1-8B</th>
73
+ <th style="border: 1px solid gray; padding: 8px;">sea-lionv2.1-8B</th>
74
+ <th style="border: 1px solid gray; padding: 8px;">gemma-2-9B</th>
75
+ <th style="border: 2px solid black; padding: 8px;">sahabatai-v1-8B</th>
76
+ <th style="border: 1px solid gray; padding: 8px;">sahabatai-v1-9B</th>
77
+ </tr>
78
+ <tr>
79
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Overall (Bahasa Indonesia + Javanese + Sundanese)</td>
80
+ <td style="border: 1px solid gray; padding: 8px;">36.963</td>
81
+ <td style="border: 1px solid gray; padding: 8px;">42.988</td>
82
+ <td style="border: 1px solid gray; padding: 8px;">37.805</td>
83
+ <td style="border: 1px solid gray; padding: 8px;">45.866</td>
84
+ <td style="border: 1px solid gray; padding: 8px;">46.880</td>
85
+ <td style="border: 1px solid gray; padding: 8px;">56.359</td>
86
+ <td style="border: 2px solid black; padding: 8px;">53.725</td>
87
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">61.169</td>
88
+ </tr>
89
+ <tr>
90
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Bahasa Indonesia</td>
91
+ <td style="border: 1px solid gray; padding: 8px;">46.760</td>
92
+ <td style="border: 1px solid gray; padding: 8px;">60.372</td>
93
+ <td style="border: 1px solid gray; padding: 8px;">42.022</td>
94
+ <td style="border: 1px solid gray; padding: 8px;">51.944</td>
95
+ <td style="border: 1px solid gray; padding: 8px;">54.579</td>
96
+ <td style="border: 1px solid gray; padding: 8px;">63.394</td>
97
+ <td style="border: 2px solid black; padding: 8px;">57.221</td>
98
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">64.154</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Javanese</td>
102
+ <td style="border: 1px solid gray; padding: 8px;">33.956</td>
103
+ <td style="border: 1px solid gray; padding: 8px;">40.625</td>
104
+ <td style="border: 1px solid gray; padding: 8px;">41.739</td>
105
+ <td style="border: 1px solid gray; padding: 8px;">47.587</td>
106
+ <td style="border: 1px solid gray; padding: 8px;">48.012</td>
107
+ <td style="border: 1px solid gray; padding: 8px;">56.468</td>
108
+ <td style="border: 2px solid black; padding: 8px;">56.460</td>
109
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">64.439</td>
110
+ </tr>
111
+ <tr>
112
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Sundanese</td>
113
+ <td style="border: 1px solid gray; padding: 8px;">30.173</td>
114
+ <td style="border: 1px solid gray; padding: 8px;">27.969</td>
115
+ <td style="border: 1px solid gray; padding: 8px;">29.654</td>
116
+ <td style="border: 1px solid gray; padding: 8px;">38.068</td>
117
+ <td style="border: 1px solid gray; padding: 8px;">38.050</td>
118
+ <td style="border: 1px solid gray; padding: 8px;">49.216</td>
119
+ <td style="border: 2px solid black; padding: 8px;">47.495</td>
120
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">54.913</td>
121
+ </tr>
122
+ </table>
123
+
124
+ #### IndoMMLU
125
+ <table style="border-collapse: collapse; width: 100%; font-size: 10px">
126
+ <tr>
127
+ <th style="border: 2px solid black; padding: 8px; font-weight: bold;">Model Name [Instruct]</th>
128
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2-7B</th>
129
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2.5-7B</th>
130
+ <th style="border: 1px solid gray; padding: 8px;">Meta-Llama-3-8B</th>
131
+ <th style="border: 1px solid gray; padding: 8px;">Llama-3.1-8B</th>
132
+ <th style="border: 1px solid gray; padding: 8px;">sea-lionv2.1-8B</th>
133
+ <th style="border: 1px solid gray; padding: 8px;">gemma-2-9B</th>
134
+ <th style="border: 2px solid black; padding: 8px;">sahabatai-v1-8B</th>
135
+ <th style="border: 1px solid gray; padding: 8px;">sahabatai-v1-9B</th>
136
+ </tr>
137
+ <tr>
138
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Overall Results</td>
139
+ <td style="border: 1px solid gray; padding: 8px;">53.0%</td>
140
+ <td style="border: 1px solid gray; padding: 8px;">56.0%</td>
141
+ <td style="border: 1px solid gray; padding: 8px;">51.9%</td>
142
+ <td style="border: 1px solid gray; padding: 8px;">53.8%</td>
143
+ <td style="border: 1px solid gray; padding: 8px;">54.4%</td>
144
+ <td style="border: 1px solid gray; padding: 8px;">61.4%</td>
145
+ <td style="border: 2px solid black; padding: 8px;">55.6%</td>
146
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">62.6%</td>
147
+ </tr>
148
+ </table>
149
+
150
+ #### English Results
151
+ <table style="border-collapse: collapse; width: 100%; font-size: 10px">
152
+ <tr>
153
+ <th style="border: 2px solid black; padding: 8px;">Model Name [Instruct]</th>
154
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2-7B</th>
155
+ <th style="border: 1px solid gray; padding: 8px;">Qwen2.5-7B</th>
156
+ <th style="border: 1px solid gray; padding: 8px;">Llama-3-8B</th>
157
+ <th style="border: 1px solid gray; padding: 8px;">Llama-3.1-8B</th>
158
+ <th style="border: 1px solid gray; padding: 8px;">sea-lionv2.1-8B</th>
159
+ <th style="border: 1px solid gray; padding: 8px;">gemma-2-9B</th>
160
+ <th style="border: 2px solid black; padding: 8px;">sahabatai-v1-8B</th>
161
+ <th style="border: 1px solid gray; padding: 8px;">sahabatai-v1-9B</th>
162
+ </tr>
163
+ <tr>
164
+ <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Average</td>
165
+ <td style="border: 1px solid gray; padding: 8px;">24.48</td>
166
+ <td style="border: 1px solid gray; padding: 8px;">27.75</td>
167
+ <td style="border: 1px solid gray; padding: 8px;">23.91</td>
168
+ <td style="border: 1px solid gray; padding: 8px;">27.98</td>
169
+ <td style="border: 1px solid gray; padding: 8px;">24.52</td>
170
+ <td style="border: 1px solid gray; padding: 8px;">26.44</td>
171
+ <td style="border: 2px solid black; padding: 8px;">24.43</td>
172
+ <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">33.67</td>
173
+ </tr>
174
+ </table>
175
+
176
+
177
+ Llama3 8B CPT Sahabat-AI v1 Instruct can be run using the 🤗 Transformers library
178
+ ```python
179
+ # Please use transformers==4.45.0
180
+
181
+ import torch
182
+ import transformers
183
+
184
+ model_id = "GoToCompany/llama3-8b-cpt-sahabatai-v1-instruct"
185
+
186
+ pipeline = transformers.pipeline(
187
+ "text-generation",
188
+ model=model_id,
189
+ model_kwargs={"torch_dtype": torch.bfloat16},
190
+ device_map="auto",
191
+ )
192
+
193
+ terminators = [
194
+ pipeline.tokenizer.eos_token_id,
195
+ pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
196
+ ]
197
+
198
+ # Javanese
199
+ messages = [
200
+ {"role": "system", "content": "You are a helpful assistant"},
201
+ {"role": "user", "content": "Sopo wae sing ana ing Punakawan?"}
202
+ ]
203
+
204
+ outputs = pipeline(
205
+ messages,
206
+ max_new_tokens=256,
207
+ eos_token_id=terminators,
208
+ )
209
+ print(outputs[0]["generated_text"][-1])
210
+
211
+
212
+ # Sundanese
213
+ messages = [
214
+ {"role": "system", "content": "You are a helpful assistant"},
215
+ {"role": "user", "content": "Kumaha caritana si Kabayan?"},
216
+ ]
217
+
218
+ outputs = pipeline(
219
+ messages,
220
+ max_new_tokens=256,
221
+ eos_token_id=terminators,
222
+ )
223
+ print(outputs[0]["generated_text"][-1])
224
+ ```
225
+
226
+ ### Caveats
227
+ It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies in its reasoning.
228
+
229
+ ## Limitations
230
+ ### Safety
231
+
232
+ Current Sahabat-AI models, including this commercially permissive release, have not been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights and codes.
233
+
234
+ ## Technical Specifications
235
+ ### Fine-Tuning Details
236
+ Llama3 8B CPT Sahabat-AI v1 Instruct was built using a combination of a full parameter fine-tune, on-policy alignment, and model merges of the best performing checkpoints. The training process for fine-tuning was approximately 4 hours, with alignment taking 2 hours, both on 8x H100-80GB GPUs.
237
+
238
+ ## Data
239
+ Llama3 8B CPT Sahabat-AI v1 Instruct was trained on a wide range of synthetic instructions, alongside publicly available instructions hand-curated by the team with the assistance of native speakers. In addition, special care was taken to ensure that the datasets used had commercially permissive licenses through verification with the original data source.
240
+
241
+ ## Call for Collaboration
242
+ Sahabat-AI (Indonesian language for “close friends”) a **local open source Large Language Model (LLM) ecosystem in Indonesian language**, co-initiated by Indonesian tech and telecommunication companies: GoTo Group and Indosat Ooredoo Hutchison.
243
+ Sahabat-AI ecosystem aims to empower Indonesians who want to develop AI-based services and applications using Bahasa Indonesia and its various local dialects.
244
+
245
+ We are supported by research centers and global tech experts such as AI Singapore and Tech Mahendra to train the model to gain general language understanding.
246
+
247
+ We also collaborate with key top Indonesia universities such as University of Indonesia, Gadjah Mada University, Bogor Institute of Agriculture, Bandung Institute of Technology, including top Indonesia media groups, such as Kompas Gramedia Group and Republika to train and enrich the model in Bahasa Indonesia, ensuring optimum provision of local context and cultural relevance.
248
+
249
+ We would like to invite **researchers, developers, and language enthusiasts** to actively contribute to the enhancement and expansion of Sahabat-AI.
250
+ Your collaborations can involve:
251
+ - Identifying and reporting technical issues
252
+ - Sharing pre-training, instruction, and preference data
253
+ - Improving documentation usability
254
+ - Proposing and implementing new model evaluation tasks and metrics
255
+
256
+ Join us in shaping the future of Sahabat-AI by sharing your expertise and insights to make these models more accessible, accurate, and versatile.
257
+
258
+ You can contribute your ideas through [this form.](https://docs.google.com/forms/d/1_us969eQtEooYOn4XkvGkdP5VHOyCbO6L_sd9kTMnaA/edit)
259
+
260
+ ## The Development Team (in ascending alphabetical order)
261
+
262
+ ### AI Singapore
263
+ Chan Adwin<br>
264
+ Cheng Nicholas<br>
265
+ Choa Esther<br>
266
+ Huang Yuli<br>
267
+ Lau Wayne<br>
268
+ Lee Chwan Ren<br>
269
+ Leong Wai Yi<br>
270
+ Leong Wei Qi<br>
271
+ Limkonchotiwat Peerat<br>
272
+ Liu Bing Jie Darius<br>
273
+ Montalan Jann Railey<br>
274
+ Ng Boon Cheong Raymond<br>
275
+ Ngui Jian Gang<br>
276
+ Nguyen Thanh Ngan<br>
277
+ Ong Brandon<br>
278
+ Ong Tat-Wee David<br>
279
+ Ong Zhi Hao<br>
280
+ Rengarajan Hamsawardhini<br>
281
+ Siow Bryan<br>
282
+ Susanto Yosephine<br>
283
+ Tai Ngee Chia<br>
284
+ Tan Choon Meng<br>
285
+ Teng Walter<br>
286
+ Teo Eng Sipp Leslie<br>
287
+ Teo Wei Yi<br>
288
+ Tjhi William<br>
289
+ Yeo Yeow Tong<br>
290
+ Yong Xianbin<br>
291
+
292
+ ### PT GoTo Gojek Tokopedia Tbk
293
+ Anissa Dininta<br>
294
+ Chau Shiau Ching<br>
295
+ Choiri Hendra Hadhil<br>
296
+ Goel Priyank<br>
297
+ Saini Ajay Kumar<br>
298
+ Shalev Ofir<br>
299
+ Tan Daryl<br>
300
+ Tep Kilian Rithi<br>
301
+ Tiwari Anupam<br>
302
+ Widjojo Daniel<br>
303
+
304
+ ## Acknowledgements
305
+
306
+ [AI Singapore](​​https://aisingapore.org/) is a national programme supported by the National Research Foundation, Singapore and hosted by the National University of Singapore.
307
+
308
+ Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the National Research Foundation or the National University of Singapore.
309
+
310
+
311
+ ## Contact
312
+
313
+ For more info, please contact us using this [Sahabat-AI Inquiry Form.](https://docs.google.com/forms/d/1_us969eQtEooYOn4XkvGkdP5VHOyCbO6L_sd9kTMnaA/edit)
314
+
315
+ ## Disclaimer
316
+
317
+ This is the repository for the Instruct model.
318
+ The model has _not_ been aligned for safety.
319
+ Developers and users should perform their own safety fine-tuning and related security measures.
320
+ In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights and codes.
321
+
322
+
323
+ ## References
324
+ ### IndoMMLU Reference
325
+
326
+ ```bibtex
327
+ @inproceedings{koto-etal-2023-indommlu,
328
+ title = "Large Language Models Only Pass Primary School Exams in {I}ndonesia: A Comprehensive Test on {I}ndo{MMLU}",
329
+ author = "Fajri Koto and Nurul Aisyah and Haonan Li and Timothy Baldwin",
330
+ booktitle = "Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
331
+ month = December,
332
+ year = "2023",
333
+ address = "Singapore",
334
+ publisher = "Association for Computational Linguistics",
335
+ }
336
+ }
337
+ ```