Update README.md
Browse files
README.md
CHANGED
@@ -3,13 +3,45 @@ library_name: transformers
|
|
3 |
tags: []
|
4 |
---
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
10 |
|
11 |
|
12 |
-
## Model Details
|
13 |
|
14 |
### Model Description
|
15 |
|
|
|
3 |
tags: []
|
4 |
---
|
5 |
|
6 |
+
Jamba Instruct (multilingual)
|
7 |
+
|
8 |
+
## Model Details
|
9 |
+
|
10 |
+
This model was trained as a small-scale experiment to determine how easy it is to fine-tune ai21labs' Jamba v0.1 to work as a chatbot.
|
11 |
+
|
12 |
+
The aim of this experiment was to find how intelligently and reliably Jamba can chat in both English and other languages if only finetuned for a few hours.
|
13 |
+
|
14 |
+
Initial subjective testing has shown that this model can chat reasonably well in both English and Japanese, so feel free to give it a try!
|
15 |
+
|
16 |
+
### How to use
|
17 |
+
|
18 |
+
```python
|
19 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
20 |
+
|
21 |
+
model = AutoModelForCausalLM.from_pretrained("kinokokoro/jamba_airoboros3.2_sharegpt4",
|
22 |
+
trust_remote_code=True)
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("kinokokoro/jamba_airoboros3.2_sharegpt4")
|
24 |
+
|
25 |
+
input_text = """<|im_start|>system
|
26 |
+
You are GPT-4, a helpful assistant.
|
27 |
+
<|im_end|>
|
28 |
+
<|im_start|>user
|
29 |
+
ๆ่ฟใ้ๅใใใฐใใใใซใใฃใกใใใฃใกใๆฑใใใกใใใใ ใใฉใใฉใใใใใใใงใใ๏ผ
|
30 |
+
<|im_end|>
|
31 |
+
<|im_start|>assistant
|
32 |
+
"""
|
33 |
+
|
34 |
+
input_ids = tokenizer(input_text, return_tensors='pt').to(model.device)["input_ids"]
|
35 |
+
|
36 |
+
outputs = model.generate(input_ids, max_new_tokens=256, temperature=0.0)\
|
37 |
+
|
38 |
+
print(tokenizer.batch_decode([outputs[0][len(input_ids[0]):]]))
|
39 |
+
# ['ๆฑใๅบใใใจใฏใ้ๅใใใใจใใซไฝๆธฉใไธใใใไฝๅ
ใฎ็ฑใๅค้จใซๆพๅบใใใใใฎ่ช็ถใชใกใซใใบใ ใงใใๆฑใๅบใใใจใๅคใใใจใฏใไธ่ฌ็ใซใฏใไฝใฎๆธฉๅบฆ่ชฟ็ฏๆฉ่ฝใๅใใฆใใใใจใๆๅณใใพใใใใใใๆฑใๅบใใใจใๅคใใใใจใไธๅฟซๆใๆฑ็ใชใฉใฎๅ้กใ็บ็ใใใใจใใใใพใใไปฅไธใซใๆฑใๅบใใใจใๅคใๅ ดๅใฎๅฏพ็ญใ็ดนไปใใพใใ\n\n1. ้ฉๅใชๆ่ฃ
ใ้ธใถ: ๆฑใๅบใใใจใๅคใๅ ดๅใ่ปฝ้ใง้ๆนฟๆงใฎ้ซใๆใ้ธใถใใจใ้่ฆใงใใใใใซใใใๆฑใไฝใใๅค้จใซ๏ฟฝ']
|
40 |
+
```
|
41 |
|
|
|
42 |
|
43 |
|
44 |
|
|
|
45 |
|
46 |
### Model Description
|
47 |
|