--- library_name: transformers tags: - generated_from_trainer model-index: - name: >- Apertus-SEA-LION-v4-8B-IT results: [] license: apache-2.0 language: - en - zh - vi - id - th - fil - ta - ms - km - lo - my base_model: - swiss-ai/Apertus-8B-Instruct-2509 pipeline_tag: text-generation --- ![Banner!](Apertus_SEA-LIONv4.png "v4-banner-Apertus-v4") # Apertus-SEA-LION-v4-8B-IT *[Last update: 2026-02-05]* SEA-LION is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region. **Apertus-SEA-LION-v4-8B-IT** is a 8-billion parameter model built upon the Apertus-8B-Instruct architecture. To ensure **domain adaptation** for the region, the model underwent rigorous post-training on a curated dataset of approximately **6.4 million** instruction-text pairs. This extensive post-training instills **multilingual** and **multicultural** fluency, covering key SEA languages such as Burmese, Malay, Tagalog and Tamil. This curated dataset also includes a filtered open sourced set of tool-calling instruction-text pairs to impart these capabilities, in addition to linguistic fluency. Apertus-SEA-LION-v4-8B-IT is designed as a fully open model to align with this core philosophy, we have released the datasets used for post-training, as well as the evaluation codes and datasets used to evaluate the model. These resources can be accessed via the link below. - [Open post-training datasets](#Training-Data) we used. - [SEA-HELM Evaluation codes and datasets]() ## Model Details ### Model Description SEA-LION stands for *Southeast Asian Languages In One Network*. We performed Post-Training in English and SEA languages on Apertus-8B-Instruct-2509, a decoder model using the Apertus architecture, to create Apertus-SEA-LION-v4-8B-IT. For tokenization, the model employs the default tokenizer used in Apertus-8B-Instruct-2509. - **Developed by:** AI Products Pillar, AI Singapore - **Funded by:** Singapore NRF - **Shared by:** AI Products Pillar, AI Singapore - **Model type:** Decoder - **Context length:** 65k - **Language(s):** Fine-tuned on English, Burmese, Tagalog, Malay and Tamil - **License:** [Apache-2.0](https://choosealicense.com/licenses/apache-2.0/) - **Finetuned from model:** [Apertus-8B-Instruct](https://huggingface.co/swiss-ai/Apertus-8B-Instruct-2509) ### Model Sources - **Repository:** ## Uses ### Out-of-Scope Use 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 claims, damages, or other liabilities arising from the use of the released weights and codes. ## Bias, Risks, and Limitations *The model was not tested for robustness against adversarial prompting.* It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies. ## How to Get Started with the Model Use the code below to get started with the model with 🤗 Transformers libraries. ``` pip install transformers>=4.56.0 ``` ``` # The code is adopted from Apertus example from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "aisingapore/Apertus-SEA-LION-v4-8B-IT" device = "cuda" # for GPU usage or "cpu" for CPU usage # load the tokenizer and the model tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, ).to(device) # prepare the model input prompt = "Explain the concept of 'Hari Raya Puasa' in simple terms." messages_think = [ {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages_think, tokenize=False, add_generation_prompt=True, ) model_inputs = tokenizer([text], return_tensors="pt", add_special_tokens=False).to(model.device) # Generate the output generated_ids = model.generate(**model_inputs, max_new_tokens=32768) # Get and decode the output output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :] print(tokenizer.decode(output_ids, skip_special_tokens=True)) ``` ## Tool Calling The prompt in the example is in Malay and translates to “Please help me find a 4-room flat near Tampines, budget under $500,000. I also want to know the estimated monthly loan payment.” ``` import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "aisingapore/Apertus-SEA-LION-v4-8B-IT" tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto" ) messages = [ {"role": "user", "content": "Tolong carikan flat 4-bilik dekat Tampines, bajet bawah $500,000. Nak tahu juga berapa anggaran pinjaman bulanan."} ] tools = [ { "type": "function", "function": { "name": "search_hdb_listings", "description": "Search for HDB flats available for sale", "parameters": { "type": "object", "properties": { "location": {"type": "string", "description": "Town or area name"}, "flat_type": {"type": "string", "description": "Flat type e.g. 3-room, 4-room, 5-room"}, "max_price": {"type": "number", "description": "Maximum price in SGD"} }, "required": ["location", "flat_type"] } } }, { "type": "function", "function": { "name": "calculate_mortgage", "description": "Calculate estimated monthly mortgage payment", "parameters": { "type": "object", "properties": { "loan_amount": {"type": "number", "description": "Loan amount in SGD"}, "interest_rate": {"type": "number", "description": "Annual interest rate as percentage"}, "loan_tenure_years": {"type": "integer", "description": "Loan period in years"} }, "required": ["loan_amount"] } } } ] input_ids = tokenizer.apply_chat_template( messages, tools=tools, return_tensors="pt", add_generation_prompt=True ).to(model.device) generated_ids = model.generate( input_ids, max_new_tokens=512, do_sample=False, ) response = tokenizer.decode( generated_ids[0][input_ids.shape[1]:], skip_special_tokens=False, ).replace("", "").strip() print(response) ``` ## Training Details ### Training Data The instruction fine-tuning text dataset comprises of a collection of OSS & synthetic data. The datasets used for post-training can be accessed via the link below. **Datasets for Instruction Fine Tuning**: - 🤗[aisingapore/SEA-Instruct-2602](https://huggingface.co/datasets/aisingapore/SEA-Instruct-2602) **Datasets for Tool-calling**: - 🤗[allenai/Dolci-Instruct-SFT-Tool-Use](https://huggingface.co/datasets/allenai/Dolci-Instruct-SFT-Tool-Use) - 🤗[Agent-Ark/Toucan-1.5M](https://huggingface.co/datasets/Agent-Ark/Toucan-1.5M) ### Training Procedure #### Training Hyperparameters - **Training regime:** Our post-training workflow consists of instruction fine-tuning and model merging. - **Training hyperparameters:** The following hyperparameters were used during training: | Category | Hyperparameter | Value | | --- | --- | --- | | **Optimization** | Optimizer | `ADAMW_TORCH_FUSED` (β1=0.9, β2=0.999, ε=1e-08) | | **Batch Size** | Train Batch Size (per device) | `1` | | | Eval Batch Size (per device) | `1` | | **Hardware** | Distributed Type | `multi-GPU` | | | Number of Devices | `64` | | **Schedule** | LR Scheduler Type | `constant_with_warmup` | | | LR Scheduler Warmup Steps | `269` | | **Other** | Training Steps | `5397` | | | Seed | `42` | ## Evaluation ### Testing Data, Factors & Metrics We evaluated Apertus-SEA-LION-v4-8B-IT on general language capabilities and LLM-specific capabilities using SEA-HELM. **Testing Data** General language capabilities For the evaluation of general language capabilities, we employed the [SEA-HELM evaluation benchmark](https://arxiv.org/abs/2502.14301) 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 Summarisation (Abssum), Causal Reasoning (Causal), Natural Language Inference (NLI), Linguistic Diagnostics (LINDSEA), Cultural Knowledge (Kalahi) and Global MMLU Lite/Thai Exam. Instruction-following and Multi-turn Chat We evaluated the models on instruction-following and multi-turn chat capabilities with SEA-IFEval (based on [IFEval](https://arxiv.org/abs/2311.07911)) and SEA-MTBench (based on [MT-Bench](https://arxiv.org/abs/2306.05685)) respectively. The two datasets were originally in English, the linguists and native speakers in the team worked together to filter, localise and translate the datasets into the respective target languages to ensure that the examples remained reasonable, meaningful and natural. #### Factors All evaluations were run with the model specific generation parameters defined in the model config. Each evaluation comprised of 8 runs with different seeds and the final results were averaged across these runs. For all tasks, the model was expected to provide an answer tag from which the answer was automatically extracted. For tasks where options were provided, the answer should comprise one of the pre-defined options. The evaluation was done **zero-shot** with native prompts on a sample of 100-1000 instances for each dataset. SEA-IFEval SEA-IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. Additionally, accuracy is normalised by the proportion of responses in the correct language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task). SEA-MTBench SEA-MTBench evaluates a model's ability to engage in multi-turn (2 turns) conversations and respond in ways that align with human needs. We use `gpt-4.1-2025-04-14` as the judge model and compare against `gpt-4.1-2025-04-14` as the baseline model. The metric used is the weighted win rate against the baseline model (i.e. average win rate across each category: Math, Reasoning, STEM, Humanities, Roleplay, Writing, Extraction). #### Metrics The following metrics were used for text capabilities: | **Task** | **Metric** | | --- | --- | | Sentiment Analysis | Accuracy | | Extractive QA (ID, VI, TH, TA) | ChrF++ | | MCQ-QA (TL, MY, MS) | Accuracy | | Metaphor | Accuracy | | Abstractive Summarisation | Rouge-L | | Translations | MetricX-24 score (with reference) | | Causal Reasoning | Accuracy | | Natural Language Inference | Accuracy | | LINDSEA | Accuracy | | Global MMLU Lite | Accuracy | | Thai Exam | Accuracy | | Kalahi | Accuracy | | SEA-IFEval | Accuracy | | SEA-MTBench | Win rate against a reference | ### Evaluating Apertus-SEA-LION-v4-8B-IT on SEA-HELM Apertus-SEA-LION-v4-8B-IT can be evaluated by following the steps in: [https://github.com/aisingapore/SEA-HELM/tree/main?tab=readme-ov-file#instructions-for-running-sea-helm](https://github.com/aisingapore/SEA-HELM/tree/seahelm-update?tab=readme-ov-file#instructions-for-running-sea-helm) ### Results ![LeaderboardResults!](sea-helm_scores_05_Feb_1pm.png "LeaderboardCaptured05Feb1pm") For details on Apertus-SEA-LION-v4-8B-IT performance, please refer to the SEA-HELM leaderboard, . ### Tool calling We evaluated the tool calling capabilities of our model using the Berkeley Function Calling Leaderboard (BFCL) V4 evaluation. #### Factors The evaluation was done using the codes from the BFCL v4 repository. Modifications were made to the agentic web search task: - The Brave Search API was used instead of the DuckDuckGo Search API. The Brave Search API is also a privacy focused search engine and is similar to the DuckDuckGo Search API. **Note:** Apertus-8b was run in prompt mode as it does not support function calling. #### Results ![ToolcallingResults!](Toolcalling_05_Feb_1pm.png "Toolcalling05Feb1pm") ## Technical Specifications ### Software Environment & Requirements | Library | Version | | --- | --- | | `Transformers` | `4.57.1` | | `PyTorch` | `2.8.0 + cu129` | | `Datasets` | `4.4.2` | | `Tokenizers` | `0.22.1` | ## More Information This is the repository for the commercial instruction-tuned 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 claims, damages, or other liabilities arising from the use of the released weights and codes. For more info, please contact us at [sealion@aisingapore.org](mailto: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, Kang Siow Wei Bryan, 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, Susanto Yosephine, Sutaveephamochanon Anocha, Tan Choon Meng, Tan Chor Phin Evelyn, Tan Siao Wei Jessica, Tan Yixian, Tee Jun Yun, Teng Kok Wai Walter, Teo Eng Sipp Leslie, Tjhi William, Wu Donghang, Yeo Yeow Tong, Yong Xianbin, Zhang Zhou, Imanol Schlag (Swiss AI), Antoine Bosselut (Swiss AI) and Martin Jaggi (Swiss AI) ## 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 [sealion@aisingapore.org](mailto:sealion@aisingapore.org)