Update README.md
Browse files
README.md
CHANGED
@@ -1,34 +1,102 @@
|
|
1 |
---
|
2 |
base_model:
|
3 |
-
- anthracite-
|
4 |
-
- anthracite-
|
5 |
-
- anthracite-
|
6 |
- IntervitensInc/gemma-2-27b-chatml
|
7 |
library_name: transformers
|
8 |
-
tags:
|
9 |
-
- mergekit
|
10 |
-
- merge
|
11 |
-
|
12 |
---
|
13 |
-
# output8
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
### Merge Method
|
19 |
|
20 |
-
This model
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
* [anthracite-core/magnum-v3-27b-kto-r3](https://huggingface.co/anthracite-core/magnum-v3-27b-kto-r3)
|
26 |
-
* [anthracite-core/magnum-v3-27b-KTO-e1-r2](https://huggingface.co/anthracite-core/magnum-v3-27b-KTO-e1-r2)
|
27 |
-
* [anthracite-core/magnum-v3-27b-KTO-e0.25-r1](https://huggingface.co/anthracite-core/magnum-v3-27b-KTO-e0.25-r1)
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
|
|
|
|
32 |
|
33 |
```yaml
|
34 |
base_model: IntervitensInc/gemma-2-27b-chatml
|
@@ -36,13 +104,49 @@ dtype: float32
|
|
36 |
merge_method: task_arithmetic
|
37 |
models:
|
38 |
- model: IntervitensInc/gemma-2-27b-chatml
|
39 |
-
- model: anthracite-
|
40 |
parameters:
|
41 |
weight: 0.5
|
42 |
-
- model: anthracite-
|
43 |
parameters:
|
44 |
weight: 0.1
|
45 |
-
- model: anthracite-
|
46 |
parameters:
|
47 |
weight: 0.4
|
48 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
base_model:
|
3 |
+
- anthracite-forge/magnum-v3-27b-kto-r3
|
4 |
+
- anthracite-forge/magnum-v3-27b-KTO-e1-r2
|
5 |
+
- anthracite-forge/magnum-v3-27b-KTO-e0.25-r1
|
6 |
- IntervitensInc/gemma-2-27b-chatml
|
7 |
library_name: transformers
|
|
|
|
|
|
|
|
|
8 |
---
|
|
|
9 |
|
10 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/658a46cbfb9c2bdfae75b3a6/GKpV5mwmnHFR6wIwTa91z.png)
|
11 |
|
12 |
+
This is the 12th 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 the result of multiple KTO runs on top of one SFT run, all of which are published on anthracite-forge.
|
15 |
|
16 |
+
## Methodology
|
17 |
|
18 |
+
R1 (SFT) was fine-tuned on top of `IntervitensInc/gemma-2-27b-chatml` which is chatMLified gemma-2-27b.
|
|
|
|
|
|
|
19 |
|
20 |
+
We have experimented with various SFT and KTO re-runs, ratios and merge methods and this was our winner, including what was liked most from each model.
|
21 |
+
|
22 |
+
If you prefer your own mix of the KTO runs or would like to use the SFT on its own, refer to the models section and anthracite-forge, some exl-quants are pre-included.
|
23 |
+
|
24 |
+
## Models
|
25 |
+
|
26 |
+
* [anthracite-forge/magnum-v3-27b-kto-r3](https://huggingface.co/anthracite-forge/magnum-v3-27b-kto-r3)
|
27 |
+
* [anthracite-forge/magnum-v3-27b-KTO-e1-r2](https://huggingface.co/anthracite-forge/magnum-v3-27b-KTO-e1-r2)
|
28 |
+
* [anthracite-forge/magnum-v3-27b-KTO-e0.25-r1](https://huggingface.co/anthracite-forge/magnum-v3-27b-KTO-e0.25-r1)
|
29 |
+
|
30 |
+
## Prompting
|
31 |
+
Model has been Instruct tuned with the ChatML formatting. A typical input would look like this:
|
32 |
+
|
33 |
+
```py
|
34 |
+
"""<|im_start|>system
|
35 |
+
system prompt<|im_end|>
|
36 |
+
<|im_start|>user
|
37 |
+
Hi there!<|im_end|>
|
38 |
+
<|im_start|>assistant
|
39 |
+
Nice to meet you!<|im_end|>
|
40 |
+
<|im_start|>user
|
41 |
+
Can I ask a question?<|im_end|>
|
42 |
+
<|im_start|>assistant
|
43 |
+
"""
|
44 |
+
```
|
45 |
+
|
46 |
+
## SillyTavern templates
|
47 |
+
|
48 |
+
Below are Instruct and Context templates for use within SillyTavern.
|
49 |
+
|
50 |
+
<details><summary>context template</summary>
|
51 |
+
|
52 |
+
```yaml
|
53 |
+
{
|
54 |
+
"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",
|
55 |
+
"example_separator": "",
|
56 |
+
"chat_start": "",
|
57 |
+
"use_stop_strings": false,
|
58 |
+
"allow_jailbreak": false,
|
59 |
+
"always_force_name2": true,
|
60 |
+
"trim_sentences": false,
|
61 |
+
"include_newline": false,
|
62 |
+
"single_line": false,
|
63 |
+
"name": "Magnum ChatML"
|
64 |
+
}
|
65 |
+
```
|
66 |
+
|
67 |
+
</details><br>
|
68 |
+
<details><summary>instruct template</summary>
|
69 |
+
|
70 |
+
```yaml
|
71 |
+
{
|
72 |
+
"system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
|
73 |
+
"input_sequence": "<|im_start|>user\n",
|
74 |
+
"output_sequence": "<|im_start|>assistant\n",
|
75 |
+
"last_output_sequence": "",
|
76 |
+
"system_sequence": "<|im_start|>system\n",
|
77 |
+
"stop_sequence": "<|im_end|>",
|
78 |
+
"wrap": false,
|
79 |
+
"macro": true,
|
80 |
+
"names": true,
|
81 |
+
"names_force_groups": true,
|
82 |
+
"activation_regex": "",
|
83 |
+
"system_sequence_prefix": "",
|
84 |
+
"system_sequence_suffix": "",
|
85 |
+
"first_output_sequence": "",
|
86 |
+
"skip_examples": false,
|
87 |
+
"output_suffix": "<|im_end|>\n",
|
88 |
+
"input_suffix": "<|im_end|>\n",
|
89 |
+
"system_suffix": "<|im_end|>\n",
|
90 |
+
"user_alignment_message": "",
|
91 |
+
"system_same_as_user": false,
|
92 |
+
"last_system_sequence": "",
|
93 |
+
"name": "Magnum ChatML"
|
94 |
+
}
|
95 |
+
```
|
96 |
|
97 |
+
</details><br>
|
98 |
+
|
99 |
+
### Configuration
|
100 |
|
101 |
```yaml
|
102 |
base_model: IntervitensInc/gemma-2-27b-chatml
|
|
|
104 |
merge_method: task_arithmetic
|
105 |
models:
|
106 |
- model: IntervitensInc/gemma-2-27b-chatml
|
107 |
+
- model: anthracite-forge/magnum-v3-27b-KTO-e0.25-r1
|
108 |
parameters:
|
109 |
weight: 0.5
|
110 |
+
- model: anthracite-forge/magnum-v3-27b-KTO-e1-r2
|
111 |
parameters:
|
112 |
weight: 0.1
|
113 |
+
- model: anthracite-forge/magnum-v3-27b-kto-r3
|
114 |
parameters:
|
115 |
weight: 0.4
|
116 |
```
|
117 |
+
|
118 |
+
## Credits
|
119 |
+
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.
|
120 |
+
|
121 |
+
We would also like to thank all members of Anthracite who made this finetune possible.
|
122 |
+
|
123 |
+
## Datasets
|
124 |
+
|
125 |
+
r1 consisted of:
|
126 |
+
|
127 |
+
```
|
128 |
+
datasets:
|
129 |
+
- path: anthracite-org/stheno-filtered-v1.1
|
130 |
+
type: sharegpt
|
131 |
+
conversation: chatml
|
132 |
+
- path: anthracite-org/kalo-opus-instruct-22k-no-refusal
|
133 |
+
type: sharegpt
|
134 |
+
conversation: chatml
|
135 |
+
- path: anthracite-org/nopm_claude_writing_fixed
|
136 |
+
type: sharegpt
|
137 |
+
conversation: chatml
|
138 |
+
- path: Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned
|
139 |
+
type: sharegpt
|
140 |
+
conversation: chatml
|
141 |
+
- path: Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned
|
142 |
+
type: sharegpt
|
143 |
+
conversation: chatml
|
144 |
+
```
|
145 |
+
|
146 |
+
## Training
|
147 |
+
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.
|
148 |
+
|
149 |
+
[<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)
|
150 |
+
|
151 |
+
## Safety
|
152 |
+
...
|