francislabounty
commited on
Commit
•
0515869
1
Parent(s):
c4e9636
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- Open-Orca/SlimOrca
|
5 |
---
|
6 |
+
## Usage
|
7 |
+
```python
|
8 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
9 |
+
|
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))
|
17 |
+
# I am doing well, thank you.
|
18 |
+
```
|