lucyknada commited on
Commit
62ad2c9
1 Parent(s): a4c1136

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +191 -0
README.md ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ base_model: google/gemma-2-9b
4
+ model-index:
5
+ - name: magnum-v3-9b-customgemma2
6
+ results: []
7
+ ---
8
+
9
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/658a46cbfb9c2bdfae75b3a6/9ZBUlmzDCnNmQEdUUbyEL.png)
10
+
11
+ ## This repo contains GGUF quants of the model. If you need the original weights, please find them [here](https://huggingface.co/anthracite-org/magnum-v3-9b-customgemma2).
12
+ This is the 10th in a series of models designed to replicate the prose quality of the Claude 3 models, specifically Sonnet and Opus.
13
+
14
+ This model is fine-tuned on top of [google/gemma-2-9b](https://huggingface.co/google/gemma-2-9b).
15
+
16
+ ## Prompting
17
+ Model has been Instruct tuned with the [customgemma2](https://github.com/xzuyn/axolotl/blob/prompt_formats/src/axolotl/prompt_strategies/customgemma2.py) (to allow system prompts) formatting. A typical input would look like this:
18
+
19
+ ```py
20
+ """<start_of_turn>system
21
+ system prompt<end_of_turn>
22
+ <start_of_turn>user
23
+ Hi there!<end_of_turn>
24
+ <start_of_turn>model
25
+ Nice to meet you!<end_of_turn>
26
+ <start_of_turn>user
27
+ Can I ask a question?<end_of_turn>
28
+ <start_of_turn>model
29
+ """
30
+ ```
31
+
32
+ ## SillyTavern templates
33
+
34
+ Below are Instruct and Context templates for use within SillyTavern.
35
+
36
+ <details><summary>context template</summary>
37
+
38
+ ```yaml
39
+ {
40
+ "story_string": "<start_of_turn>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}}<end_of_turn>\n",
41
+ "example_separator": "",
42
+ "chat_start": "",
43
+ "use_stop_strings": false,
44
+ "allow_jailbreak": false,
45
+ "always_force_name2": true,
46
+ "trim_sentences": false,
47
+ "include_newline": false,
48
+ "single_line": false,
49
+ "name": "Magnum Gemma"
50
+ }
51
+ ```
52
+
53
+ </details><br>
54
+ <details><summary>instruct template</summary>
55
+
56
+ ```yaml
57
+ {
58
+ "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
59
+ "input_sequence": "<start_of_turn>user\n",
60
+ "output_sequence": "<start_of_turn>assistant\n",
61
+ "last_output_sequence": "",
62
+ "system_sequence": "<start_of_turn>system\n",
63
+ "stop_sequence": "<end_of_turn>",
64
+ "wrap": false,
65
+ "macro": true,
66
+ "names": true,
67
+ "names_force_groups": true,
68
+ "activation_regex": "",
69
+ "system_sequence_prefix": "",
70
+ "system_sequence_suffix": "",
71
+ "first_output_sequence": "",
72
+ "skip_examples": false,
73
+ "output_suffix": "<end_of_turn>\n",
74
+ "input_suffix": "<end_of_turn>\n",
75
+ "system_suffix": "<end_of_turn>\n",
76
+ "user_alignment_message": "",
77
+ "system_same_as_user": false,
78
+ "last_system_sequence": "",
79
+ "name": "Magnum Gemma"
80
+ }
81
+ ```
82
+
83
+ </details><br>
84
+
85
+ </details><br>
86
+
87
+ ## Axolotl config
88
+
89
+ <details><summary>See axolotl config</summary>
90
+
91
+ ```yaml
92
+ base_model: google/gemma-2-9b
93
+ model_type: AutoModelForCausalLM
94
+ tokenizer_type: AutoTokenizer
95
+
96
+ #trust_remote_code: true
97
+
98
+ load_in_8bit: false
99
+ load_in_4bit: false
100
+ strict: false
101
+
102
+ datasets:
103
+ - path: anthracite-org/stheno-filtered-v1.1
104
+ type: customgemma2
105
+ - path: anthracite-org/kalo-opus-instruct-22k-no-refusal
106
+ type: customgemma2
107
+ - path: anthracite-org/nopm_claude_writing_fixed
108
+ type: customgemma2
109
+ - path: Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned
110
+ type: customgemma2
111
+ - path: Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned
112
+ type: customgemma2
113
+ shuffle_merged_datasets: true
114
+ default_system_message: "You are an assistant that responds to the user."
115
+ dataset_prepared_path: magnum-v3-9b-data-customgemma2
116
+ val_set_size: 0.0
117
+ output_dir: ./magnum-v3-9b-customgemma2
118
+
119
+ sequence_len: 8192
120
+ sample_packing: true
121
+ eval_sample_packing: false
122
+ pad_to_sequence_len:
123
+
124
+ adapter:
125
+ lora_model_dir:
126
+ lora_r:
127
+ lora_alpha:
128
+ lora_dropout:
129
+ lora_target_linear:
130
+ lora_fan_in_fan_out:
131
+
132
+ wandb_project: magnum-9b
133
+ wandb_entity:
134
+ wandb_watch:
135
+ wandb_name: attempt-03-customgemma2
136
+ wandb_log_model:
137
+
138
+ gradient_accumulation_steps: 8
139
+ micro_batch_size: 1
140
+ num_epochs: 2
141
+ optimizer: paged_adamw_8bit
142
+ lr_scheduler: cosine
143
+ learning_rate: 0.000006
144
+
145
+ train_on_inputs: false
146
+ group_by_length: false
147
+ bf16: auto
148
+ fp16:
149
+ tf32: false
150
+
151
+ gradient_checkpointing: unsloth
152
+ early_stopping_patience:
153
+ resume_from_checkpoint:
154
+ local_rank:
155
+ logging_steps: 1
156
+ xformers_attention:
157
+ flash_attention: false
158
+ eager_attention: true
159
+
160
+ warmup_steps: 50
161
+ evals_per_epoch:
162
+ eval_table_size:
163
+ eval_max_new_tokens:
164
+ saves_per_epoch: 2
165
+ debug:
166
+ deepspeed: deepspeed_configs/zero3_bf16.json
167
+ weight_decay: 0.05
168
+ fsdp:
169
+ fsdp_config:
170
+ special_tokens:
171
+ ```
172
+ </details><br>
173
+
174
+ ## Credits
175
+ 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.
176
+
177
+ We would also like to thank all members of Anthracite who made this finetune possible.
178
+
179
+ - [anthracite-org/stheno-filtered-v1.1](https://huggingface.co/datasets/anthracite-org/stheno-filtered-v1.1)
180
+ - [anthracite-org/kalo-opus-instruct-22k-no-refusal](https://huggingface.co/datasets/anthracite-org/kalo-opus-instruct-22k-no-refusal)
181
+ - [anthracite-org/nopm_claude_writing_fixed](https://huggingface.co/datasets/anthracite-org/nopm_claude_writing_fixed)
182
+ - [Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned](https://huggingface.co/datasets/Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned)
183
+ - [Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned](https://huggingface.co/datasets/Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned)
184
+
185
+ ## Training
186
+ 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.
187
+
188
+ [<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)
189
+
190
+ ## Safety
191
+ ...