Safetensors
gemma2
File size: 14,244 Bytes
8495eff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
---
base_model:
- aisingapore/gemma2-9b-cpt-sea-lionv3-base
language:
- en
- id
- jv
- su
license: gemma
---
# Gemma2 9B CPT Sahabat-AI v1

**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.

This is the card for the Gemma2 9B CPT Sahabat-AI v1 base model which has undergone continued pre-training from the [Gemma2 9B CPT SEA-Lionv3 base](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-base) model.

## Model Details

### Model Description

The continued pre-training data for Gemma2 9B CPT Sahabat-AI v1 base model encompasses approximately 50B tokens.

- **Co-initiated by:**  PT GoTo Gojek Tokopedia Tbk, Indosat Ooredoo Hutchison
- **Developed by:** PT GoTo Gojek Tokopedia Tbk,  AI Singapore
- **Model type:** Decoder
- **Languages:** English, Indonesian, Javanese, Sundanese
- **License:** [Gemma Community License](https://ai.google.dev/gemma/terms)

For tokenisation, the model employs the default tokenizer used in Gemma-2-9B. The model has a context length of 8192.

### Benchmark Performance
We evaluated Gemma2 9B CPT Sahabat-AI v1 base model on general language capabilities.

#### General Language Capabilities
For the evaluation of general language capabilities, we employed the 
- [SEA HELM (also known as BHASA) evaluation benchmark](https://arxiv.org/abs/2309.06085v2) across a variety of tasks.
  - 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).
  - We also added support for Javanese and Sundanese for the BHASA tasks whenever applicable
- and the common English tasks from the [HuggingFace LLM Leaderboard](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard).
  - These tasks consist of [IFEval, BBH, Math Lvl 5, GPQA, MuSR, and MMLU-PRO.](https://huggingface.co/docs/leaderboards/open_llm_leaderboard/about)
  - **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**.

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.

The evaluation was done **five-shot** with native prompts on a sample of 100-1000 instances for each dataset.

#### Results

#### SEA HELM (also known as BHASA)
<table style="border-collapse: collapse; width: 100%; font-size: 10px">
  <tr>
    <th style="border: 2px solid black; padding: 8px; font-weight: bold;">Language / Model Name [Base]</th>
    <th style="border: 1px solid gray; padding: 8px;">Qwen2-7B</th>
    <th style="border: 1px solid gray; padding: 8px;">Qwen2.5-7B</th>
    <th style="border: 1px solid gray; padding: 8px;">Llama-3-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">Llama-3.1-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">sea-lionv2.1-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">gemma-2-9B</th>
    <th style="border: 1px solid gray; padding: 8px;">sea-lionv3-9B</th>
    <th style="border: 1px solid gray; padding: 8px;">sahabatai-v1-8B</th>
    <th style="border: 2px solid black; padding: 8px;">sahabatai-v1-9B</th>
  </tr>
  <tr>
    <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Overall (Bahasa Indonesia + Javanese + Sundanese)</td>
    <td style="border: 1px solid gray; padding: 8px;">42.776</td>
    <td style="border: 1px solid gray; padding: 8px;">46.245</td>
    <td style="border: 1px solid gray; padding: 8px;">49.160</td>
    <td style="border: 1px solid gray; padding: 8px;">49.577</td>
    <td style="border: 1px solid gray; padding: 8px;">48.602</td>
    <td style="border: 1px solid gray; padding: 8px;">58.972</td>
    <td style="border: 1px solid gray; padding: 8px;">60.913</td>
    <td style="border: 1px solid gray; padding: 8px;">59.437</td>
    <td style="border: 2px solid black; padding: 8px; background-color: lightgreen;">64.123</td>
  </tr>
  <tr>
    <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Bahasa Indonesia</td>
    <td style="border: 1px solid gray; padding: 8px;">49.341</td>
    <td style="border: 1px solid gray; padding: 8px;">55.913</td>
    <td style="border: 1px solid gray; padding: 8px;">47.865</td>
    <td style="border: 1px solid gray; padding: 8px;">48.110</td>
    <td style="border: 1px solid gray; padding: 8px;">49.154</td>
    <td style="border: 1px solid gray; padding: 8px;">58.572</td>
    <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">62.437</td>
    <td style="border: 1px solid gray; padding: 8px;">53.454</td>
    <td style="border: 2px solid black; padding: 8px;">60.040</td>
  </tr>
  <tr>
    <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Javanese</td>
    <td style="border: 1px solid gray; padding: 8px;">42.774</td>
    <td style="border: 1px solid gray; padding: 8px;">45.917</td>
    <td style="border: 1px solid gray; padding: 8px;">54.627</td>
    <td style="border: 1px solid gray; padding: 8px;">55.215</td>
    <td style="border: 1px solid gray; padding: 8px;">52.728</td>
    <td style="border: 1px solid gray; padding: 8px;">63.760</td>
    <td style="border: 1px solid gray; padding: 8px;">63.363</td>
    <td style="border: 1px solid gray; padding: 8px;">65.048</td>
    <td style="border: 2px solid black; padding: 8px; background-color: lightgreen;">69.882</td>
  </tr>
  <tr>
    <td style="border: 2px solid black; padding: 8px; font-weight: bold;">Sundanese</td>
    <td style="border: 1px solid gray; padding: 8px;">36.213</td>
    <td style="border: 1px solid gray; padding: 8px;">36.905</td>
    <td style="border: 1px solid gray; padding: 8px;">44.988</td>
    <td style="border: 1px solid gray; padding: 8px;">45.407</td>
    <td style="border: 1px solid gray; padding: 8px;">43.925</td>
    <td style="border: 1px solid gray; padding: 8px;">54.583</td>
    <td style="border: 1px solid gray; padding: 8px;">56.939</td>
    <td style="border: 1px solid gray; padding: 8px;">59.809</td>
    <td style="border: 2px solid black; padding: 8px; background-color: lightgreen;">62.446</td>
  </tr>
</table>

#### English Results
<table style="border-collapse: collapse; width: 100%; font-size: 10px">
  <tr>
    <th style="border: 1px solid gray; padding: 8px;">Model Name [BASE]</th>
    <th style="border: 1px solid gray; padding: 8px;">Qwen2-7B</th>
    <th style="border: 1px solid gray; padding: 8px;">Qwen2.5-7B</th>
    <th style="border: 1px solid gray; padding: 8px;">Llama-3-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">Llama-3.1-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">sea-lionv2.1-8B</th>
    <th style="border: 1px solid gray; padding: 8px;">gemma-2-9B</th>
    <th style="border: 1px solid gray; padding: 8px;">sea-lionv3-9B</th>
    <th style="border: 1px solid gray; padding: 8px;">sahabatai-v1-8B</th>
    <th style="border: 2px solid black; padding: 8px;">sahabatai-v1-9B</th>
  </tr>
  <tr>
    <td style="border: 1px solid gray; padding: 8px; font-weight: bold;">Average</td>
    <td style="border: 1px solid gray; padding: 8px;">23.68</td>
    <td style="border: 1px solid gray; padding: 8px; background-color: lightgreen;">24.65</td>
    <td style="border: 1px solid gray; padding: 8px;">13.56</td>
    <td style="border: 1px solid gray; padding: 8px;">13.69</td>
    <td style="border: 1px solid gray; padding: 8px;">12.77</td>
    <td style="border: 1px solid gray; padding: 8px;">13.34</td>
    <td style="border: 1px solid gray; padding: 8px;">21.99</td>
    <td style="border: 1px solid gray; padding: 8px;">13.92</td>
    <td style="border: 2px solid black; padding: 8px;">19.62</td>
  </tr>
</table>


## Training Details

### Data

Gemma2 9B CPT Sahabat-AI v1 base model was continued pre-trained on 50B tokens of the following data:

| Data Source                           | Unique Tokens (B) | Multiplier | Total Tokens (B) | Percentage (%)|
|---------------------------------------|:-----------------:|:----------:|:----------------:|:-------------:|
| Dolma Refined Web                     | 9.5               | 1          | 9.5              | 18.7          |
| Dolma arXiv                           | 0.6               | 1          | 0.6              | 1.18          |
| Stack V2                              | 5.5               | 1          | 5.5              | 10.85         |
| Dolma Semantic Scholar                | 1.2               | 1          | 1.2              | 2.37          |
| Dolma Reddit                          | 1.7               | 1          | 1.7              | 3.36          |
| Dolma Pes2o                           | 1.2               | 1          | 1.2              | 2.37          |
| Wiki* + News* - Indonesian            | 1.0               | 1          | 1.0              | 1.97          |
| SEA-LION Pile - Indonesian            | 27.0              | 1          | 27.0             | 53.3          |
| JV Pile - Javanese                    | 0.92              | 1.6        | 1.5              | 3.0        	|
| SU Pile - Sundanese                   | 0.39              | 3.8        | 1.5              | 3.0        	|

Note: 
- All token counts are counted using Gemma2 tokenizer
- Wiki* sources includes Wikipedia, Wiki Books, Wiki Source, Wiki Voyage and Fandom Wiki
- News* sources includes VOA, Global Voices

### Infrastructure

Gemma2 9B CPT Sahabat-AI v1 was trained using [MosaicML Composer](https://github.com/mosaicml/composer)
on the following hardware:

| Training Details     | Gemma2 9B CPT Sahabat-AI v1|
|----------------------|:--------------------------:|
| Nvidia H100 80GB GPU |        32                  |
| Training Duration    |        7 days              |


### Configuration

| HyperParameter    | Gemma2 9B CPT Sahabat-AI v1|
|-------------------|:--------------------------:|
| Precision         | bfloat16                   |
| Optimizer         | decoupled_adamw            |
| Scheduler         | weight_stable_decay        |
| Learning Rate     | 1.0e-5                     |
| Global Batch Size | 256                        |
| Micro Batch Size  | 1                          |

## Call for Collaboration 

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. 
Sahabat-AI ecosystem aims to empower Indonesians who want to develop AI-based services and applications using Bahasa Indonesia and its various local dialects. 

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.

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.

We would like to invite **researchers, developers, and language enthusiasts** to actively contribute to the enhancement and expansion of Sahabat-AI. 
Your collaborations can involve:
- Identifying and reporting technical issues
- Sharing pre-training, instruction, and preference data
- Improving documentation usability
- Proposing and implementing new model evaluation tasks and metrics 

Join us in shaping the future of Sahabat-AI by sharing your expertise and insights to make these models more accessible, accurate, and versatile.

You can contribute your ideas through [this form.](https://docs.google.com/forms/d/1_us969eQtEooYOn4XkvGkdP5VHOyCbO6L_sd9kTMnaA/edit)

## The Development Team (in ascending alphabetical order)

### AI Singapore
Chan Adwin<br>
Cheng Nicholas<br>
Choa Esther<br>
Huang Yuli<br>
Lau Wayne<br>
Lee Chwan Ren<br>
Leong Wai Yi<br>
Leong Wei Qi<br>
Limkonchotiwat Peerat<br>
Liu Bing Jie Darius<br>
Montalan Jann Railey<br>
Ng Boon Cheong Raymond<br>
Ngui Jian Gang<br>
Nguyen Thanh Ngan<br>
Ong Brandon<br>
Ong Tat-Wee David<br>
Ong Zhi Hao<br>
Rengarajan Hamsawardhini<br>
Siow Bryan<br>
Susanto Yosephine<br>
Tai Ngee Chia<br>
Tan Choon Meng<br>
Teng Walter<br>
Teo Eng Sipp Leslie<br>
Teo Wei Yi<br>
Tjhi William<br>
Yeo Yeow Tong<br>
Yong Xianbin<br>

### PT GoTo Gojek Tokopedia Tbk
Anissa Dininta<br>
Chau Shiau Ching<br>
Choiri Hendra Hadhil<br>
Goel Priyank<br>
Saini Ajay Kumar<br>
Shalev Ofir<br>
Tan Daryl<br>
Tep Kilian Rithi<br>
Tiwari Anupam<br>
Widjojo Daniel<br>

## Acknowledgements

AI Singapore is a national programme supported by the National Research Foundation, Singapore and hosted by the National University of Singapore.

Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore.

## Contact

For more info, please contact us using this [Sahabat-AI Inquiry Form.](https://docs.google.com/forms/d/1_us969eQtEooYOn4XkvGkdP5VHOyCbO6L_sd9kTMnaA/edit)


## Disclaimer

This is the repository for the base model.
The model has _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.