Safetensors
gemma3
SAnocha commited on
Commit
6af5359
·
verified ·
1 Parent(s): ba3a9d9

Update README

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