Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,60 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- ja
|
5 |
+
- en
|
6 |
+
base_model:
|
7 |
+
- Qwen/Qwen2.5-32B-Instruct
|
8 |
+
- abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1
|
9 |
+
- cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese
|
10 |
+
---
|
11 |
+
|
12 |
+
## 概要
|
13 |
+
このモデルはDeepSeek社のR1蒸留モデルである(deepseek-ai/DeepSeek-R1-Distill-Qwen-32B)[https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B]を日本語ファインチューニングしたcyber agent社の(cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese)[https://huggingface.co/cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese]に対してAbeja社の(abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1)[https://huggingface.co/abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1]をChatVectorを用いて加えたものに、独自の日本語強化ファインチューニングをしたモデルとなります。
|
14 |
+
|
15 |
+
## How to use
|
16 |
+
```python
|
17 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
18 |
+
|
19 |
+
model_name = "DataPilot/Arrival-32B-Instruct-v0.1"
|
20 |
+
tokenizer_name = ""
|
21 |
+
|
22 |
+
if tokenizer_name == "":
|
23 |
+
tokenizer_name = model_name
|
24 |
+
|
25 |
+
model = AutoModelForCausalLM.from_pretrained(
|
26 |
+
model_name,
|
27 |
+
torch_dtype="auto",
|
28 |
+
device_map="auto"
|
29 |
+
)
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
|
31 |
+
|
32 |
+
prompt = "9.9と9.11はどちらのほうが大きいですか?"
|
33 |
+
messages = [
|
34 |
+
{"role": "system", "content": "あなたは優秀な日本語アシスタントであり長考モデルです。問題解決をするための思考をした上で回答を行ってください。"},
|
35 |
+
{"role": "user", "content": prompt}
|
36 |
+
]
|
37 |
+
text = tokenizer.apply_chat_template(
|
38 |
+
messages,
|
39 |
+
tokenize=False,
|
40 |
+
add_generation_prompt=True
|
41 |
+
)
|
42 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
43 |
+
|
44 |
+
generated_ids = model.generate(
|
45 |
+
**model_inputs,
|
46 |
+
max_new_tokens=1024
|
47 |
+
)
|
48 |
+
generated_ids = [
|
49 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
50 |
+
]
|
51 |
+
|
52 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
53 |
+
|
54 |
+
print(response)
|
55 |
+
```
|
56 |
+
|
57 |
+
## 謝辞
|
58 |
+
モデルの作成者であるDeepSeekチーム, Qwenチーム, Abejaチーム, CyberAgentチームに感謝を申し上げます。
|
59 |
+
|
60 |
+
また、計算資源を貸していただいたVOLTMINDにも感謝を申し上げます。
|