🚀 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á? |