RichardErkhov commited on
Commit
cd46111
·
verified ·
1 Parent(s): 4cf4ab8

uploaded readme

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