Update README.md
Browse files
README.md
CHANGED
@@ -8,9 +8,67 @@ library_name: transformers
|
|
8 |
tags:
|
9 |
- mergekit
|
10 |
- merge
|
11 |
-
|
|
|
|
|
12 |
---
|
13 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
16 |
|
@@ -175,3 +233,7 @@ slices:
|
|
175 |
parameters:
|
176 |
weight: 0.342193342214983
|
177 |
```
|
|
|
|
|
|
|
|
|
|
8 |
tags:
|
9 |
- mergekit
|
10 |
- merge
|
11 |
+
license: llama3
|
12 |
+
language:
|
13 |
+
- ja
|
14 |
---
|
15 |
+
# Llama-3-Umievo-itr014-Shizuko-8b
|
16 |
+
|
17 |
+
このモデルは日本語に対応しているLlama-3ベースの4つのモデルを進化的アルゴリズムで進化的マージしたものです。Meta-Llama-3-8B-Instruct、Llama-3-youko-8b-instruct-chatvector、suzume-llama-3-8B-multilingual、sa-v1-llama3-8bの4つのモデルを使用させていただきました。
|
18 |
+
マージに使用させていただいたモデル制作者のMeta、aixsatoshiさん、LightBlue、Shisa-AIのみなさまに感謝します。
|
19 |
+
|
20 |
+
This model is an evolutionary merge of four Llama-3-based models for Japanese using an evolutionary algorithm: Meta-Llama-3-8B-Instruct, Llama-3-youko-8b-instruct-chatvector, suzume- llama-3-8B-multilingual, and sa-v1-llama3-8b.
|
21 |
+
We would like to thank the model creators Meta, aixsatoshi, LightBlue, and Shisa-AI for allowing us to use their models for the merge.
|
22 |
+
|
23 |
+
ElyzaTasks100ベンチマークで平均点が3.85でした。(Llama3-70Bによる自動評価を3回行った平均点)
|
24 |
+
|
25 |
+
The average score was 3.85 on the ElyzaTasks100 benchmark. (Average score after 3 automatic evaluations by Llama3-70B)
|
26 |
+
|
27 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/630420b4eedc089484c853e8/x4BbxfaW_wXPjDfv1Z4lJ.png)
|
28 |
+
|
29 |
+
|
30 |
+
```python
|
31 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
32 |
+
import torch
|
33 |
+
|
34 |
+
model_id = "umiyuki/Llama-3-Umievo-itr014-Shizuko-8b"
|
35 |
+
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
37 |
+
model = AutoModelForCausalLM.from_pretrained(
|
38 |
+
model_id,
|
39 |
+
torch_dtype=torch.bfloat16,
|
40 |
+
device_map="auto",
|
41 |
+
)
|
42 |
+
|
43 |
+
messages = [
|
44 |
+
{"role": "system", "content": "You must answer all responses in Japanese.あなたは役に立つ誠実な日本人のアシスタントです。あなたは全ての回答に日本語で答えなければならない。"},
|
45 |
+
{"role": "user", "content": "二人の少女が終末世界を旅する物語を書いてください。"},
|
46 |
+
]
|
47 |
+
|
48 |
+
input_ids = tokenizer.apply_chat_template(
|
49 |
+
messages,
|
50 |
+
add_generation_prompt=True,
|
51 |
+
return_tensors="pt"
|
52 |
+
).to(model.device)
|
53 |
+
|
54 |
+
terminators = [
|
55 |
+
tokenizer.eos_token_id,
|
56 |
+
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
57 |
+
]
|
58 |
+
|
59 |
+
outputs = model.generate(
|
60 |
+
input_ids,
|
61 |
+
max_new_tokens=256,
|
62 |
+
eos_token_id=terminators,
|
63 |
+
do_sample=True,
|
64 |
+
temperature=0.6,
|
65 |
+
top_p=0.9,
|
66 |
+
)
|
67 |
+
response = outputs[0][input_ids.shape[-1]:]
|
68 |
+
print(tokenizer.decode(response, skip_special_tokens=True))
|
69 |
+
```
|
70 |
+
|
71 |
+
|
72 |
|
73 |
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
74 |
|
|
|
233 |
parameters:
|
234 |
weight: 0.342193342214983
|
235 |
```
|
236 |
+
|
237 |
+
Built with Meta Llama 3
|
238 |
+
|
239 |
+
Meta Llama 3 is licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved
|