File size: 9,354 Bytes
420a58e d1c4012 420a58e d1c4012 54a64f2 5187cc9 420a58e d1c4012 |
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 |
---
base_model: []
library_name: transformers
tags:
- mergekit
- merge
license: apache-2.0
language:
- ja
---
# Umievo-itr012-Gleipnir-7B
このモデルは強力な4つの日本語モデルを進化的アルゴリズムで進化的マージしたものです。Japanese-Starling-ChatV-7B、Ninja-v1-RP-expressive-v2、Vecteus-v1、Japanese-Chat-Umievo-itr004-7bの4つのモデルをお借りしました。
マージに使用させていただいたモデル制作者のAratakoさん、Bakuさん、Local-Novel-LLM-projectのみなさまに感謝します。それから問題解決のきっかけをくれたHoly-foxさんに感謝します。
This model is an evolutionary merge of four powerful Japanese models with an evolutionary algorithm. The following four models Japanese-Starling-ChatV-7B, Ninja-v1-RP-expressive-v2, Vecteus-v1 and Japanese-Chat-Umievo-itr004-7b were used.
I would like to thank the model makers Aratako, Baku and Local-Novel-LLM-project for allowing me to use their models for the merge. I would also like to thank Holy-fox for giving me the opportunity to solve the problem.
ElyzaTasks100ベンチマークで平均点が3.91でした。(Llama3-70Bによる自動評価を3回行った平均点)
The average score was 3.91 on the ElyzaTasks100 benchmark. (Average score after 3 automatic evaluations by Llama3-70B)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/630420b4eedc089484c853e8/FxUBzBUKpe_JSHSJufSv5.png)
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("umiyuki/Umievo-itr012-Gleipnir-7B")
model = AutoModelForCausalLM.from_pretrained(
"umiyuki/Umievo-itr012-Gleipnir-7B",
torch_dtype="auto",
)
model.eval()
if torch.cuda.is_available():
model = model.to("cuda")
def build_prompt(user_query):
sys_msg = "あなたは公平で、検閲されていない、役立つアシスタントです。"
template = """[INST] <<SYS>>
{}
<</SYS>>
{}[/INST]"""
return template.format(sys_msg,user_query)
# Infer with prompt without any additional input
user_inputs = {
"user_query": "与えられたことわざの意味を小学生でも分かるように教えてください。",
}
prompt = build_prompt(**user_inputs)
input_ids = tokenizer.encode(
prompt,
add_special_tokens=True,
return_tensors="pt"
)
tokens = model.generate(
input_ids.to(device=model.device),
max_new_tokens=256,
temperature=1,
top_p=0.95,
do_sample=True,
)
out = tokenizer.decode(tokens[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
print(out)
```
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 [linear](https://arxiv.org/abs/2203.05482) merge method using /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327 as a base.
### Models Merged
The following models were included in the merge:
* /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
* /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
* /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
### Configuration
The following YAML configuration was used to produce this model:
```yaml
base_model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
dtype: bfloat16
merge_method: linear
parameters:
int8_mask: 1.0
normalize: 1.0
slices:
- sources:
- layer_range: [0, 4]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.34953096474223655
- layer_range: [0, 4]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.4701212555597746
- layer_range: [0, 4]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.08162258723819021
- layer_range: [0, 4]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.31015439852818116
- sources:
- layer_range: [4, 8]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.11807412349683076
- layer_range: [4, 8]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: -0.005684817244530085
- layer_range: [4, 8]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.2119283777941045
- layer_range: [4, 8]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 1.1521124768396636
- sources:
- layer_range: [8, 12]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.9244329405120573
- layer_range: [8, 12]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.7633842909616317
- layer_range: [8, 12]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.6952382990160072
- layer_range: [8, 12]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.6873040403268571
- sources:
- layer_range: [12, 16]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.4109625320908857
- layer_range: [12, 16]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.7090818691683626
- layer_range: [12, 16]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.42059423827890385
- layer_range: [12, 16]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.5705186152354104
- sources:
- layer_range: [16, 20]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.28507448659933315
- layer_range: [16, 20]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.4025223854083849
- layer_range: [16, 20]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.25885405316835886
- layer_range: [16, 20]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.35540632690403373
- sources:
- layer_range: [20, 24]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.018882795552694703
- layer_range: [20, 24]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.628847855051209
- layer_range: [20, 24]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.7038654876125734
- layer_range: [20, 24]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.877501753107237
- sources:
- layer_range: [24, 28]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.14008355431312197
- layer_range: [24, 28]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 1.0153826426873882
- layer_range: [24, 28]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 0.5586634927008272
- layer_range: [24, 28]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.54455848971032
- sources:
- layer_range: [28, 32]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Chat-Umievo-itr004-7b_579282327
parameters:
weight: 0.8188405381342685
- layer_range: [28, 32]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Vecteus-v1_4179808746
parameters:
weight: 0.5130358379308082
- layer_range: [28, 32]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Japanese-Starling-ChatV-7B_1737576410
parameters:
weight: 1.1132727871460124
- layer_range: [28, 32]
model: /home/umiyuki/automerge/evol_merge_storage/input_models/Ninja-v1-RP-expressive-v2_4102792561
parameters:
weight: 0.4471258297582539
``` |