Commit
·
9f0ab4a
1
Parent(s):
fe94c77
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
A very capable chat model built on top of the new Mistral MoE model, trained on the SlimOrca dataset for 1 epoch, using QLoRA.
|
| 2 |
+
|
| 3 |
+
Inference:
|
| 4 |
+
```
|
| 5 |
+
import torch
|
| 6 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 7 |
+
|
| 8 |
+
model = AutoModelForCausalLM.from_pretrained("mattshumer/mistral-8x7b-chat", low_cpu_mem_usage=True, device_map="auto", trust_remote_code=True)
|
| 9 |
+
tok = AutoTokenizer.from_pretrained("mattshumer/mistral-8x7b-chat")
|
| 10 |
+
x = tok.encode(PROMPT_GOES_HERE, return_tensors="pt").cuda()
|
| 11 |
+
x = model.generate(x, max_new_tokens=512).cpu()
|
| 12 |
+
print(tok.batch_decode(x))
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
Prompt Template:
|
| 16 |
+
```
|
| 17 |
+
<|im_start|>system
|
| 18 |
+
You are an AI assistant.<|im_end|>
|
| 19 |
+
<|im_start|>user
|
| 20 |
+
Hi, how are you?<|im_end|>
|
| 21 |
+
<|im_start|>assistant
|
| 22 |
+
I'm doing well, thanks for asking!<|im_end|>
|
| 23 |
+
<|im_start|>user
|
| 24 |
+
Write me a poem about AI.<|im_end|>
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
Trained w/ Axolotl on 6x H100s for nine hours.
|