Severian commited on
Commit
52ab766
1 Parent(s): 041c2f1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -9
README.md CHANGED
@@ -17,21 +17,72 @@ pipeline_tag: text-generation
17
  ---
18
  # New training underway! Thanks to the generous insights provided by **lightblue/Jamba-v0.1-chat-multilingual**, the new training is going much better. We should hopefully have a decently trained Jamaba-Open-Hermes model for general use and experimentation.
19
 
20
- *There's been limited testing so no example outputs yet*
21
 
22
- ---
23
- ## Training
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- ### Open-Hermes-2.0 (Only first 1500 examples): **[ 1530/125193 4:46:45 < 386:48:08, 0.09 it/s, Epoch 0.01/1]**
27
 
28
- **Notes:**
 
 
 
 
29
 
30
- - Tried over 30+ combinations of hyperparameters. Below are the best I could land on.
31
 
32
- - Loss hovered around ~5-6 no matter what I tried with the learning rate.
33
-
34
- - Couldn't increase batch size due to Colab limitations, so the answer may lie somewhere in a perfect balance of Lr and Batch Size.
35
 
36
 
37
  ### Hyperparameters
 
17
  ---
18
  # New training underway! Thanks to the generous insights provided by **lightblue/Jamba-v0.1-chat-multilingual**, the new training is going much better. We should hopefully have a decently trained Jamaba-Open-Hermes model for general use and experimentation.
19
 
20
+ # *It works! Use at your own risk though*
21
 
22
+ ## Example Output:
23
+
24
+ ```
25
+ <|startoftext|><|im_start|>system
26
+ You are a helpful AI assistant.
27
+ <|im_end|>
28
+ <|im_start|>user
29
+ A tree needs to leave the earth and become astro-biological. How can it achieve it's goal?
30
+ <|im_end|>
31
+ <|im_start|>assistant
32
+ The process of becoming astronautic life for a tree is an excemtally complicated one that requires a great deal of preparation, coordination, and funding. The first step in this process is for the tree to be identified as a potential candidate for astronautics, which may involve a thorough assessment of its size, health, and suitability for space travel.
33
+ Once a tree has been identified as a possible astronautic life-form, the next step involves preparing it for spaceflight. This includes training the tree to tolerate low gravity environments, teaching it how to navigate in zero gravity, and ensuring that its nutritional needs are met in space. The process of acclimating a tree to spaceflight can take months or even years, depending on the species and the specific requirements of each mission.
34
+ Once the tree has been adequately trained and prepared for spaceflight, it must then be transported into orbit or beyond. This may involve launching the tree aboard a rocket or shuttle, or using other methods such as balloons or parachutes to reach its destination. The journey itself can be long and arduous, with many potential risks and challenges along the way.
35
+ Upon arrival in space, the tree will need to be monitored closely and cared for by astronautic personnel. This may involve feeding the tree, maintaining its health and well-being, and ensuring that it has enough water and nutrients to survive. The tree may also need to be protected from radiation, extreme temperatures, or other hazards that it may face in space.
36
+ Over time, as the tree adapts to life in space, it will likely undergo some changes in its physical appearance and behavior. For example, it may begin growing in new ways, developing different kinds of leaves or branches in response to the unique environment it finds itself in. It may also become more active and mobile, using its roots to navigate and explore its new home.
37
+ Throughout this process, there are many challenges that need to be addressed and overcome.<|im_end|>
38
+ <|endoftext|>
39
+ ```
40
+
41
+ ```py
42
+
43
+ !pip install -qqq transformers>=4.39.0 mamba-ssm causal-conv1d>=1.2.0 accelerate bitsandbytes --progress-bar off
44
+ !pip install flash-attn --no-build-isolation
45
+
46
+ import torch
47
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
48
 
49
+ double_quant_config = BitsAndBytesConfig(
50
+ load_in_4bit=True,
51
+ bnb_4bit_use_double_quant=True,
52
+ bnb_4bit_compute_dtype=torch.float16
53
+ )
54
+
55
+ model = AutoModelForCausalLM.from_pretrained(
56
+ "Severian/Jamba-Nexus-IKM-v1",
57
+ device_map="auto",
58
+ trust_remote_code=True,
59
+ torch_dtype=torch.bfloat16,
60
+ attn_implementation="flash_attention_2",
61
+ quantization_config=double_quant_config,
62
+ )
63
+ tokenizer = AutoTokenizer.from_pretrained("Severian/Jamba-Nexus-IKM-v1")
64
+
65
+ input_text = """<|im_start|>system
66
+ You are a helpful AI assistant.
67
+ <|im_end|>
68
+ <|im_start|>user
69
+ A tree needs to leave the earth and become astro-biological. How can it achieve it's goal?
70
+ <|im_end|>
71
+ <|im_start|>assistant
72
+ """
73
+
74
+ input_ids = tokenizer(input_text, return_tensors='pt').to(model.device)["input_ids"]
75
 
76
+ outputs = model.generate(input_ids, max_new_tokens=1024, temperature=0.0, repetition_penalty=1.1)
77
 
78
+ print(tokenizer.batch_decode(outputs)[0])
79
+ ```
80
+
81
+ ---
82
+ ## Training
83
 
 
84
 
85
+ ### **Open-Hermes-2.0**
 
 
86
 
87
 
88
  ### Hyperparameters