ptrdvn commited on
Commit
3498406
·
verified ·
1 Parent(s): acff0c5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -8
README.md CHANGED
@@ -1,22 +1,98 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- ## Qwen2.5-7B-Instruct-preference
7
 
8
- ### Model Description
9
 
10
- <!-- Provide a longer summary of what this model is. -->
11
 
12
- Qwen2.5-7B-Instruct-preference is a fine-tuned model based on [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct). This model is fine-tuned on [original dataset](lightblue/response-dataset-plus-qwen-judged). The fine-tuned were carried out at a 1024 context length.
13
 
14
- ### Benchmarking
15
- The benchmark score is obtained using [arena-hard-auto-multilingual](https://github.com/lightblue-tech/arena-hard-auto-multilingual).
16
- |Qwen2.5-7B-Instruct|Ours|
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