Update README.md
Browse files
README.md
CHANGED
@@ -1,22 +1,98 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|Qwen2.5-7B-Instruct|
|
17 |
|----|----|
|
18 |
|50.0|56.6|
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
### Model Details
|
21 |
- Model size: 7B
|
22 |
- Context length: 1024
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- DPO
|
5 |
+
license: apache-2.0
|
6 |
+
datasets:
|
7 |
+
- lightblue/response-dataset-plus-qwen-judged
|
8 |
+
language:
|
9 |
+
- ja
|
10 |
+
base_model:
|
11 |
+
- Qwen/Qwen2.5-7B-Instruct
|
12 |
---
|
13 |
|
14 |
+
[日本語モデルカード](#japanese)
|
15 |
|
16 |
+
[日本語のブログ]()
|
17 |
|
18 |
+
# Karasu-DPO-7B
|
19 |
|
20 |
+
This is a Japanese version of the [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model which was DPO trained using synthetic Japanese conversation data.
|
21 |
|
22 |
+
This model outperforms the base [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model on the [arena-hard-auto-multilingual](https://github.com/lightblue-tech/arena-hard-auto-multilingual) chat benchmark:
|
23 |
+
|
24 |
+
|Qwen2.5-7B-Instruct|Karasu-DPO-7B|
|
25 |
|----|----|
|
26 |
|50.0|56.6|
|
27 |
|
28 |
+
We recommend this model for use as a general conversatio AI.
|
29 |
+
|
30 |
+
# How to use
|
31 |
+
|
32 |
+
<ul>
|
33 |
+
<li><b>vLLM</b>
|
34 |
+
|
35 |
+
Install [vLLM](https://github.com/vllm-project/vllm/) using `pip install vllm`.
|
36 |
+
|
37 |
+
<details open>
|
38 |
+
<summary>Show vLLM code</summary>
|
39 |
+
|
40 |
+
```python
|
41 |
+
from vllm import LLM, SamplingParams
|
42 |
+
|
43 |
+
llm = LLM(
|
44 |
+
model="lightblue/DeepSeek-R1-Distill-Qwen-7B-Japanese",
|
45 |
+
max_model_len=8_000
|
46 |
+
)
|
47 |
+
|
48 |
+
sampling_params = SamplingParams(
|
49 |
+
temperature=0.5,
|
50 |
+
max_tokens=8_000,
|
51 |
+
repetition_penalty=1.1
|
52 |
+
)
|
53 |
+
|
54 |
+
prompts = [
|
55 |
+
"""学校には1クラスにつき20人の生徒がおり、クラスは合計3つあります。
|
56 |
+
学校全体では男子と女子がそれぞれ50%ずついます。
|
57 |
+
1つ目のクラスには女子が15人、2つ目のクラスには女子が12人います。
|
58 |
+
3つ目のクラスには何人の男子がいますか?"""
|
59 |
+
]
|
60 |
+
|
61 |
+
conversations = [
|
62 |
+
[{"role": "user", "content": x}] for x in prompts
|
63 |
+
]
|
64 |
+
|
65 |
+
outputs = llm.chat(conversations, sampling_params=sampling_params)
|
66 |
+
|
67 |
+
for output in outputs:
|
68 |
+
print(output.outputs[0].text)
|
69 |
+
|
70 |
+
<think>
|
71 |
+
# まず、学校の総生徒数を算出します。各クラスに20人の生徒があり、クラスは3つあるため、総生徒数は60人です。
|
72 |
+
|
73 |
+
# 次に、学校全体で男子と女子は同じ人数で分布しています。したがって、男子と女子各有30人。
|
74 |
+
...
|
75 |
+
# したがって、3つ目のクラスの男子数は20 - 3 = 17人です。
|
76 |
+
# </think>
|
77 |
+
|
78 |
+
# **解答:**
|
79 |
+
|
80 |
+
# 学校の総生徒数を算出します。
|
81 |
+
...
|
82 |
+
# **最終的な答え:**
|
83 |
+
# \[
|
84 |
+
# \boxed{17}
|
85 |
+
# \]
|
86 |
+
```
|
87 |
+
|
88 |
+
</details>
|
89 |
+
|
90 |
+
<br/>
|
91 |
+
|
92 |
+
<h1 style="font-size: 48px;" id="japanese">日本語</h3>
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
### Model Details
|
97 |
- Model size: 7B
|
98 |
- Context length: 1024
|