lucyknada commited on
Commit
24559ef
·
verified ·
1 Parent(s): 06b7ba6

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +210 -0
README.md ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - Doctor-Shotgun/c2_deduped_16k_llama3_tok_deanon
5
+ - anthracite-org/kalo-opus-instruct-22k-no-refusal
6
+ - lodrick-the-lafted/kalo-opus-instruct-3k-filtered
7
+ - anthracite-org/nopm_claude_writing_fixed
8
+ - anthracite-org/kalo_opus_misc_240827
9
+ - anthracite-org/kalo_misc_part2
10
+ language:
11
+ - en
12
+ base_model:
13
+ - Qwen/Qwen2.5-72B-Instruct
14
+ library_name: transformers
15
+ ---
16
+
17
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/658a46cbfb9c2bdfae75b3a6/trlkbv0jv_0HImUESrt5C.png)
18
+ This is an experimental model designed to replicate the prose quality of the Claude 3 models, specifically Sonnet and Opus. This model is fine-tuned on top of [Qwen-2.5 72B Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct).
19
+
20
+ ## Prompting
21
+ Model has been instruct tuned with ChatML prompt formatting. A typical input would look like this:
22
+
23
+ ```
24
+ """<|im_start|>system
25
+ system prompt<|im_end|>
26
+ <|im_start|>user
27
+ Hi there!<|im_end|>
28
+ <|im_start|>assistant
29
+ Nice to meet you!<|im_end|>
30
+ <|im_start|>user
31
+ Can I ask a question?<|im_end|>
32
+ <|im_start|>assistant
33
+ """
34
+ ```
35
+
36
+ ## SillyTavern templates
37
+
38
+ Below are Instruct and Context templates for use within SillyTavern.
39
+
40
+ <details><summary>context template</summary>
41
+
42
+ ```yaml
43
+ {
44
+ "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",
45
+ "example_separator": "",
46
+ "chat_start": "",
47
+ "use_stop_strings": false,
48
+ "allow_jailbreak": false,
49
+ "always_force_name2": true,
50
+ "trim_sentences": false,
51
+ "include_newline": false,
52
+ "single_line": false,
53
+ "name": "Magnum ChatML"
54
+ }
55
+ ```
56
+
57
+ </details><br>
58
+ <details><summary>instruct template</summary>
59
+
60
+ ```yaml
61
+ {
62
+ "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
63
+ "input_sequence": "<|im_start|>user\n",
64
+ "output_sequence": "<|im_start|>assistant\n",
65
+ "last_output_sequence": "",
66
+ "system_sequence": "<|im_start|>system\n",
67
+ "stop_sequence": "<|im_end|>",
68
+ "wrap": false,
69
+ "macro": true,
70
+ "names": true,
71
+ "names_force_groups": true,
72
+ "activation_regex": "",
73
+ "system_sequence_prefix": "",
74
+ "system_sequence_suffix": "",
75
+ "first_output_sequence": "",
76
+ "skip_examples": false,
77
+ "output_suffix": "<|im_end|>\n",
78
+ "input_suffix": "<|im_end|>\n",
79
+ "system_suffix": "<|im_end|>\n",
80
+ "user_alignment_message": "",
81
+ "system_same_as_user": false,
82
+ "last_system_sequence": "",
83
+ "name": "Magnum ChatML"
84
+ }
85
+ ```
86
+
87
+ </details><br>
88
+
89
+ ## Credits
90
+
91
+ Datasets used:
92
+ - [anthracite-org/c2_logs_32k_llama3_qwen2_v1.2](https://huggingface.co/datasets/anthracite-org/c2_logs_32k_llama3_qwen2_v1.2)
93
+ - [anthracite-org/kalo-opus-instruct-22k-no-refusal](https://huggingface.co/datasets/anthracite-org/kalo-opus-instruct-22k-no-refusal)
94
+ - [lodrick-the-lafted/kalo-opus-instruct-3k-filtered](https://huggingface.co/datasets/lodrick-the-lafted/kalo-opus-instruct-3k-filtered)
95
+ - [anthracite-org/nopm_claude_writing_fixed](https://huggingface.co/datasets/anthracite-org/nopm_claude_writing_fixed)
96
+ - [anthracite-org/kalo_opus_misc_240827](https://huggingface.co/datasets/anthracite-org/kalo_opus_misc_240827)
97
+ - [anthracite-org/kalo_misc_part2](https://huggingface.co/datasets/anthracite-org/kalo_misc_part2)
98
+
99
+
100
+ ## Axolotl config
101
+
102
+ <details><summary>See axolotl config</summary>
103
+
104
+ ```yaml
105
+ base_model: /workspace/data/models/Qwen2.5-72B-Instruct
106
+ model_type: AutoModelForCausalLM
107
+ tokenizer_type: AutoTokenizer
108
+
109
+ plugins:
110
+ - axolotl.integrations.liger.LigerPlugin
111
+ liger_rope: true
112
+ liger_rms_norm: true
113
+ liger_swiglu: true
114
+ liger_fused_linear_cross_entropy: true
115
+
116
+ load_in_8bit: false
117
+ load_in_4bit: false
118
+ strict: false
119
+
120
+ datasets:
121
+ - path: anthracite-org/c2_logs_32k_llama3_qwen2_v1.2
122
+ type: sharegpt
123
+ conversation: chatml
124
+ - path: anthracite-org/kalo-opus-instruct-22k-no-refusal
125
+ type: sharegpt
126
+ conversation: chatml
127
+ - path: lodrick-the-lafted/kalo-opus-instruct-3k-filtered
128
+ type: sharegpt
129
+ conversation: chatml
130
+ - path: anthracite-org/nopm_claude_writing_fixed
131
+ type: sharegpt
132
+ conversation: chatml
133
+ - path: anthracite-org/kalo_opus_misc_240827
134
+ type: sharegpt
135
+ conversation: chatml
136
+ - path: anthracite-org/kalo_misc_part2
137
+ type: sharegpt
138
+ conversation: chatml
139
+ #chat_template: chatml
140
+ shuffle_merged_datasets: true
141
+ #default_system_message: "You are an assistant that responds to the user."
142
+ dataset_prepared_path: /workspace/data/magnum-72b-data
143
+ val_set_size: 0.0
144
+ output_dir: /workspace/data/72b-fft-out
145
+
146
+ sequence_len: 32768
147
+ sample_packing: true
148
+ pad_to_sequence_len: true
149
+
150
+ adapter:
151
+ lora_model_dir:
152
+ lora_r:
153
+ lora_alpha:
154
+ lora_dropout:
155
+ lora_target_linear:
156
+ lora_fan_in_fan_out:
157
+
158
+ wandb_project: 72b-magnum-fft
159
+ wandb_entity:
160
+ wandb_watch:
161
+ wandb_name: alter-attempt-01
162
+ wandb_log_model:
163
+
164
+ gradient_accumulation_steps: 2
165
+ micro_batch_size: 1
166
+ num_epochs: 2
167
+ optimizer: adamw_bnb_8bit
168
+ lr_scheduler: cosine
169
+ learning_rate: 0.000004
170
+
171
+ train_on_inputs: false
172
+ group_by_length: false
173
+ bf16: auto
174
+ fp16:
175
+ tf32: false
176
+
177
+ gradient_checkpointing: true
178
+ early_stopping_patience:
179
+ resume_from_checkpoint:
180
+ local_rank:
181
+ logging_steps: 1
182
+ xformers_attention:
183
+ flash_attention: true
184
+
185
+ warmup_steps: 40
186
+ evals_per_epoch:
187
+ eval_table_size:
188
+ eval_max_new_tokens:
189
+ saves_per_epoch: 2
190
+ debug:
191
+ deepspeed: deepspeed_configs/zero3_bf16.json
192
+ weight_decay: 0.01
193
+ fsdp:
194
+ fsdp_config:
195
+ special_tokens:
196
+
197
+ ```
198
+ </details><br>
199
+
200
+ ## Training
201
+ The model was trained for 2 epochs on 8x [AMD Instinct™ MI300X Accelerators](https://www.amd.com/en/products/accelerators/instinct/mi300/mi300x.html) for full-parameter fine-tuning of the model.
202
+
203
+ The model was trained with an LR of 4e-6 for 2 epochs and with the Liger kernel.
204
+
205
+ Sample Packing was done for 32k tokens, with individual sequences up to 32k tokens in length.
206
+
207
+ [<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)
208
+
209
+ ## Safety
210
+ ...