File size: 7,262 Bytes
56fea1d 0a3ce90 56fea1d 1a39581 56fea1d 0a3ce90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
---
base_model:
- v000000/HaloMaidRP-v1.32-15B-Ruby
- v000000/HaloMaidRP-v1.32-15B-Sapphire
library_name: transformers
tags:
- mergekit
- merge
- llama
---
# merge
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
## Merge Details
### Merge Method
This model was merged using the SLERP merge method.
### Models Merged
The following models were included in the merge:
* [v000000/HaloMaidRP-v1.32-15B-Ruby](https://huggingface.co/v000000/HaloMaidRP-v1.32-15B-Ruby)
* [v000000/HaloMaidRP-v1.32-15B-Sapphire](https://huggingface.co/v000000/HaloMaidRP-v1.32-15B-Sapphire)
### Configuration
The following YAML configuration was used to produce this model:
# Recipe
```yaml
#1. Take a collection of RP and Storywriter 8b models and merge them.
dtype: float32
merge_method: linear
weight: 0.15
parameters:
- model: tokyotech-llm/Llama-3-Swallow-8B-v0.1
weight: 0.4
parameters:
- model: NeverSleep/Llama-3-Lumimaid-8B-v0.1-OAS
weight: 0.1
parameters:
- model: maldv/llama-3-fantasy-writer-8b
weight: 0.6
parameters:
- model: Nitral-AI/Hathor_Respawn-L3-8B-v0.8
#2. Use task-arithmetic to learn the vector directions from the RP-Mix onto Llama-3-SPPO which is the smartest 8B model imo, this way we can preserve Meta's multi-bullion dollar tuning.
models:
dtype: float32
normalize: false
parameters:
base_model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3
merge_method: task_arithmetic
weight: 0.35
parameters:
- model: rpmix-part1
weight: 1.0
parameters:
- model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3
#2,5. Apply abliteration to the previous model
models:
dtype: float32
merge_method: linear
weight: 1.0
parameters:
- model: sppo-rpmix-part2+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
#3. Create an abliterated version of Stheno3.2-8B as we will use this in the 15B frankenmerge.
models:
dtype: float32
merge_method: linear
weight: 1.0
parameters:
- model: Sao10K/L3-8B-Stheno-v3.2+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
#4. Make an inverted version of a Llama-3-15B Frankenmerge with the previous models.
models:
model: v000000/L3-8B-Stheno-v3.2-abliterated
- layer_range: [24, 32]
- sources:
model: v000000/SwallowMaid-8B-L3-SPPO-abliterated
- layer_range: [8, 24]
- sources:
parameters:
model: v000000/L3-8B-Stheno-v3.2-abliterated
- layer_range: [8, 24]
- sources:
model: v000000/SwallowMaid-8B-L3-SPPO-abliterated
- layer_range: [0, 24]
- sources:
slices:
#5. Make an non-inverted version of a Llama-3-15B Frankenmerge with the previous models.
merge_method: passthrough
dtype: float32
model: v000000/SwallowMaid-8B-L3-SPPO-abliterated
- layer_range: [24, 32]
- sources:
model: v000000/L3-8B-Stheno-v3.2-abliterated
- layer_range: [8, 24]
- sources:
model: v000000/SwallowMaid-8B-L3-SPPO-abliterated
- layer_range: [8, 24]
- sources:
model: v000000/L3-8B-Stheno-v3.2-abliterated
- layer_range: [0, 24]
- sources:
slices:
#6. Test the previous two models and determine which is better in the output/input stage and which is best in the middle and we slerp them in a v-shape.
merge_method: passthrough
dtype: float32
t: [0, 0.5, 1, 0.5, 0]
parameters:
dtype: float32
base_model: v000000/Sthalomaid-15B-abliterated
merge_method: slerp
- model: v000000/Sthalomaid-15B-Inverted-abliterated
- model: v000000/Sthalomaid-15B-abliterated
#7. Apply Blackroot Lora in a model_stock merge of the different models so far
models:
dtype: float32
merge_method: model_stock
base_model: v000000/Sthalomaid-V-15B-abliterated
- model: v000000/Sthalomaid-15B-Inverted-abliterated+Blackroot/Llama-3-8B-Abomination-LORA
- model: v000000/Sthalomaid-15B-abliterated+Blackroot/Llama-3-8B-Abomination-LORA
- model: v000000/Sthalomaid-V-15B-abliterated+Blackroot/Llama-3-8B-Abomination-LORA #seems to work on 15b
- model: v000000/Sthalomaid-15B-Inverted-abliterated
- model: v000000/Sthalomaid-15B-abliterated
- model: v000000/Sthalomaid-V-15B-abliterated
#7. Create another 15B frankenmerge from just SPPO and abiterate it, this is so we can merge in a smarter model.
models:
dtype: float32
merge_method: passthrough
slices:
- sources:
- layer_range: [0, 24]
model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
- sources:
- layer_range: [8, 24]
model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
parameters:
- sources:
- layer_range: [8, 24]
model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
- sources:
- layer_range: [24, 32]
model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3+grimjim/Llama-3-Instruct-abliteration-LoRA-8B
#8. Learn vectors from our previous blackroot model_stock model to smarter SPPO-Iter model to preserve RP capabilities.
models:
- model: v000000/HaloMaidRP-V-15B-Blackroot-v0.1
parameters:
weight: 1.3
merge_method: task_arithmetic
base_model: v000000/Llama-3-Instruct-15B-SPPO-Iter3-abliterated
parameters:
normalize: false
#9. Merge the blackroot model_stock-15B and SPPO-15B models together with a smooth gradient.
dtype: float32
slices:
- sources:
- model: v000000/HaloMaidRP-V-15B-Blackroot-v0.1
layer_range: [0, 64]
- model: v000000/HaloMaidRP-V-15B-Blackroot-v0.223
layer_range: [0, 64]
merge_method: slerp
base_model: v000000/HaloMaidRP-V-15B-Blackroot-v0.223
parameters:
t:
- filter: self_attn
value: [0, 0.5, 0.3, 0.7, 1, 0.1, 0.6, 0.3, 0.8, 0.5]
- filter: mlp
value: [1, 0.5, 0.7, 0.3, 0, 0.3, 0.4, 0.7, 0.2, 0.5]
- value: 0.5
dtype: bfloat16 #Oops accidentally swtich to half precision do this also very important
#10. Heal the layers, o_proj and down_proj seems to be the only tensors that determine adaptation to a new architecture, so we can steal them from an already finetuned 15B,
#this way we don't need to finetune our new frankenmerge at all to have full performance. Why reinvent the wheel?
#sapphire
models:
- model: v000000/HaloMaidRP1_component
merge_method: slerp
base_model: ZeusLabs/L3-Aethora-15B-V2
parameters:
t:
- filter: o_proj
value: 0
- filter: down_proj
value: 0
- value: 1
dtype: bfloat16
#11. Go back to an earlier checkpoint that had interesting results with being very depraved before the blackroot model_stock merge and do the same as (10.) to heal it.
#ruby
models:
- model: v000000/component____HaloMaidRP-V
merge_method: slerp
base_model: ZeusLabs/L3-Aethora-15B-V2
parameters:
t:
- filter: o_proj
value: 0
- filter: down_proj
value: 0
- value: 1
dtype: bfloat16
#12. Then we merge these two together to get a semi-depraved smart model.
#emerald
slices:
- sources:
- model: v000000/HaloMaidRP-v1.32-15B-Sapphire
layer_range: [0, 64]
- model: v000000/HaloMaidRP-v1.32-15B-Ruby
layer_range: [0, 64]
merge_method: slerp
base_model: v000000/HaloMaidRP-v1.32-15B-Sapphire
parameters:
t:
- filter: self_attn
value: [0.1, 0.6, 0.3, 0.8, 0.5]
- filter: mlp
value: [0.9, 0.4, 0.7, 0.2, 0.5]
- value: 0.5
dtype: bfloat16
``` |