lucyknada commited on
Commit
d417fdc
1 Parent(s): 24e4273

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +197 -0
README.md ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ License: apache-2.0
3
+ Language:
4
+ - En
5
+ Pipeline_tag: text-generation
6
+ Base_model: 01-ai/Yi-1.5-34B-32K
7
+ Tags:
8
+ - Chat
9
+ ---
10
+
11
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/658a46cbfb9c2bdfae75b3a6/9yEmnTDG9bcC_bxwuDU6G.png)
12
+
13
+ This is the 9th in a series of models designed to replicate the prose quality of the Claude 3 models, specifically Sonnet and Opus.
14
+
15
+ This model is fine-tuned on top of [Yi-1.5-34 B-32 K](https://huggingface.co/01-ai/Yi-1.5-34B-32K).
16
+
17
+ ## Prompting
18
+ Model has been Instruct tuned with the ChatML formatting. A typical input would look like this:
19
+
20
+ ```py
21
+ """<|im_start|>system
22
+ system prompt<|im_end|>
23
+ <|im_start|>user
24
+ Hi there!<|im_end|>
25
+ <|im_start|>assistant
26
+ Nice to meet you!<|im_end|>
27
+ <|im_start|>user
28
+ Can I ask a question?<|im_end|>
29
+ <|im_start|>assistant
30
+ """
31
+ ```
32
+
33
+ ## SillyTavern templates
34
+
35
+ Below are Instruct and Context templates for use within SillyTavern.
36
+
37
+ In our testing a min_p of 0.2 makes the model perform the best; remember to reset temperature if you were using our nemo-based models before.
38
+
39
+ <details><summary>context template</summary>
40
+
41
+ ```yaml
42
+ {
43
+ "story_string": "<|im_start|>system\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}<|im_end|>\n",
44
+ "example_separator": "",
45
+ "chat_start": "",
46
+ "use_stop_strings": false,
47
+ "allow_jailbreak": false,
48
+ "always_force_name2": true,
49
+ "trim_sentences": false,
50
+ "include_newline": false,
51
+ "single_line": false,
52
+ "name": "Magnum ChatML"
53
+ }
54
+ ```
55
+
56
+ </details><br>
57
+ <details><summary>instruct template</summary>
58
+
59
+ ```yaml
60
+ {
61
+ "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
62
+ "input_sequence": "<|im_start|>user\n",
63
+ "output_sequence": "<|im_start|>assistant\n",
64
+ "last_output_sequence": "",
65
+ "system_sequence": "<|im_start|>system\n",
66
+ "stop_sequence": "<|im_end|>",
67
+ "wrap": false,
68
+ "macro": true,
69
+ "names": true,
70
+ "names_force_groups": true,
71
+ "activation_regex": "",
72
+ "system_sequence_prefix": "",
73
+ "system_sequence_suffix": "",
74
+ "first_output_sequence": "",
75
+ "skip_examples": false,
76
+ "output_suffix": "<|im_end|>\n",
77
+ "input_suffix": "<|im_end|>\n",
78
+ "system_suffix": "<|im_end|>\n",
79
+ "user_alignment_message": "",
80
+ "system_same_as_user": false,
81
+ "last_system_sequence": "",
82
+ "name": "Magnum ChatML"
83
+ }
84
+ ```
85
+
86
+ </details><br>
87
+
88
+ ## Axolotl config
89
+
90
+ <details><summary>See axolotl config</summary>
91
+
92
+ ```yaml
93
+ base_model: 01-ai/Yi-1.5-34B-32K
94
+ model_type: AutoModelForCausalLM
95
+ tokenizer_type: AutoTokenizer
96
+
97
+ #trust_remote_code: true
98
+
99
+ load_in_8bit: false
100
+ load_in_4bit: false
101
+ strict: false
102
+
103
+ datasets:
104
+ - path: anthracite-org/stheno-filtered-v1.1
105
+ type: sharegpt
106
+ conversation: chatml
107
+ - path: anthracite-org/kalo-opus-instruct-22k-no-refusal
108
+ type: sharegpt
109
+ conversation: chatml
110
+ - path: anthracite-org/nopm_claude_writing_fixed
111
+ type: sharegpt
112
+ conversation: chatml
113
+ - path: Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned
114
+ type: sharegpt
115
+ conversation: chatml
116
+ - path: Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned
117
+ type: sharegpt
118
+ conversation: chatml
119
+ chat_template: chatml
120
+ shuffle_merged_datasets: true
121
+ default_system_message: "You are an assistant that responds to the user."
122
+ dataset_prepared_path: magnum-v2-34b-1.5-data
123
+ val_set_size: 0.0
124
+ output_dir: ./magnum-v2-34b-32k-r1
125
+
126
+ sequence_len: 8192
127
+ sample_packing: true
128
+ eval_sample_packing: false
129
+ pad_to_sequence_len:
130
+
131
+ adapter:
132
+ lora_model_dir:
133
+ lora_r:
134
+ lora_alpha:
135
+ lora_dropout:
136
+ lora_target_linear:
137
+ lora_fan_in_fan_out:
138
+
139
+ wandb_project: magnum-v2-34b-1.5-32k
140
+ wandb_entity:
141
+ wandb_watch:
142
+ wandb_name: attempt-01
143
+ wandb_log_model:
144
+
145
+ gradient_accumulation_steps: 8
146
+ micro_batch_size: 1
147
+ num_epochs: 2
148
+ optimizer: paged_adamw_8bit
149
+ lr_scheduler: cosine
150
+ learning_rate: 0.000006
151
+
152
+ train_on_inputs: false
153
+ group_by_length: false
154
+ bf16: auto
155
+ fp16:
156
+ tf32: false
157
+
158
+ gradient_checkpointing: unsloth
159
+ early_stopping_patience:
160
+ resume_from_checkpoint:
161
+ local_rank:
162
+ logging_steps: 1
163
+ xformers_attention:
164
+ flash_attention: true
165
+
166
+ warmup_steps: 50
167
+ evals_per_epoch:
168
+ eval_table_size:
169
+ eval_max_new_tokens:
170
+ saves_per_epoch: 2
171
+ debug:
172
+ deepspeed: deepspeed_configs/zero3_bf16.json
173
+ weight_decay: 0.05
174
+ fsdp:
175
+ fsdp_config:
176
+ special_tokens:
177
+ ```
178
+ </details><br>
179
+
180
+ ## Credits
181
+ We'd like to thank Recursal / Featherless for sponsoring the compute for this train, Featherless has been hosting our Magnum models since the first 72 B and has given thousands of people access to our models and helped us grow.
182
+
183
+ We would also like to thank all members of Anthracite who made this finetune possible.
184
+
185
+ - [anthracite-org/Stheno-Data-Filtered](https://huggingface.co/datasets/anthracite-org/Stheno-Data-Filtered)
186
+ - [anthracite-org/kalo-opus-instruct-22k-no-refusal](https://huggingface.co/datasets/anthracite-org/kalo-opus-instruct-22k-no-refusal)
187
+ - [lodrick-the-lafted/NopmWritingStruct](https://huggingface.co/datasets/lodrick-the-lafted/NopmWritingStruct)
188
+ - [Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned](https://huggingface.co/datasets/Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned)
189
+ - [Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned](https://huggingface.co/datasets/Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned)
190
+
191
+ ## Training
192
+ The training was done for 2 epochs. We used 8x[H100s](https://www.nvidia.com/en-us/data-center/h100/) GPUs graciously provided by [Recursal AI](https://recursal.ai/) / [Featherless AI](https://featherless.ai/) for the full-parameter fine-tuning of the model.
193
+
194
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
195
+
196
+ ## Safety
197
+ ...