Text Generation
Transformers
Safetensors
jamba
conversational
custom_code
Inference Endpoints
ptrdvn commited on
Commit
ba4cd78
โ€ข
1 Parent(s): a7f702a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -3
README.md CHANGED
@@ -3,13 +3,45 @@ library_name: transformers
3
  tags: []
4
  ---
5
 
6
- # Model Card for Model ID
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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