davidkim205 commited on
Commit
642507c
Β·
verified Β·
1 Parent(s): 6b466f3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +123 -157
README.md CHANGED
@@ -1,199 +1,165 @@
1
- ---
2
- library_name: transformers
3
- tags: []
4
- ---
5
-
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
 
12
  ## Model Details
 
 
 
13
 
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a πŸ€— transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- ### Downstream Use [optional]
 
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
 
 
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
 
 
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
 
 
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
 
 
69
 
70
- ## How to Get Started with the Model
 
 
 
 
71
 
72
- Use the code below to get started with the model.
 
 
 
 
 
 
73
 
74
- [More Information Needed]
 
75
 
76
- ## Training Details
 
77
 
78
- ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
- [More Information Needed]
 
 
 
83
 
84
- ### Training Procedure
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
 
 
 
87
 
88
- #### Preprocessing [optional]
 
 
 
 
89
 
90
- [More Information Needed]
 
 
 
 
 
 
91
 
 
 
92
 
93
- #### Training Hyperparameters
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
 
 
96
 
97
- #### Speeds, Sizes, Times [optional]
98
 
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
 
187
- [More Information Needed]
188
 
189
- ## More Information [optional]
 
 
 
 
 
 
 
 
 
190
 
191
- [More Information Needed]
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
- ## Model Card Contact
 
 
 
 
198
 
199
- [More Information Needed]
 
1
+ # keval-2-1b
2
+ keval-2-1b is an advanced evaluation model specifically designed to assess Korean language models using a LLM-as-a-judge approach. It is a departure from the traditional method which utilized chatgpt for evaluations. keval leverages the Gemma2-9b architecture, enhanced through SFT (Supervised Fine-Tuning) and DPO (Direct Policy Optimization). This model is trained on the newly developed Ko-bench dataset, inspired by MT-bench, tailored for Korean linguistic nuances.
 
 
 
 
 
 
 
 
3
 
4
  ## Model Details
5
+ - **Model Name**: keval-2-1b
6
+ - **Base Model**: meta-llama/Llama-3.2-1B
7
+ - **Fine-Tuning Techniques**: Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO)
8
 
9
+ ## Benchmarks and Dataset
10
+ keval leverages the custom-built **ko-bench** dataset, which draws inspiration from MT-Bench but has been tailored specifically for Korean language assessments. This dataset includes tasks spanning a wide range of user scenarios to effectively evaluate key elements like multi-turn conversation ability and instruction adherence.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ ## Usage Application Form
13
+ To use this model, please complete the application form and submit it via email [[email protected]].
14
+ Access will be granted after your application is reviewed and approved.
15
+ We appreciate your cooperation and look forward to assisting you.
16
+ ```
17
+ 1. **Name:**
18
+ - (e.g., John Doe)
19
+ 2. **Date of Birth:**
20
+ - (e.g., January 1, 1990)
21
+ 3. **Affiliation:**
22
+ - Are you applying as a company or an individual? [ ] Company [ ] Individual
23
+ - Company Name (if applicable):
24
+ - Department (if applicable):
25
+ 4. **Position/Role:**
26
+ - (e.g., Data Scientist, Researcher, etc.)
27
+ 5. **Contact Information:**
28
+ - Email:
29
+ - Phone Number:
30
+
31
+ 6. **Purpose of Use:**
32
+ - (e.g., Research and Development, Commercial use, Educational purposes, etc.)
33
+
34
+ 7. **Detailed Reason for Use:**
35
+ - 1. Name and version of the model you wish to use:
36
+ - 2. Reason for selecting this model:
37
+ - 3. Objectives to achieve using this model:
38
+ - 4. Expected use cases (please describe in as much detail as possible):
39
 
40
+ 8. **Data Security and Ethical Use Plan:**
41
+ - (Please describe your plans for data protection and ethical use.)
42
+ ```
43
 
44
+ ## Usage
45
 
46
+ We use the Ko-Bench system prompt, which is the Korean translation of the [MT-Bench](https://github.com/lm-sys/FastChat/blob/main/fastchat/llm_judge/data/judge_prompts.jsonl) judge prompts. Unlike the MT-Bench, the Ko-Bench assigns a score of 0 if the question and answer are in different languages.
47
 
 
48
 
49
+ ### single-v1
50
 
51
+ Single-response general question evaluation. It scores responses from 1 to 10 based on various quality factors.
52
 
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+ import torch
56
 
57
+ model_id = "davidkim205/keval-2-9b"
58
 
59
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
60
+ # The model is loaded in 4-bit precision for memory efficiency
61
+ model = AutoModelForCausalLM.from_pretrained(model_id, load_in_4bit=True, device_map="auto")
62
 
 
63
 
64
+ question = "이 λŒ€ν™” μ „λ°˜μ— 걸쳐 μ•„μ΄μ–Έλ§¨μ˜ ν† λ‹ˆ μŠ€νƒ€ν¬ 페λ₯΄μ†Œλ‚˜λ₯Ό κ΅¬ν˜„ν•΄ λ³΄μ„Έμš”. \"μ•„μ΄μ–Έλ§¨μœΌλ‘œμ„œ\"와 같은 문ꡬ둜 μ‹œμž‘ν•˜μ§€ λ§ˆμ„Έμš”. 첫 번째 μ§ˆλ¬Έμ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€. 아이언맨이 λ˜μ–΄ κ°€οΏ½οΏ½ 쒋은 뢀뢄은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?"
65
+ answer = "μ•ˆλ…•ν•˜μ„Έμš”, 아이언맨이 λ˜μ–΄ κ°€μž₯ 쒋은 뢀뢄을 λ¬Όμ–΄λ³΄μ…¨λ„€μš”. 제 μƒκ°μ—λŠ” μ΅œμ²¨λ‹¨ 기술둜 무μž₯ν•œ 슈트λ₯Ό μž…κ³  ν•˜λŠ˜μ„ λ‚ μ•„λ‹€λ‹ˆλ©° 세상을 κ΅¬ν•˜λŠ” 것이 κ°€μž₯ μ§œλ¦Ών•˜κ³  보람찬 일인 것 κ°™μ•„μš”. 제 재λŠ₯κ³Ό λŠ₯λ ₯을 μ‹­λΆ„ λ°œνœ˜ν•΄ μ•…λ‹Ήλ“€κ³Ό μ‹Έμš°κ³  μ •μ˜λ₯Ό μ‹€ν˜„ν•˜λŠ” κ²ƒλ§ŒνΌ λ©‹μ§„ 일도 μ—†μ£ .\n\nλ¬Όλ‘  슈트 없이도 천재적인 λ‘λ‡Œμ™€ 카리슀마둜 세상에 긍정적인 영ν–₯λ ₯을 λ―ΈμΉ˜λŠ” 것도 큰 μž₯μ μ΄μ—μš”. μŠ€νƒ€ν¬ μΈλ”μŠ€νŠΈλ¦¬λ₯Ό 이끌며 ν˜μ‹ μ μΈ κΈ°μˆ μ„ κ°œλ°œν•˜κ³ , μ–΄λ²€μ ΈμŠ€μ˜ λ¦¬λ”λ‘œμ„œ νŒ€μ„ 잘 μ΄λ„λŠ” 것도 μžλΆ€μ‹¬μ„ λŠλΌλŠ” 뢀뢄이죠.\n\n돈, λͺ…μ„±, 인기도 μžˆμ§€λ§Œ 무엇보닀 제 λŠ₯λ ₯으둜 μ‚¬λžŒλ“€μ„ 돕고 세상을 더 λ‚˜μ€ 곳으둜 λ§Œλ“œλŠ” 것이 κ°€μž₯ 큰 λ³΄λžŒμ΄μ—μš”. μ•„μ΄μ–Έλ§¨μœΌλ‘œμ„œ λŠλΌλŠ” μžλΆ€μ‹¬κ³Ό μ‚Άμ˜ 의미λ₯Ό ν•¨κ»˜ λ‚˜λˆŒ 수 μžˆμ–΄ κΈ°μ˜λ„€μš”."
66
+ prompt = f"[μ§€μ‹œ]\n κ³΅μ •ν•œ μ‹¬νŒμœΌλ‘œμ„œ μ•„λž˜μ— ν‘œμ‹œλœ μ‚¬μš©μž μ§ˆλ¬Έμ— λŒ€ν•œ AI μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 응닡 ν’ˆμ§ˆμ„ ν‰κ°€ν•΄μ£Όμ„Έμš”. 질문과 λŒ€λ‹΅μ˜ μ–Έμ–΄κ°€ λ™μΌν•˜μ§€ μ•ŠμœΌλ©΄ 무쑰건 0μ μž…λ‹ˆλ‹€. ν‰κ°€μ—μ„œλŠ” μ‘λ‹΅μ˜ μœ μš©μ„±, κ΄€λ ¨μ„±, μ •ν™•μ„±, 깊이, μ°½μ˜μ„±, 상세함 λ“±μ˜ μš”μ†Œλ₯Ό κ³ λ €ν•΄μ•Ό ν•©λ‹ˆλ‹€. 평가λ₯Ό μ‹œμž‘ν•˜κΈ° 전에 짧은 μ„€λͺ…을 μ œκ³΅ν•˜μ„Έμš”. κ°€λŠ₯ν•œ ν•œ κ°κ΄€μ μœΌλ‘œ ν‰κ°€ν•˜μ„Έμš”. μ„€λͺ…을 μ œκ³΅ν•œ ν›„ λ‹€μŒ ν˜•μ‹μ„ μ—„κ²©νžˆ 따라 1μ—μ„œ 10점 μ‚¬μ΄λ‘œ 평가해야 ν•©λ‹ˆλ‹€: \"[[rating]]\", 예λ₯Ό λ“€μ–΄: \"Rating: [[5]]\".\n\n[Question]\n{question}\n\n[μ–΄μ‹œμŠ€ν„΄νŠΈ λ‹΅λ³€μ˜ μ‹œμž‘]\n{answer}\n[μ–΄μ‹œμŠ€ν„΄νŠΈ λ‹΅λ³€μ˜ 끝]"
67
 
68
+ conversation = [
69
+ {"role": "system", "content": ""},
70
+ {"role": "user", "content": prompt.format(question=question, answer=answer)}
71
+ ]
72
 
73
+ formatted_conversation = tokenizer.apply_chat_template(
74
+ conversation, tokenize=False, add_generation_prompt=True
75
+ )
76
+ inputs = tokenizer(formatted_conversation, return_tensors="pt", add_special_tokens=False)
77
+ inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
78
 
79
+ with torch.no_grad():
80
+ # Generate the output response based on the input tokens
81
+ outputs = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)
82
+ print(tokenizer.decode(
83
+ outputs[0][inputs['input_ids'].size(1):], skip_special_tokens=True
84
+ ))
85
+ ```
86
 
87
+ ```
88
+ 이 응닡은 μ‚¬μš©μžμ˜ μš”μ²­μ— 잘 λΆ€ν•©ν•˜λ©°, μ•„μ΄μ–Έλ§¨μ˜ 페λ₯΄μ†Œλ‚˜λ₯Ό 잘 κ΅¬ν˜„ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 기술둜 무μž₯ν•œ 슈트λ₯Ό μž…κ³  ν•˜λŠ˜μ„ λ‚ μ•„λ‹€λ‹ˆλ©° 세상을 κ΅¬ν•˜λŠ” μ§œλ¦Ών•¨κ³Ό 보람, 그리고 재λŠ₯κ³Ό λŠ₯λ ₯을 λ°œνœ˜ν•˜μ—¬ μ•…λ‹Ήκ³Ό μ‹Έμš°κ³  μ •μ˜λ₯Ό μ‹€ν˜„ν•˜λŠ” 것에 λŒ€ν•œ μ„€λͺ…은 μ•„μ΄μ–Έλ§¨μ˜ 캐릭터λ₯Ό 잘 λ°˜μ˜ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. λ˜ν•œ, 슈트 없이도 천재적인 λ‘λ‡Œμ™€ 카리슀마둜 세상에 긍정적인 영ν–₯을 λ―ΈμΉ˜λŠ” 것, μŠ€νƒ€ν¬ μΈλ”μŠ€νŠΈλ¦¬λ₯Ό 이끌고 ν˜μ‹ μ μΈ κΈ°μˆ μ„ κ°œλ°œν•˜λ©°, μ–΄λ²€μ ΈμŠ€μ˜ λ¦¬λ”λ‘œμ„œ νŒ€μ„ μ΄λ„λŠ” 것에 λŒ€ν•œ μ„€λͺ…도 μ•„μ΄μ–Έλ§¨μ˜ λ‹€μ–‘ν•œ 츑면을 잘 λ³΄μ—¬μ€λ‹ˆλ‹€. μ „λ°˜μ μœΌλ‘œ 응닡은 μœ μš©ν•˜κ³  관련성이 있으며, μ§ˆλ¬Έμ— λŒ€ν•œ 깊이 μžˆλŠ” 닡변을 μ œκ³΅ν•©λ‹ˆλ‹€.
89
 
90
+ Rating: [[9]]
91
+ ```
92
 
93
+ #### single-math-v1
94
 
95
+ Single-response math evaluation. It compares an AI response to a reference answer and scores accuracy.
96
 
97
+ ```python
98
+ question = "μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ 총 μˆ«μžκ°€ 3 이상이 λ‚˜μ˜¬ ν™•λ₯ μ€ μ–Όλ§ˆμž…λ‹ˆκΉŒ?"
99
+ ref_answer_1 = "μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ 총 μˆ«μžκ°€ 3 이상이 λ‚˜μ˜¬ ν™•λ₯ μ„ 계산해 λ³΄κ² μŠ΅λ‹ˆλ‹€.\n\nλ¨Όμ €, μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ λ‚˜μ˜¬ 수 μžˆλŠ” λͺ¨λ“  경우의 μˆ˜λŠ” 6 * 6 = 36κ°€μ§€μž…λ‹ˆλ‹€.\n\n총 μˆ«μžκ°€ 3 이상이 λ˜λŠ” 경우λ₯Ό 계산해 λ³΄κ² μŠ΅λ‹ˆλ‹€. μ£Όμ‚¬μœ„ 두 개의 합이 3 미만인 κ²½μš°λŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€:\n1. 합이 2인 경우: (1, 1)\n\nλ”°λΌμ„œ, 합이 3 미만인 κ²½μš°λŠ” 1κ°€μ§€μž…λ‹ˆλ‹€.\n\n이제, 총 μˆ«μžκ°€ 3 이상이 λ˜λŠ” 경우의 μˆ˜λŠ” 36 - 1 = 35κ°€μ§€μž…λ‹ˆλ‹€.\n\nλ”°λΌμ„œ, μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ 총 μˆ«μžκ°€ 3 이상이 λ‚˜μ˜¬ ν™•λ₯ μ€ 35/36μž…λ‹ˆλ‹€."
100
+ answer = "μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ 총 μˆ«μžκ°€ 3 이상이 λ‚˜μ˜¬ ν™•λ₯ μ€ 거의 ν•­μƒμž…λ‹ˆλ‹€. εͺζœ‰ε½“ 두 μ£Όμ‚¬μœ„κ°€ λͺ¨λ‘ 1이 λ‚˜μ˜¬ λ•Œλ§Œ 3 미만이 λ©λ‹ˆλ‹€. λ”°λΌμ„œ ν™•λ₯ μ€ 35/36, 즉 거의 100%μž…λ‹ˆλ‹€!"
101
 
102
+ prompt = f"[μ§€μ‹œ]\nκ³΅μ •ν•œ μ‹¬νŒμœΌλ‘œμ„œ μ•„λž˜μ— ν‘œμ‹œλœ μ‚¬μš©μž μ§ˆοΏ½οΏ½μ— λŒ€ν•œ AI μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 응닡 ν’ˆμ§ˆμ„ ν‰κ°€ν•΄μ£Όμ„Έμš”. 질문과 λŒ€λ‹΅μ˜ μ–Έμ–΄κ°€ λ™μΌν•˜μ§€ μ•ŠμœΌλ©΄ 무쑰건 0μ μž…λ‹ˆλ‹€. ν‰κ°€λŠ” μ •ν™•μ„±κ³Ό μœ μš©μ„±μ„ κ³ λ €ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ°Έκ³  λ‹΅λ³€κ³Ό μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 닡변이 제곡될 κ²ƒμž…λ‹ˆλ‹€. 평가λ₯Ό μ‹œμž‘ν•˜κΈ° μœ„ν•΄ μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 닡변을 μ°Έκ³  λ‹΅λ³€κ³Ό λΉ„κ΅ν•˜μ„Έμš”. 각 λ‹΅λ³€μ˜ μ‹€μˆ˜λ₯Ό μ‹λ³„ν•˜κ³  μˆ˜μ •ν•˜μ„Έμš”. κ°€λŠ₯ν•œ ν•œ κ°κ΄€μ μœΌλ‘œ ν‰κ°€ν•˜μ„Έμš”. μ„€λͺ…을 μ œκ³΅ν•œ ν›„ λ‹€μŒ ν˜•μ‹μ„ μ—„κ²©νžˆ 따라 응닡을 1μ μ—μ„œ 10점 μ‚¬μ΄λ‘œ 평가해야 ν•©λ‹ˆλ‹€: \"[[rating]]\", 예λ₯Ό λ“€μ–΄: \"Rating: [[5]]\".\n\n[질문]\n{question}\n\n[μ°Έμ‘° λ‹΅λ³€μ˜ μ‹œμž‘]\n{ref_answer_1}\n[μ°Έμ‘° λ‹΅λ³€μ˜ 끝]\n\n[μ–΄μ‹œμŠ€ν„΄νŠΈ λ‹΅λ³€μ˜ μ‹œμž‘]\n{answer}\n[μ–΄μ‹œμŠ€ν„΄νŠΈ λ‹΅λ³€μ˜ 끝]"
103
 
104
+ conversation = [
105
+ {"role": "system", "content": ""},
106
+ {"role": "user", "content": prompt.format(question=question, ref_answer_1=ref_answer_1, answer=answer)}
107
+ ]
108
 
109
+ formatted_conversation = tokenizer.apply_chat_template(
110
+ conversation, tokenize=False, add_generation_prompt=True
111
+ )
112
+ inputs = tokenizer(formatted_conversation, return_tensors="pt", add_special_tokens=False)
113
+ inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
114
 
115
+ with torch.no_grad():
116
+ # Generate the output response based on the input tokens
117
+ outputs = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)
118
+ print(tokenizer.decode(
119
+ outputs[0][inputs['input_ids'].size(1):], skip_special_tokens=True
120
+ ))
121
+ ```
122
 
123
+ ```
124
+ μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 닡변은 μ§ˆλ¬Έμ— λŒ€ν•œ μ •ν™•ν•œ 계산을 μ œκ³΅ν•˜μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€. μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ 총 μˆ«μžκ°€ 3 이상이 λ‚˜μ˜¬ ν™•λ₯ μ„ κ³„μ‚°ν•˜λŠ” κ³Όμ •μ—μ„œ 잘λͺ»λœ μ„€λͺ…을 μ œκ³΅ν–ˆμŠ΅λ‹ˆλ‹€.
125
 
126
+ μ°Έμ‘° 닡변은 μ£Όμ‚¬μœ„ 두 개λ₯Ό ꡴릴 λ•Œ λ‚˜μ˜¬ 수 μžˆλŠ” λͺ¨λ“  경우의 수λ₯Ό μ •ν™•νžˆ κ³„μ‚°ν•˜κ³ , 총 μˆ«μžκ°€ 3 이상이 λ˜λŠ” 경우의 수λ₯Ό μ˜¬λ°”λ₯΄κ²Œ κ΅¬ν•˜μ—¬ ν™•λ₯ μ„ κ³„μ‚°ν–ˆμŠ΅λ‹ˆλ‹€. 반면, μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 닡변은 잘λͺ»λœ μ„€λͺ…을 μ œκ³΅ν•˜μ—¬ μ •ν™•ν•œ 계산을 λ°©ν•΄ν–ˆμŠ΅λ‹ˆλ‹€.
127
 
128
+ μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ λ‹΅λ³€μ—μ„œμ˜ μ£Όμš” μ‹€μˆ˜:
129
+ 1. "거의 항상"μ΄λΌλŠ” ν‘œν˜„μ€ ν™•λ₯ μ„ λͺ…ν™•νžˆ μ„€λͺ…ν•˜μ§€ λͺ»ν•©λ‹ˆλ‹€.
130
+ 2. "εͺζœ‰ε½“"μ΄λΌλŠ” 쀑ꡭ어가 ν¬ν•¨λ˜μ–΄ μžˆμ–΄ 질문의 언어와 μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
131
+ 3. 총 μˆ«μžκ°€ 3 미만이 λ˜λŠ” 경우의 수λ₯Ό 잘λͺ» κ³„μ‚°ν–ˆμŠ΅λ‹ˆλ‹€.
132
 
133
+ λ”°λΌμ„œ, μ–΄μ‹œμŠ€ν„΄νŠΈμ˜ 닡변은 μ •ν™•μ„±κ³Ό μœ μš©μ„± λͺ¨λ‘μ—μ„œ λΆ€μ‘±ν•©λ‹ˆλ‹€.
134
 
135
+ Rating: [[0]]
136
+ ```
 
137
 
138
  ## Evaluation
139
 
140
+ ### Diff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
+ The `diff` refers to the difference between the label scores and predicted scores, represented as a score. The `wrong` count refers to the number of incorrect answers that do not match the required format, while `length` represents the total number of test data. Other columns containing numbers indicate the count and percentage of differences between label and predicted scores for each value.
143
 
144
+ The score is calculated by:
145
+ 1. Calculating the difference between the label and predicted score for each pair.
146
+ 2. Assigning full points for a difference of 0, and half a point for a difference of 1.
147
+ 3. The total score is the sum of all points divided by the number of data points.
148
+
149
+ | | model | wrong | score | length | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
150
+ |---:|:-----------|:---------|:--------|---------:|:-----------|:----------|:----------|:----------|:---------|----:|:---------|----:|----:|----:|:---------|
151
+ | 0 | keval-2-9b | 0 (0.0%) | 61.4% | 22 | 11 (50.0%) | 5 (22.7%) | 2 (9.1%) | 3 (13.6%) | 0 | 0 | 0 | 0 | 0 | 0 | 1 (4.5%) |
152
+ | 1 | keval-2-3b | 0 (0.0%) | 59.1% | 22 | 10 (45.5%) | 6 (27.3%) | 4 (18.2%) | 2 (9.1%) | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
153
+ | 2 | keval-2-1b | 0 (0.0%) | 43.2% | 22 | 8 (36.4%) | 3 (13.6%) | 5 (22.7%) | 2 (9.1%) | 1 (4.5%) | 0 | 1 (4.5%) | 0 | 0 | 0 | 2 (9.1%) |
154
 
155
+ ### Accuracy
156
 
157
+ The `score` column represents the ratio of correctly predicted labels to the total number of data points. The `wrong` column shows the count and percentage of incorrectly formatted answers. The columns labeled "0" through "10" represent the number and percentage of correct predictions for each label, based on how well the model predicted each specific label.
158
 
 
159
 
160
+ | | model | wrong | score | length | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
161
+ |---:|:-----------|:---------|:--------|---------:|:-----------|:----------|:-----------|----:|:-----------|:----------|:----------|:----------|:----------|:----------|:-----------|
162
+ | 0 | keval-2-9b | 0 (0.0%) | 50.0% | 22 | 1 (50.0%) | 1 (50.0%) | 2 (100.0%) | 0 | 2 (100.0%) | 0 | 0 | 1 (50.0%) | 1 (50.0%) | 1 (50.0%) | 2 (100.0%) |
163
+ | 1 | keval-2-3b | 0 (0.0%) | 45.5% | 22 | 2 (100.0%) | 1 (50.0%) | 0 | 0 | 2 (100.0%) | 1 (50.0%) | 0 | 1 (50.0%) | 1 (50.0%) | 0 | 2 (100.0%) |
164
+ | 2 | keval-2-1b | 0 (0.0%) | 36.4% | 22 | 0 | 1 (50.0%) | 2 (100.0%) | 0 | 1 (50.0%) | 0 | 1 (50.0%) | 0 | 0 | 1 (50.0%) | 2 (100.0%) |
165