Update README.md
Browse files
README.md
CHANGED
@@ -5,7 +5,68 @@ language:
|
|
5 |
- en
|
6 |
base_model:
|
7 |
- sbintuitions/sarashina2.2-3b-instruct-v0.1
|
|
|
|
|
|
|
8 |
pipeline_tag: text-generation
|
9 |
datasets:
|
10 |
- Nurture-intelligence/ins_dataset
|
11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
- en
|
6 |
base_model:
|
7 |
- sbintuitions/sarashina2.2-3b-instruct-v0.1
|
8 |
+
- DataPilot/ArrowNeo-Neko-3B-coder
|
9 |
+
- DataPilot/ArrowNeo-Neko-3B-Instruct-v0.1
|
10 |
+
- DataPilot/ArrowNeo-Neko-3B-Instruct-v0.2
|
11 |
pipeline_tag: text-generation
|
12 |
datasets:
|
13 |
- Nurture-intelligence/ins_dataset
|
14 |
+
---
|
15 |
+
|
16 |
+
# DataPilot/ArrowNeo-AME-3x4B-v0.1-MoE
|
17 |
+
|
18 |
+
## overview
|
19 |
+
|
20 |
+
このモデルはAItuberの魂となることを目的にSB intuitionsの[sarashina-2.2-instruct-v0.1](https://huggingface.co/sbintuitions/sarashina2.2-3b-instruct-v0.1)をベースにUnsothとMergekit-MoEを用いて作られました。
|
21 |
+
|
22 |
+
一つのベースモデルと3つのエキスパートモデル(専門家モデル)を合わせたモデルです。
|
23 |
+
|
24 |
+
エキスパートモデルは以下の3つのモデルです。3つのモデルはUnslothと合成データを用いて作られました。
|
25 |
+
|
26 |
+
・ コーディング特化モデル([ArrowNeo-Neko-3B-coder](https://huggingface.co/DataPilot/ArrowNeo-Neko-3B-coder))
|
27 |
+
・ プロンプト追従性能を高めたモデル([ArrowNeo-Neko-3B-Instruct-v0.1](https://huggingface.co/DataPilot/ArrowNeo-Neko-3B-Instruct-v0.1))
|
28 |
+
・ マルチターン性能を高めたモデル([ArrowNeo-Neko-3B-Instruct-v0.2](https://huggingface.co/DataPilot/ArrowNeo-Neko-3B-Instruct-v0.2))
|
29 |
+
|
30 |
+
AItuberの魂には"マルチターン性能"・"プロンプト追従性能"・"軽量さ"が求められています。求められている性能を発揮するために上記のモデルを制作し、マージしました。
|
31 |
+
マージにはMergekit-MoEを用いることで動作の軽快さとパラメータ数を両立することができました。
|
32 |
+
|
33 |
+
## How to use
|
34 |
+
|
35 |
+
以下のコードでこのモデルを動かすことができます。
|
36 |
+
```python
|
37 |
+
import torch
|
38 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
|
39 |
+
|
40 |
+
# モデルのロード
|
41 |
+
model_name = "DataPilot/ArrowNeo-AME-3x4B-v0.1-MoE"
|
42 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
43 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
44 |
+
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
45 |
+
set_seed(123)
|
46 |
+
|
47 |
+
# ユーザーの入力
|
48 |
+
user_input = [{"role": "user", "content": "こんにちは。Pythonを用いてstrawberryのRをカウントするコードを書いて下さい。"}]
|
49 |
+
|
50 |
+
# モデルによる応答生成
|
51 |
+
responses = chat_pipeline(
|
52 |
+
user_input,
|
53 |
+
max_length=50,
|
54 |
+
do_sample=True,
|
55 |
+
num_return_sequences=2,
|
56 |
+
)
|
57 |
+
|
58 |
+
# 応答を表示
|
59 |
+
for i, response in enumerate(responses, 1):
|
60 |
+
print(f"Response {i}: {response['generated_text']}")
|
61 |
+
```
|
62 |
+
|
63 |
+
## Limitations
|
64 |
+
|
65 |
+
このモデルには、安全トレーニングが制限されています。
|
66 |
+
したがって、いくつかの無意味なシーケンス、いくつかの不正確なインスタンス、または偏った/不快な出力を生成する可能性があります。
|
67 |
+
使用する前に、開発者は人間の好みと安全上の考慮事項に基づいてモデルを調整していただきたいと思います。
|
68 |
+
|
69 |
+
## License
|
70 |
+
|
71 |
+
MIT license
|
72 |
+
このモデルのライセンスは[元モデルのライセンス](https://huggingface.co/sbintuitions/sarashina2.2-3b-instruct-v0.1/blob/main/LICENSE)に準拠します。
|