{"id":28532233,"url":"https://github.com/sail-sg/sailor2","last_synced_at":"2026-01-30T06:14:03.791Z","repository":{"id":266313427,"uuid":"897735839","full_name":"sail-sg/sailor2","owner":"sail-sg","description":"🔱 Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMs","archived":false,"fork":false,"pushed_at":"2025-03-21T06:51:20.000Z","size":509,"stargazers_count":61,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-09T15:52:59.192Z","etag":null,"topics":["acehnese","burmese","cebuano","indonesia","javanese","khmer","language-model","lao","malay","minangkabau-language","multilingual-models","sundanese","tagalog","tamil","thai","vietnamese","waray"],"latest_commit_sha":null,"homepage":"https://arxiv.org/pdf/2502.12982","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sail-sg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T06:29:55.000Z","updated_at":"2025-05-21T01:40:28.000Z","dependencies_parsed_at":"2024-12-03T17:22:00.624Z","dependency_job_id":"92855b3c-847a-4236-b456-9bd6e47eb858","html_url":"https://github.com/sail-sg/sailor2","commit_stats":null,"previous_names":["sail-sg/sailor2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sail-sg/sailor2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sail-sg%2Fsailor2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sail-sg%2Fsailor2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sail-sg%2Fsailor2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sail-sg%2Fsailor2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sail-sg","download_url":"https://codeload.github.com/sail-sg/sailor2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sail-sg%2Fsailor2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264092090,"owners_count":23556227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acehnese","burmese","cebuano","indonesia","javanese","khmer","language-model","lao","malay","minangkabau-language","multilingual-models","sundanese","tagalog","tamil","thai","vietnamese","waray"],"created_at":"2025-06-09T15:37:54.453Z","updated_at":"2026-01-30T06:14:03.777Z","avatar_url":"https://github.com/sail-sg.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMs \n\n[![Homepage](https://img.shields.io/badge/🏠-Homepage-3C47EB.svg)](https://sea-sailor.github.io/blog/sailor2/) \u0026nbsp;\u0026nbsp; [![Technical Report](https://img.shields.io/badge/arXiv-Report-b31b1b.svg)](https://arxiv.org/pdf/2502.12982) \u0026nbsp;\u0026nbsp; [![HuggingFace](https://img.shields.io/badge/🤗-Model\u0026Demo-E87948.svg)](https://huggingface.co/collections/sail/sailor2-language-models-674d7c9e6b4dbbd9a869906b) \u0026nbsp;\u0026nbsp; [![SailCraft](https://img.shields.io/badge/🚢-SailCraft(DataCleaning)-4F94CD.svg)](https://github.com/sail-sg/sailcraft) \u0026nbsp;\u0026nbsp; [![SailCompass](https://img.shields.io/badge/🧭-SailCompass(Evaluation)-ffbf00.svg)](https://github.com/sail-sg/sailcompass)\n\n\n\nThis repository contains the code for Sailor2, a powerful and inclusive open language models for South-East Asia.\n\nSailor2 is a collaborative project partnered with Sea AI Lab, SCB10X, WiseSight, HuggingFace and the Sailor2 Community.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"misc/sailor2_banner.jpg\" width=\"700\"/\u003e\n\u003c/div\u003e\n\n\u003e The logo was generated by MidJourney\n\nSailor2 is a community-driven initiative that brings cutting-edge multilingual language models to South-East Asia (SEA). \nOur research highlights a strong demand for models in the **8B and 20B parameter** range for production use, alongside **1B models** for specialized applications, \nsuch as speculative decoding and research purposes. \nThese models, released under the **Apache 2.0 license**, provide enhanced accessibility to advanced language technologies across the region.\n\n\nSailor2 builds upon the foundation of the awesome multilingual model [Qwen 2.5](https://huggingface.co/collections/Qwen/qwen25-66e81a666513e518adb90d9e) and \nis continuously pre-trained on **500B tokens** to support **15 languages** better with a unified model. \nThese languages include English, Chinese, Burmese, Cebuano, Ilocano, Indonesian, Javanese, Khmer, Lao, Malay, Sundanese, Tagalog, Thai, Vietnamese, and Waray. \nBy addressing the growing demand for diverse, robust, and accessible language models, \nSailor2 seeks to serve the underserved in SEA areas with open, inclusive, and accessible multilingual LLMs.\n\nRefer to [Sailor2 Homepage](https://sea-sailor.github.io/blog/sailor2/) for more training details.\n\n## Release Check List\n\n- [x] [Data Cleaning Code](https://github.com/sail-sg/sailcraft)\n- [x] [Data Mixture Code](https://github.com/sail-sg/regmix)\n- [x] [Pre-training Code](https://github.com/sail-sg/Megatron-Sailor2)\n- [x] [Post-training Code](https://github.com/sail-sg/oat)\n- [x] [Base Model Evaluation Code](https://github.com/sail-sg/sailcompass)\n- [x] [Chat Model Evaluation Code](https://github.com/sail-sg/SEA-WildBench)\n- [x] [Base and Chat Models](https://huggingface.co/collections/sail/sailor2-language-models-674d7c9e6b4dbbd9a869906b)\n\n\n## Requirements\nThe code of Sailor2 has been in the latest Hugging face transformers and we advise you to install `transformers==4.46.3`.\n\n## Quickstart\n\nHere provides a code snippet to show you how to load the tokenizer and model and how to generate contents.\n\n```python\nimport torch\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\ndevice = \"cuda\"\n\nmodel = AutoModelForCausalLM.from_pretrained(\n    'sail/Sailor2-20B-Chat',\n    torch_dtype=torch.bfloat16,\n    device_map=\"auto\"\n)\n\ntokenizer = AutoTokenizer.from_pretrained('sail/Sailor2-20B-Chat')\nsystem_prompt= \\\n'You are an AI assistant named Sailor2, created by Sea AI Lab. \\\nAs an AI assistant, you can answer questions in English, Chinese, and Southeast Asian languages \\\nsuch as Burmese, Cebuano, Ilocano, Indonesian, Javanese, Khmer, Lao, Malay, Sundanese, Tagalog, Thai, Vietnamese, and Waray. \\\nYour responses should be friendly, unbiased, informative, detailed, and faithful.'\n\nprompt = \"Beri saya pengenalan singkat tentang model bahasa besar.\"\n# prompt = \"Hãy cho tôi một giới thiệu ngắn gọn về mô hình ngôn ngữ lớn.\"\n# prompt = \"ให้ฉันแนะนำสั้น ๆ เกี่ยวกับโมเดลภาษาขนาดใหญ่\"\n\nmessages = [\n    {\"role\": \"system\", \"content\": system_prompt},\n    {\"role\": \"user\", \"content\": prompt}\n]\ntext = tokenizer.apply_chat_template(\n    messages,\n    tokenize=False,\n    add_generation_prompt=True\n)\n\nmodel_inputs = tokenizer([text], return_tensors=\"pt\").to(device)\ninput_ids = model_inputs.input_ids.to(device)\n\ngenerated_ids = model.generate(\n    input_ids,\n    max_new_tokens=512,\n)\n\ngenerated_ids = [\n    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)\n]\nresponse = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]\nprint(response)\n```\n\n# License\n\nSailor2 is distributed under the terms of the Apache License 2.0. \nNo restrict on the research and the commercial use.\n\n## Citation\n\nIf you find Sailor2 useful, please cite our work as follows:\n\n```\n@article{sailor2report,\n  title  = {Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLM},\n  author = {Longxu Dou and Qian Liu and Fan Zhou and Changyu Chen and Zili Wang and Ziqi Jin and Zichen Liu and Tongyao Zhu and Cunxiao Du and Penghui Yang and Haonan Wang and Jiaheng Liu and Yongchi Zhao and Xiachong Feng and Xin Mao and Man Tsung Yeung and Kunat Pipatanakul and Fajri Koto and Min Si Thu and Hynek Kydl{\\'\\i}{\\v{c}}ek and Zeyi Liu and Qunshu Lin and Sittipong Sripaisarnmongkol and Kridtaphad Sae-Khow and Nirattisai Thongchim and Taechawat Konkaew and Narong Borijindargoon and Anh Dao and Matichon Maneegard and Phakphum Artkaew and Zheng-Xin Yong and Quan Nguyen and Wannaphong Phatthiyaphaibun and Hoang H. Tran and Mike Zhang and Shiqi Chen and Tianyu Pang and Chao Du and Xinyi Wan and Wei Lu and Min Lin},\n  journal={arXiv preprint arXiv:2502.12982},\n  year   = {2025}\n}\n```\n\n# Contact Us\n\nIf you have any questions, please raise an issue or contact us at [doulx@sea.com](mailto:doulx@sea.com) or [liuqian.sea@gmail.com](mailto:liuqian.sea@gmail.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsail-sg%2Fsailor2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsail-sg%2Fsailor2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsail-sg%2Fsailor2/lists"}