SAnocha commited on
Commit
9c418e9
·
verified ·
1 Parent(s): 1cddca7

Update README

Browse files
Files changed (1) hide show
  1. README.md +273 -0
README.md CHANGED
@@ -21,3 +21,276 @@ license: gemma
21
  base_model_relation: finetune
22
 
23
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  base_model_relation: finetune
22
 
23
  ---
24
+ *Gemma-SEA-LION-v4-27B (Base Model) Last updated: 2025-08-18*
25
+
26
+ ---
27
+
28
+ # Model Card for Gemma-SEA-LION-v4-27B
29
+
30
+ <!-- Provide a quick summary of what the model is/does. -->
31
+
32
+ **SEA-LION** is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned
33
+ for the Southeast Asia (SEA) region.
34
+
35
+ Gemma-SEA-LION-v4-27B is a multilingual model which has undergone continued pre-training on
36
+ approximately **500B** tokens across 11 SEA languages: Bahasa Indonesia, Burmese, Chinese, English,
37
+ Khmer, Lao, Malay, Tagalog, Tamil, Thai and Vietnamese.
38
+
39
+
40
+ ## Model Details
41
+
42
+ ### Model Description
43
+
44
+ <!-- Provide a longer summary of what this model is. -->
45
+
46
+ SEA-LION stands for *Southeast Asian Languages In One Network*.
47
+
48
+ We performed continued pre-training in English and SEA languages on Gemma 3 27B IT,
49
+ a decoder model using the Gemma 3 architecture, to create Gemma-SEA-LION-v4-27B.
50
+
51
+ For tokenization, the model employs the default tokenizer used in Gemma 3 27B IT.
52
+
53
+
54
+ - **Developed by:** Products Pillar, AI Singapore
55
+ - **Funded by:** Singapore NRF
56
+ - **Shared by:** Products Pillar, AI Singapore
57
+ - **Model type:** Decoder
58
+ - **Context length:** 128k
59
+ - **Language(s) (NLP):** Bahasa Indonesia, Burmese, Chinese, English, Khmer, Lao, Malay, Tagalog, Tamil, Thai and Vietnamese
60
+ - **License:** [Gemma Terms of Use](https://ai.google.dev/gemma/terms)
61
+ - **Finetuned from model:** [Gemma-3-27B-IT](https://huggingface.co/google/gemma-3-27b-it)
62
+
63
+ ### Model Sources
64
+
65
+ <!-- Provide the basic links for the model. -->
66
+
67
+ - **Repository:** https://github.com/aisingapore/sealion.git
68
+
69
+
70
+ ## Uses
71
+
72
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
73
+
74
+
75
+ ### Out-of-Scope Use
76
+
77
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
78
+
79
+ The model has not been aligned for safety. Developers and users should perform their own safety
80
+ fine-tuning and related security measures. In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
81
+
82
+
83
+ ## Bias, Risks, and Limitations
84
+
85
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
86
+
87
+ It is important for users to be aware that our model exhibits certain limitations that warrant consideration.
88
+ Like many LLMs, the model can hallucinate and occasionally generates irrelevant content,
89
+ introducing fictional elements that are not grounded in the provided context.
90
+ Users should also exercise caution in interpreting and validating the model's responses
91
+ due to the potential inconsistencies.
92
+
93
+ **Limitations**
94
+
95
+ In terms of vision capability, Gemma-SEA-LION-v4-27B has been trained and fine-tuned exclusively on the text back-end.
96
+ As a result, its vision capabilities are expected to be comparable to those of Gemma 3 IT 27B,
97
+ and may not exhibit significant improvements or differences in this area. [🤗 google/gemma-3-27b-it](https://huggingface.co/google/gemma-3-27b-it )
98
+
99
+
100
+
101
+
102
+ ## How to Get Started with the Model
103
+
104
+ Use the code below to get started with the model.
105
+
106
+ Use the code below to get started with the model using the 🤗 Transformers library.
107
+ ```python
108
+ from transformers import pipeline
109
+ import torch
110
+
111
+ pipe = pipeline(
112
+ "text-generation",
113
+ model="aisingapore/Gemma-SEA-LION-v4-27B",
114
+ device="cuda",
115
+ torch_dtype=torch.bfloat16
116
+ )
117
+
118
+ messages = [
119
+ {
120
+ "role": "system",
121
+ "content": [{"type": "text", "text": "You are a helpful assistant."}]
122
+ },
123
+ {
124
+ "role": "user",
125
+ "content": [
126
+ {"type": "text", "text": "Write a poem on southeast asian countries in Indonesian."}
127
+ ]
128
+ }
129
+ ]
130
+
131
+ output = pipe(text=messages, max_new_tokens=200)
132
+ print(output[0]["generated_text"][-1]["content"])
133
+ ```
134
+
135
+
136
+ ## Training Details
137
+
138
+ ### Training Data
139
+
140
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
141
+
142
+ The dataset comprises Bahasa Indonesia, Burmese, Chinese, English, Khmer, Lao, Malay, Tagalog, Tamil,
143
+ Thai and Vietnamese languages, collected from a mixture of sources including web data, code, open-source datasets,
144
+ and synthetically generated datasets, amounting to a total of 500 billion tokens.
145
+
146
+ The 500 billion tokens are sampled from a much larger pool of 1 trillion tokens from open-sourced datasets with the optimal datamix shown below determined by our experiments.
147
+
148
+
149
+ | Language | Dataset Name | Total Tokens (B) | Percentage (%) | Total percentage (%) |
150
+ |-----------------------------------|-------------------------|------------------|----------------|---------------------|
151
+ | Code | StarCoder (OLMo 2 Version) | 50B | 10 | 10 |
152
+ | EN | Fineweb-Edu | 80B | 16 | 40 |
153
+ | | DCLM-OLMo2-HQ | 80B | 16 | |
154
+ | | Non-CC-EN | 40B | 8 | |
155
+ | ZH | SEA-LION Pile v1 | 13.5B | 2.7 | 9 |
156
+ | | Fineweb2 | 13.5B | 2.7 | |
157
+ | | Fineweb2-HQ | 4.5B | 0.9 | |
158
+ | VI | SEA-LION Pile v1 | 4.25B | 0.85 | 8.5 |
159
+ | | SEA-LION Pile v2 | 12.75B | 2.55 | |
160
+ | | Fineweb2 | 8.5B | 1.7 | |
161
+ | | Non-CC-VI | 17B | 3.4 | |
162
+ | ID | SEA-LION Pile v1 | 5.66B | 1.13 | 8.5 |
163
+ | | SEA-LION Pile v2 | 17B | 3.4 | |
164
+ | | Fineweb2 | 11.33B | 2.27 | |
165
+ | | Non-CC-ID | 8.5B | 1.7 | |
166
+ | TH | SEA-LION Pile v1 | 3.035B | 0.61 | 8.5 |
167
+ | | SEA-LION Pile v2 | 9.107B | 1.82 | |
168
+ | | Fineweb2 | 3.035B | 0.61 | |
169
+ | | WangChanBERTa | 3.035B | 0.61 | |
170
+ | | Dolmav1 | 3.035B | 0.61 | |
171
+ | | Non-CC-TH | 21.25B | 4.25 | |
172
+ | TL, TA, MS, KM, LO and MY | ALL_LANG | 77.5B | 15.5 | 15.5 |
173
+
174
+
175
+
176
+ Note:
177
+
178
+ - All token counts are counted using Gemma 3 tokenizer.
179
+
180
+ - Pre-training was conducted with batches of 8k token lengths.
181
+
182
+ - SEA-Pile v1 is processed from Common Crawl WET, which is published [here](https://huggingface.co/datasets/aisingapore/sea-lion-pile).
183
+ The main proportion is from mC4 dataset (corpus [link](https://huggingface.co/datasets/bertin-project/mc4-sampling)).
184
+ The cutoff date of this version is September 2020.
185
+
186
+ - SEA-Pile v2 is processed from Common Crawl WARC from October 2020 to April 2024.
187
+
188
+ - Tamil news is sourced with permission from [Seithi](https://seithi.mediacorp.sg/)
189
+
190
+
191
+ ### Training Procedure
192
+
193
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
194
+
195
+ #### Training Hyperparameters
196
+
197
+ - **Training regime:**
198
+
199
+
200
+ | Hyperparameter | Gemma-SEA-LION-v4-27B |
201
+ |-------------------|-----------------------|
202
+ | Precision | bfloat16 |
203
+ | Optimizer | decoupled_adamw |
204
+ | Scheduler | CosineAnnealing |
205
+ | Learning Rate | 4.00E-08 |
206
+ | Global Batch Size | 1024 |
207
+ <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
208
+
209
+
210
+ ## Evaluation
211
+
212
+ <!-- This section describes the evaluation protocols and provides the results. -->
213
+
214
+ ### Testing Data, Factors & Metrics
215
+
216
+ #### Testing Data
217
+
218
+ <!-- This should link to a Dataset Card if possible. -->
219
+
220
+ We evaluated Gemma-SEA-LION-v4-27B on general language capabilities.
221
+
222
+ **Testing Data**
223
+
224
+ General NLP Behaviour
225
+
226
+ For the evaluation of general language capabilities, we employed the SEA-HELM evaluation benchmark
227
+ across a variety of tasks. These tasks include Question Answering (QA), Sentiment Analysis (Sentiment),
228
+ Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng),
229
+ Abstractive Summarisation (Abssum), Causal Reasoning (Causal), Natural Language Inference (NLI),
230
+ and linguistic diagnostics (LINDSEA).
231
+
232
+
233
+ #### Factors
234
+
235
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
236
+
237
+ Our evaluations were set based on task. For all tasks, the model is expected to provide an answer tag
238
+ from which the answer is automatically extracted. For tasks where options are provided,
239
+ the answer should comprise one of the pre-defined options. The scores for each task is normalised to account
240
+ for baseline performance due to random chance.
241
+
242
+
243
+ #### Metrics
244
+
245
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
246
+
247
+ The evaluation was done **five-shot** with native prompts on a sample of 100-1000 instances for each dataset.
248
+
249
+ ### Results
250
+
251
+ For details on Gemma-SEA-LION-v4-27B performance, please refer to the SEA-HELM leaderboard, [Leaderboard results on SEA-HELM](https://leaderboard.sea-lion.ai/).
252
+
253
+
254
+ #### Summary
255
+
256
+ TBC
257
+
258
+
259
+ ## Environmental Impact
260
+
261
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
262
+
263
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
264
+
265
+ - **Hardware Type:** Nvidia H200 140GB GPUs
266
+ - **Hours used:** 214 hrs
267
+ - **Cloud Provider:** SMC H200
268
+ - **Compute Region:** Singapore
269
+ - **Carbon Emitted:** appx. 35.27 - 41 kg CO2 e
270
+
271
+ ## More Information
272
+
273
+ This is the repository for the commercial instruction-tuned model.
274
+ The model has not been aligned for safety. Developers and users should perform their own safety
275
+ fine-tuning and related security measures. In no event shall the authors be held liable
276
+ for any claims, damages, or other liabilities arising from the use of the released weights and codes.
277
+
278
+ For more info, please contact us at sealion@aisingapore.org
279
+
280
+
281
+ ## Team
282
+
283
+ Adithya Venkatadri Hulagadri, Adwin Chan Hok Teng, Anocha Sutaveephamochanon,
284
+ Brandon Ong Jin Jie, Bryan Siow Wei Kang, David Ong Tat-Wee, Esther Choa Hsueh Mei,
285
+ Evelyn Tan Chor Phin, Hamsawardhini Rengarajan, Huang Yuli, Jann Railey Estrada Montalan,
286
+ Jessica Tan Siao Wei, Jonathan Heng, Karthik Nagarajan, Lee Chwan Ren, Leong Wai Yi,
287
+ Leong Wei Qi, Leslie Teo, Mark Pereira, Muhammad Ridzuan Bin Mokhtar, Ngee Chia Tai,
288
+ Ngui Jian Gang, Nguyen Thanh Ngan, Nicholas Cheng Zi Yi, Ong Zhi Hao, Peerat Limkonchotiwat,
289
+ Raymond Ng Boon Cheong, Sajeban Antonyrex, Susanto Yosephine, Tan Choon Meng,
290
+ Walter Teng Kok Wai, Wayne Lau, William Tjhi Chandra, Yeo Yeow Tong, Yong Xianbin,
291
+ Liew Rachel, Liu Bing Jie Darius, Teo Wei Yi
292
+
293
+
294
+ ## Contact
295
+
296
+ sealion@aisingapore.org