RichardErkhov
commited on
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
Sailor-0.5B-Chat - GGUF
|
11 |
+
- Model creator: https://huggingface.co/sail/
|
12 |
+
- Original model: https://huggingface.co/sail/Sailor-0.5B-Chat/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [Sailor-0.5B-Chat.Q2_K.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q2_K.gguf) | Q2_K | 0.28GB |
|
18 |
+
| [Sailor-0.5B-Chat.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.IQ3_XS.gguf) | IQ3_XS | 0.3GB |
|
19 |
+
| [Sailor-0.5B-Chat.IQ3_S.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.IQ3_S.gguf) | IQ3_S | 0.31GB |
|
20 |
+
| [Sailor-0.5B-Chat.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q3_K_S.gguf) | Q3_K_S | 0.31GB |
|
21 |
+
| [Sailor-0.5B-Chat.IQ3_M.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.IQ3_M.gguf) | IQ3_M | 0.32GB |
|
22 |
+
| [Sailor-0.5B-Chat.Q3_K.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q3_K.gguf) | Q3_K | 0.33GB |
|
23 |
+
| [Sailor-0.5B-Chat.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q3_K_M.gguf) | Q3_K_M | 0.33GB |
|
24 |
+
| [Sailor-0.5B-Chat.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q3_K_L.gguf) | Q3_K_L | 0.34GB |
|
25 |
+
| [Sailor-0.5B-Chat.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.IQ4_XS.gguf) | IQ4_XS | 0.36GB |
|
26 |
+
| [Sailor-0.5B-Chat.Q4_0.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q4_0.gguf) | Q4_0 | 0.37GB |
|
27 |
+
| [Sailor-0.5B-Chat.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.IQ4_NL.gguf) | IQ4_NL | 0.37GB |
|
28 |
+
| [Sailor-0.5B-Chat.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q4_K_S.gguf) | Q4_K_S | 0.37GB |
|
29 |
+
| [Sailor-0.5B-Chat.Q4_K.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q4_K.gguf) | Q4_K | 0.38GB |
|
30 |
+
| [Sailor-0.5B-Chat.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q4_K_M.gguf) | Q4_K_M | 0.38GB |
|
31 |
+
| [Sailor-0.5B-Chat.Q4_1.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q4_1.gguf) | Q4_1 | 0.39GB |
|
32 |
+
| [Sailor-0.5B-Chat.Q5_0.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q5_0.gguf) | Q5_0 | 0.42GB |
|
33 |
+
| [Sailor-0.5B-Chat.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q5_K_S.gguf) | Q5_K_S | 0.42GB |
|
34 |
+
| [Sailor-0.5B-Chat.Q5_K.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q5_K.gguf) | Q5_K | 0.43GB |
|
35 |
+
| [Sailor-0.5B-Chat.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q5_K_M.gguf) | Q5_K_M | 0.43GB |
|
36 |
+
| [Sailor-0.5B-Chat.Q5_1.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q5_1.gguf) | Q5_1 | 0.45GB |
|
37 |
+
| [Sailor-0.5B-Chat.Q6_K.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q6_K.gguf) | Q6_K | 0.48GB |
|
38 |
+
| [Sailor-0.5B-Chat.Q8_0.gguf](https://huggingface.co/RichardErkhov/sail_-_Sailor-0.5B-Chat-gguf/blob/main/Sailor-0.5B-Chat.Q8_0.gguf) | Q8_0 | 0.62GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
language:
|
46 |
+
- en
|
47 |
+
- zh
|
48 |
+
- id
|
49 |
+
- th
|
50 |
+
- vi
|
51 |
+
- ms
|
52 |
+
- lo
|
53 |
+
datasets:
|
54 |
+
- CohereForAI/aya_dataset
|
55 |
+
- CohereForAI/aya_collection
|
56 |
+
- Open-Orca/OpenOrca
|
57 |
+
tags:
|
58 |
+
- multilingual
|
59 |
+
- sea
|
60 |
+
- sailor
|
61 |
+
- sft
|
62 |
+
- chat
|
63 |
+
- instruction
|
64 |
+
widget:
|
65 |
+
- text: "如何制作烤鱼?"
|
66 |
+
example_title: "Chinese"
|
67 |
+
- text: "How to bake fish?"
|
68 |
+
example_title: "English"
|
69 |
+
- text: "Bagaimana cara memanggang ikan?"
|
70 |
+
example_title: "Malay"
|
71 |
+
- text: "วิธีย่างปลา?"
|
72 |
+
example_title: "Thai"
|
73 |
+
- text: "Bagaimana membuat bakaran ikan?"
|
74 |
+
example_title: "Indonesian"
|
75 |
+
- text: "Làm thế nào để nướng cá?"
|
76 |
+
example_title: "Vietnamese"
|
77 |
+
|
78 |
+
license: apache-2.0
|
79 |
+
base_model: sail/Sailor-0.5B
|
80 |
+
inference: false
|
81 |
+
---
|
82 |
+
|
83 |
+
<div align="center">
|
84 |
+
<img src="banner_sailor.jpg" width="700"/>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
Sailor is a suite of Open Language Models tailored for South-East Asia (SEA), focusing on languages such as 🇮🇩Indonesian, 🇹🇭Thai, 🇻🇳Vietnamese, 🇲🇾Malay, and 🇱🇦Lao.
|
88 |
+
Developed with careful data curation, Sailor models are designed to understand and generate text across diverse linguistic landscapes of SEA region.
|
89 |
+
Built from [Qwen 1.5](https://huggingface.co/collections/Qwen/qwen15-65c0a2f577b1ecb76d786524) , Sailor encompasses models of varying sizes, spanning from 0.5B to 7B versions for different requirements.
|
90 |
+
We further fine-tune the base model with open-source datasets to get instruction-tuned models, namedly Sailor-Chat.
|
91 |
+
Benchmarking results demonstrate Sailor's proficiency in tasks such as question answering, commonsense reasoning, and other tasks in SEA languages.
|
92 |
+
|
93 |
+
> The logo was generated by MidJourney
|
94 |
+
|
95 |
+
## Model Summary
|
96 |
+
- **Model Collections:** [Base Model & Chat Model](https://huggingface.co/collections/sail/sailor-65e19a749f978976f1959825)
|
97 |
+
- **Project Website:** [sailorllm.github.io](https://sailorllm.github.io/)
|
98 |
+
- **Codebase:** [github.com/sail-sg/sailor-llm](https://github.com/sail-sg/sailor-llm)
|
99 |
+
- **Technical Report:** [arxiv.org/pdf/2404.03608.pdf](https://arxiv.org/pdf/2404.03608.pdf)
|
100 |
+
|
101 |
+
|
102 |
+
## Training details
|
103 |
+
Sailor is crafted by continually pre-training from language models like the remarkable Qwen 1.5 models, which already has a great performance on SEA languages.
|
104 |
+
The pre-training corpus heavily leverages the publicly available corpus, including
|
105 |
+
[SlimPajama](https://huggingface.co/datasets/cerebras/SlimPajama-627B),
|
106 |
+
[SkyPile](https://huggingface.co/datasets/Skywork/SkyPile-150B),
|
107 |
+
[CC100](https://huggingface.co/datasets/cc100) and [MADLAD-400](https://huggingface.co/datasets/allenai/MADLAD-400).
|
108 |
+
The instruction tuning corpus are all publicly available including
|
109 |
+
[aya_collection](https://huggingface.co/datasets/CohereForAI/aya_collection),
|
110 |
+
[aya_dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset),
|
111 |
+
[OpenOrca](https://huggingface.co/datasets/Open-Orca/OpenOrca).
|
112 |
+
|
113 |
+
By employing aggressive data deduplication and careful data cleaning on the collected corpus, we have attained a high-quality dataset spanning various languages.
|
114 |
+
Through systematic experiments to determine the weights of different languages, Sailor models undergo training from 200B to 400B tokens, tailored to different model sizes.
|
115 |
+
The approach boosts their performance on SEA languages while maintaining proficiency in English and Chinese without significant compromise.
|
116 |
+
Finally, we continually pre-train the Qwen1.5-0.5B model with 400 Billion tokens, and other models with 200 Billion tokens to obtain the Sailor models.
|
117 |
+
|
118 |
+
## Requirements
|
119 |
+
The code of Sailor has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`.
|
120 |
+
|
121 |
+
## Quickstart
|
122 |
+
|
123 |
+
Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
|
124 |
+
|
125 |
+
```python
|
126 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
127 |
+
device = "cuda"
|
128 |
+
|
129 |
+
model = AutoModelForCausalLM.from_pretrained(
|
130 |
+
'sail/Sailor-0.5B-Chat',
|
131 |
+
torch_dtype="auto",
|
132 |
+
device_map="auto"
|
133 |
+
)
|
134 |
+
|
135 |
+
tokenizer = AutoTokenizer.from_pretrained('sail/Sailor-0.5B-Chat')
|
136 |
+
system_prompt= 'You are a helpful assistant'
|
137 |
+
|
138 |
+
prompt = "Beri saya pengenalan singkat tentang model bahasa besar."
|
139 |
+
# 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."
|
140 |
+
# prompt = "ให้ฉันแนะนำสั้น ๆ เกี่ยวกับโมเดลภาษาขนาดใหญ่"
|
141 |
+
|
142 |
+
messages = [
|
143 |
+
{"role": "system", "content": system_prompt},
|
144 |
+
{"role": "question", "content": prompt}
|
145 |
+
]
|
146 |
+
text = tokenizer.apply_chat_template(
|
147 |
+
messages,
|
148 |
+
tokenize=False,
|
149 |
+
add_generation_prompt=True
|
150 |
+
)
|
151 |
+
|
152 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
153 |
+
input_ids = model_inputs.input_ids.to(device)
|
154 |
+
|
155 |
+
generated_ids = model.generate(
|
156 |
+
input_ids,
|
157 |
+
max_new_tokens=512,
|
158 |
+
)
|
159 |
+
|
160 |
+
generated_ids = [
|
161 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
162 |
+
]
|
163 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
164 |
+
print(response)
|
165 |
+
```
|
166 |
+
|
167 |
+
# License
|
168 |
+
|
169 |
+
Sailor is distributed under the terms of the Apache License 2.0.
|
170 |
+
No restrict on the research and the commercial use, but should comply with the [Qwen License](https://huggingface.co/Qwen/Qwen1.5-1.8B/blob/main/LICENSE).
|
171 |
+
|
172 |
+
## Citation
|
173 |
+
|
174 |
+
If you find sailor useful, please cite our work as follows:
|
175 |
+
|
176 |
+
```
|
177 |
+
@misc{dou2024sailor,
|
178 |
+
title={Sailor: Open Language Models for South-East Asia},
|
179 |
+
author={Longxu Dou and Qian Liu and Guangtao Zeng and Jia Guo and Jiahui Zhou and Wei Lu and Min Lin},
|
180 |
+
year={2024},
|
181 |
+
eprint={2404.03608},
|
182 |
+
archivePrefix={arXiv},
|
183 |
+
primaryClass={cs.CL}
|
184 |
+
}
|
185 |
+
```
|
186 |
+
|
187 |
+
# Contact Us
|
188 |
+
|
189 |
+
If you have any questions, please raise an issue or contact us at [[email protected]](mailto:[email protected]) or [[email protected]](mailto:[email protected]).
|
190 |
+
|