francislabounty commited on
Commit
b9a9488
1 Parent(s): 0515869

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -1
README.md CHANGED
@@ -3,6 +3,10 @@ license: apache-2.0
3
  datasets:
4
  - Open-Orca/SlimOrca
5
  ---
 
 
 
 
6
  ## Usage
7
  ```python
8
  from transformers import AutoModelForCausalLM, AutoTokenizer
@@ -10,7 +14,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
10
  tokenizer = AutoTokenizer.from_pretrained("serpdotai/sparsetral-16x7B-v1", trust_remote_code=True)
11
  model = AutoModelForCausalLM.from_pretrained("serpdotai/sparsetral-16x7B-v1", device_map="auto", trust_remote_code=True).eval()
12
 
13
- inputs = tokenizer('### Human:\nHow are you?\n### Assistant:\n', return_tensors='pt')
14
  inputs = inputs.to(model.device)
15
  pred = model.generate(**inputs)
16
  print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
 
3
  datasets:
4
  - Open-Orca/SlimOrca
5
  ---
6
+ prompt format
7
+ ```
8
+ ### System:\n{system}\n### Human:\n{user}\n### Assistant:\n"
9
+ ```
10
  ## Usage
11
  ```python
12
  from transformers import AutoModelForCausalLM, AutoTokenizer
 
14
  tokenizer = AutoTokenizer.from_pretrained("serpdotai/sparsetral-16x7B-v1", trust_remote_code=True)
15
  model = AutoModelForCausalLM.from_pretrained("serpdotai/sparsetral-16x7B-v1", device_map="auto", trust_remote_code=True).eval()
16
 
17
+ inputs = tokenizer('### System:\n\n### Human:\nHow are you?\n### Assistant:\n', return_tensors='pt')
18
  inputs = inputs.to(model.device)
19
  pred = model.generate(**inputs)
20
  print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))