Downloads · 30 days
136
1% of all-time downloads
aisingapore/sealion-bert-base
sealion-bert-base is a fill-mask model from aisingapore. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as mit.
SEA-LION stands for <iSoutheast Asian Languages In One Network</i.
Downloads · 30 days
136
1% of all-time downloads
All-time downloads
9.4K
Public
Parameters
311M
2.5 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
SEA-LION stands for <i>Southeast Asian Languages In One Network</i>.
This is the card for the SEA-LION-BERT base model.
from transformers import AutoModelForMaskedLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('aisingapore/sealion-bert-base', trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained('aisingapore/sealion-bert-base', trust_remote_code=True)
# prepare input
text = "Give me a <|mask|>!!!"
encoded_input = tokenizer(text, return_tensors='pt')
The SEA-LION-BERT model is built on the MosaicBERT architecture and has a vocabulary size of 256K.
For tokenization, the model employs our custom SEABPETokenizer, which is specially tailored for SEA languages, ensuring optimal model performance.
The training data for SEA-LION-BERT encompasses 790B tokens.
SEA-LION was trained on 790B tokens of the following data:
| Data Source | Tokens | Percentage |
|---|---|---|
| RefinedWeb - English | 571.3B | 72.26% |
| mC4 - Chinese | 91.2B | 11.54% |
| mC4 - Indonesian | 14.7B | 1.86% |
| mC4 - Malay | 2.9B | 0.36% |
| mC4 - Filipino | 5.3B | 0.67% |
| mC4 - Burmese | 4.9B | 0.61% |
| mC4 - Vietnamese | 63.4B | 8.02% |
| mC4 - Thai | 21.6B | 2.74% |
| mC4 - Lao | 1.1B | 0.14% |
| mC4 - Khmer | 3.9B | 0.50% |
| mC4 - Tamil | 10.2B | 1.29% |
SEA-LION was trained using MosaicML Composer on the following hardware:
| Training Details | SEA-LION-BERT |
|---|---|
| Nvidia A100 40GB GPU | 4 |
| Training Duration | 14 days |
| HyperParameter | SEA-LION-BERT |
|---|---|
| Precision | bfloat16 |
| Optimizer | decoupled_adamw |
| Scheduler | linear_decay_with_warmup |
| Learning Rate | 5e-4 |
| Global Batch Size | 448 |
| Micro Batch Size | 56 |
SEA-LION-BERT is an encoder model using the MosaicBERT architecture.
| Parameter | SEA-LION-BERT |
|---|---|
| Layers | 12 |
| d_model | 768 |
| head_dim | 12 |
| Vocabulary | 256000 |
| Sequence Length | 128 |
We sample 20M lines from the training data to train the tokenizer.<br> The framework for training is SentencePiece.<br> The tokenizer type is Byte-Pair Encoding (BPE).
Montalan Jann Railey<br> Nguyen Thanh Ngan<br> Rengarajan Hamsawardhini<br> Teo Eng Sipp Leslie<br> Tjhi William<br>
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.
For more info, please contact us using this SEA-LION Inquiry Form