Matheusuz commited on
Commit
8cf59b6
·
verified ·
1 Parent(s): a339543

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ inference: false
4
+ ---
5
+ **Sailor 1.8B AWQ**
6
+
7
+ - Model creator: Sea AI Lab
8
+ - Original model: Sailor 1.8B
9
+
10
+ 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. Developed with careful data curation, Sailor models are designed to understand and generate text across diverse linguistic landscapes of SEA region. Built from Qwen 1.5 , Sailor encompasses models of varying sizes, spanning from 0.5B to 7B versions for different requirements. We further fine-tune the base model with open-source datasets to get instruction-tuned models, namedly Sailor-Chat. Benchmarking results demonstrate Sailor's proficiency in tasks such as question answering, commonsense reasoning, and other tasks in SEA languages.
11
+
12
+ **Description**
13
+
14
+ This repo contain AWQ format model files for Sailor Sailor 1.8B.
15
+
16
+ **Prompt Format**
17
+
18
+ ```
19
+ prompt_template = "{prompt}"
20
+ ```
21
+
22
+ **Quickstart**
23
+
24
+ Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
25
+
26
+ - Using transformers
27
+
28
+ ```
29
+ from transformers import AutoModelForCausalLM, AutoTokenizer
30
+
31
+ model_name = "Matheusuz/Sailor-1.8B-AWQ"
32
+
33
+ # Model
34
+ model = AutoModelForCausalLM.from_pretrained(
35
+ model_name,
36
+ low_cpu_mem_usage=True,
37
+ device_map="cuda:0"
38
+ )
39
+
40
+ # Tokenizer
41
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
42
+
43
+ # Prompt template
44
+ prompt_template = "Artificial intelligence is"
45
+
46
+ # Convert prompt to tokens
47
+ tokens = tokenizer(
48
+ prompt_template,
49
+ return_tensors='pt'
50
+ ).input_ids.cuda()
51
+
52
+ # Model parameters
53
+ generation_params = {
54
+ "do_sample": True,
55
+ "temperature": 0.7,
56
+ "top_p": 0.95,
57
+ "top_k": 40,
58
+ "max_new_tokens": 512,
59
+ "repetition_penalty": 1.1
60
+ }
61
+
62
+ # Generation
63
+ generation_output = model.generate(
64
+ tokens,
65
+ **generation_params
66
+ )
67
+
68
+ # Get the tokens from the output, decode them, print them
69
+ token_output = generation_output[0]
70
+ text_output = tokenizer.decode(token_output)
71
+ print(text_output)
72
+ ```
73
+
74
+ **License**
75
+
76
+ Sailor is distributed under the terms of the Qwen License.