语言:
- 英语
- 中文
- 印尼语
- 泰语
- 越南语
- 马来语
- 老挝语
- 缅甸语
- 爪哇语
- 高棉语
- 巽他语
- 他加禄语
标签:
- 多语言
- 东南亚
- 航海家
- 监督微调
- 对话
- 指令
示例窗口:
- 文本: 如何制作烤鱼?
示例标题: 中文
- 文本: How to bake fish?
示例标题: 英文
- 文本: Bagaimana cara memanggang ikan?
示例标题: 马来语
- 文本: วิธีย่างปลา?
示例标题: 泰语
- 文本: Bagaimana membuat bakaran ikan?
示例标题: 印尼语
- 文本: Làm thế nào để nướng cá?
示例标题: 越南语
许可证: Apache-2.0
基础模型:
- sail/Sailor2-L-8B
库名称: transformers
管道标签: 文本生成

QuantFactory/Sailor2-L-8B-Chat-GGUF
这是使用llama.cpp对sail/Sailor2-L-8B-Chat进行量化后的版本
原始模型卡片
标志由MidJourney生成
Sailor2是一项社区驱动的倡议,旨在为东南亚(SEA)带来尖端的多语言模型。我们的研究表明,生产环境中对8B和20B参数规模的模型有强烈需求,同时1B模型适用于专业应用,如推测解码和研究目的。这些模型以Apache 2.0许可证发布,为该地区提供了更先进的语言技术访问途径。
Sailor2基于出色的多语言模型Qwen 2.5构建,并通过500B tokens的持续预训练,以统一模型更好地支持15种语言。这些语言包括英语、中文、缅甸语、宿务语、伊洛卡诺语、印尼语、爪哇语、高棉语、老挝语、马来语、巽他语、他加禄语、泰语、越南语和瓦赖语。通过满足对多样化、稳健且可访问的语言模型日益增长的需求,Sailor2旨在为东南亚地区服务不足的群体提供开放、包容和可访问的多语言大模型。Sailor2模型提供三种规模:1B、8B和20B,分别从Qwen2.5基础模型的0.5B、7B和14B扩展而来。
模型概述
训练详情
在开发过程中,我们采用了一系列先进技术以确保顶级性能和效率:
- 模型扩展
- 优化的数据混合策略
- 多阶段预训练协议
- 高级多语言后训练
更多训练细节请参考Sailor2博客。
要求
Sailor2的代码已集成至最新版Hugging Face transformers,建议安装transformers==4.46.3
。
快速开始
以下代码片段展示了如何加载分词器和模型,并生成内容。
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model = AutoModelForCausalLM.from_pretrained(
'sail/Sailor2-20B-Chat',
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained('sail/Sailor2-20B-Chat')
system_prompt= \
'你是一个名为Sailor2的AI助手,由Sea AI Lab创建。\
作为AI助手,你可以用英语、中文和东南亚语言回答问题,\
如缅甸语、宿务语、伊洛卡诺语、印尼语、爪哇语、高棉语、老挝语、马来语、巽他语、他加禄语、泰语、越南语和瓦赖语。\
你的回答应友好、无偏见、信息丰富、详细且忠实。'
prompt = "Beri saya pengenalan singkat tentang model bahasa besar."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
input_ids = model_inputs.input_ids.to(device)
generated_ids = model.generate(
input_ids,
max_new_tokens=512,
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
许可证
Sailor2依据Apache License 2.0条款分发。对研究和商业使用无限制。
引用
如果您认为Sailor2有用,请按以下方式引用我们的工作:
@article{sailor2report,
title = {Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLM},
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},
journal={arXiv preprint arXiv:2502.12982},
year = {2025}
}
联系我们
如有任何问题,请提交issue或通过doulx@sea.com或liuqian.sea@gmail.com联系我们。