Liangmingxin commited on
Commit
ab3b156
1 Parent(s): 22e6968

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -3
README.md CHANGED
@@ -3,8 +3,31 @@ license: apache-2.0
3
  ---
4
 
5
  Obtained from freecs/ThetaWave-7B after SFT fine tuning.
6
- ---
7
  Open-Orca/SlimOrca datasets were used.
8
- ---
9
  If the performance is better, more model details will be released...
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
 
5
  Obtained from freecs/ThetaWave-7B after SFT fine tuning.
6
+
7
  Open-Orca/SlimOrca datasets were used.
8
+
9
  If the performance is better, more model details will be released...
10
+
11
+
12
+ Try it:
13
+ ```
14
+ from transformers import AutoModelForCausalLM, AutoTokenizer
15
+
16
+ device = "cuda" # the device to load the model onto
17
+
18
+ model = AutoModelForCausalLM.from_pretrained("Liangmingxin/ThetaWave-7B-sft")
19
+ tokenizer = AutoTokenizer.from_pretrained("Liangmingxin/ThetaWave-7B-sft")
20
+
21
+ messages = [
22
+ {"role": "user", "content": "Who are you?"},
23
+ ]
24
+
25
+ encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
26
+
27
+ model_inputs = encodeds.to(device)
28
+ model.to(device)
29
+
30
+ generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
31
+ decoded = tokenizer.batch_decode(generated_ids)
32
+ print(decoded[0])
33
+ ```