beiweixiaoxu commited on
Commit
4ef41f8
·
verified ·
1 Parent(s): 544f971

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -9,14 +9,15 @@ base_model:
9
  The CultureSPA model from https://github.com/shaoyangxu/CultureSPA
10
 
11
  ```
12
- # load
13
  device = torch.device("cuda")
14
  tokenizer = AutoTokenizer.from_pretrained(model_path)
15
  model = AutoModelForCausalLM.from_pretrained(
16
  model_path,
17
  torch_dtype=torch.bfloat16
18
- )
19
- # inference
 
20
  messages = [
21
  {"role": "system", "content": system_prompt},
22
  {"role": "user", "content": instruction},
 
9
  The CultureSPA model from https://github.com/shaoyangxu/CultureSPA
10
 
11
  ```
12
+ ## load
13
  device = torch.device("cuda")
14
  tokenizer = AutoTokenizer.from_pretrained(model_path)
15
  model = AutoModelForCausalLM.from_pretrained(
16
  model_path,
17
  torch_dtype=torch.bfloat16
18
+ ).to(device)
19
+
20
+ ## inference
21
  messages = [
22
  {"role": "system", "content": system_prompt},
23
  {"role": "user", "content": instruction},