duyntnet commited on
Commit
97a762e
1 Parent(s): ffde515

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ inference: false
7
+ tags:
8
+ - transformers
9
+ - gguf
10
+ - imatrix
11
+ - SOLAR-10.7B-Instruct-v1.0
12
+ ---
13
+ Quantizations of https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0
14
+
15
+ # From original readme
16
+
17
+ # **Usage Instructions**
18
+
19
+ This model has been fine-tuned primarily for single-turn conversation, making it less suitable for multi-turn conversations such as chat.
20
+
21
+ ### **Version**
22
+
23
+ Make sure you have the correct version of the transformers library installed:
24
+
25
+ ```sh
26
+ pip install transformers==4.35.2
27
+ ```
28
+
29
+ ### **Loading the Model**
30
+
31
+ Use the following Python code to load the model:
32
+
33
+ ```python
34
+ import torch
35
+ from transformers import AutoModelForCausalLM, AutoTokenizer
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("Upstage/SOLAR-10.7B-Instruct-v1.0")
38
+ model = AutoModelForCausalLM.from_pretrained(
39
+ "Upstage/SOLAR-10.7B-Instruct-v1.0",
40
+ device_map="auto",
41
+ torch_dtype=torch.float16,
42
+ )
43
+ ```
44
+
45
+ ### **Conducting Single-Turn Conversation**
46
+
47
+ ```python
48
+ conversation = [ {'role': 'user', 'content': 'Hello?'} ]
49
+
50
+ prompt = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
51
+
52
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
53
+ outputs = model.generate(**inputs, use_cache=True, max_length=4096)
54
+ output_text = tokenizer.decode(outputs[0])
55
+ print(output_text)
56
+ ```
57
+
58
+ Below is an example of the output.
59
+ ```
60
+ <s> ### User:
61
+ Hello?
62
+
63
+ ### Assistant:
64
+ Hello, how can I assist you today? Please feel free to ask any questions or request help with a specific task.</s>
65
+ ```