🚀 QuantFactory/Sailor2-L-8B-Chat-GGUF
这是使用llama.cpp创建的sail/Sailor2-L-8B-Chat的量化版本,旨在为用户提供更高效、便捷的多语言处理体验。

该标志由MidJourney生成
🚀 快速开始
这里提供了一个代码片段,展示如何加载分词器和模型,以及如何生成内容。
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= \
'You are an AI assistant named Sailor2, created by Sea AI Lab. \
As an AI assistant, you can answer questions in English, Chinese, and Southeast Asian languages \
such as Burmese, Cebuano, Ilocano, Indonesian, Javanese, Khmer, Lao, Malay, Sundanese, Tagalog, Thai, Vietnamese, and Waray. \
Your responses should be friendly, unbiased, informative, detailed, and faithful.'
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)
✨ 主要特性
- 多语言支持:支持英语、中文、缅甸语、宿务语、伊洛卡诺语、印尼语、爪哇语、高棉语、老挝语、马来语、巽他语、他加禄语、泰语、越南语和瓦雷语等15种语言。
- 社区驱动:由社区驱动的项目,致力于为东南亚地区提供先进的多语言语言模型。
- 模型扩展:提供1B、8B和20B三种不同规模的模型,满足不同场景的需求。
📦 安装指南
Sailor2的代码已集成在最新的Hugging face transformers中,建议安装transformers==4.46.3
。
📚 详细文档
模型概述
训练详情
在开发过程中,我们采用了一系列先进技术,以确保顶级的性能和效率:
- 模型扩展
- 优化的数据混合策略
- 多阶段预训练协议
- 先进的多语言后训练
更多训练详情请参考Sailor2博客。
🔧 技术细节
Sailor2基于出色的多语言模型Qwen 2.5构建,并在500B个标记上进行持续预训练,以更好地支持15种语言。该模型有1B、8B和20B三种规模,分别从Qwen2.5的0.5B、7B和14B基础模型扩展而来。
📄 许可证
Sailor2根据Apache许可证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}
}
📞 联系我们
如果您有任何问题,请提出问题或通过doulx@sea.com或liuqian.sea@gmail.com与我们联系。
📋 其他信息
属性 |
详情 |
支持语言 |
英语、中文、印尼语、泰语、越南语、马来语、老挝语、缅甸语、爪哇语、高棉语、巽他语、他加禄语 |
标签 |
多语言、东南亚、水手、SFT、聊天、指令 |
基础模型 |
sail/Sailor2-L-8B |
库名称 |
transformers |
任务类型 |
文本生成 |
示例
示例标题 |
文本内容 |
中文 |
如何制作烤鱼? |
英文 |
How to bake fish? |
马来语 |
Bagaimana cara memanggang ikan? |
泰语 |
วิธีย่างปลา? |
印尼语 |
Bagaimana membuat bakaran ikan? |
越南语 |
Làm thế nào để nướng cá? |