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