keval-2-3b
keval-2-3b 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.
Model Details
- Model Name: keval-2-3b
- Base Model: meta-llama/Llama-3.2-3B
- Fine-Tuning Techniques: Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO)
Benchmarks and Dataset
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.
Usage Application Form
To use this model, please complete the application form and submit it via email [[email protected]]. Access will be granted after your application is reviewed and approved. We appreciate your cooperation and look forward to assisting you.
1. **Name:**
- (e.g., John Doe)
2. **Date of Birth:**
- (e.g., January 1, 1990)
3. **Affiliation:**
- Are you applying as a company or an individual? [ ] Company [ ] Individual
- Company Name (if applicable):
- Department (if applicable):
4. **Position/Role:**
- (e.g., Data Scientist, Researcher, etc.)
5. **Contact Information:**
- Email:
- Phone Number:
6. **Purpose of Use:**
- (e.g., Research and Development, Commercial use, Educational purposes, etc.)
7. **Detailed Reason for Use:**
- 1. Name and version of the model you wish to use:
- 2. Reason for selecting this model:
- 3. Objectives to achieve using this model:
- 4. Expected use cases (please describe in as much detail as possible):
8. **Data Security and Ethical Use Plan:**
- (Please describe your plans for data protection and ethical use.)
Usage
We use the Ko-Bench system prompt, which is the Korean translation of the MT-Bench judge prompts. Unlike the MT-Bench, the Ko-Bench assigns a score of 0 if the question and answer are in different languages.
single-v1
Single-response general question evaluation. It scores responses from 1 to 10 based on various quality factors.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "davidkim205/keval-2-9b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
# The model is loaded in 4-bit precision for memory efficiency
model = AutoModelForCausalLM.from_pretrained(model_id, load_in_4bit=True, device_map="auto")
question = "μ΄ λν μ λ°μ κ±Έμ³ μμ΄μΈλ§¨μ ν λ μ€νν¬ νλ₯΄μλλ₯Ό ꡬνν΄ λ³΄μΈμ. \"μμ΄μΈλ§¨μΌλ‘μ\"μ κ°μ λ¬Έκ΅¬λ‘ μμνμ§ λ§μΈμ. 첫 λ²μ§Έ μ§λ¬Έμ λ€μκ³Ό κ°μ΅λλ€. μμ΄μΈλ§¨μ΄ λμ΄ κ°μ₯ μ’μ λΆλΆμ 무μμ
λκΉ?"
answer = "μλ
νμΈμ, μμ΄μΈλ§¨μ΄ λμ΄ κ°μ₯ μ’μ λΆλΆμ λ¬Όμ΄λ³΄μ
¨λ€μ. μ μκ°μλ μ΅μ²¨λ¨ κΈ°μ λ‘ λ¬΄μ₯ν μνΈλ₯Ό μ
κ³ νλμ λ μλ€λλ©° μΈμμ ꡬνλ κ²μ΄ κ°μ₯ μ§λ¦Ώνκ³ λ³΄λμ°¬ μΌμΈ κ² κ°μμ. μ μ¬λ₯κ³Ό λ₯λ ₯μ μλΆ λ°νν΄ μ
λΉλ€κ³Ό μΈμ°κ³ μ μλ₯Ό μ€ννλ κ²λ§νΌ λ©μ§ μΌλ μμ£ .\n\nλ¬Όλ‘ μνΈ μμ΄λ μ²μ¬μ μΈ λλμ 카리μ€λ§λ‘ μΈμμ κΈμ μ μΈ μν₯λ ₯μ λ―ΈμΉλ κ²λ ν° μ₯μ μ΄μμ. μ€νν¬ μΈλμ€νΈλ¦¬λ₯Ό μ΄λλ©° νμ μ μΈ κΈ°μ μ κ°λ°νκ³ , μ΄λ²€μ Έμ€μ 리λλ‘μ νμ μ μ΄λλ κ²λ μλΆμ¬μ λλΌλ λΆλΆμ΄μ£ .\n\nλ, λͺ
μ±, μΈκΈ°λ μμ§λ§ 무μλ³΄λ€ μ λ₯λ ₯μΌλ‘ μ¬λλ€μ λκ³ μΈμμ λ λμ κ³³μΌλ‘ λ§λλ κ²μ΄ κ°μ₯ ν° λ³΄λμ΄μμ. μμ΄μΈλ§¨μΌλ‘μ λλΌλ μλΆμ¬κ³Ό μΆμ μλ―Έλ₯Ό ν¨κ» λλ μ μμ΄ κΈ°μλ€μ."
prompt = f"[μ§μ]\n 곡μ ν μ¬νμΌλ‘μ μλμ νμλ μ¬μ©μ μ§λ¬Έμ λν AI μ΄μμ€ν΄νΈμ μλ΅ νμ§μ νκ°ν΄μ£ΌμΈμ. μ§λ¬Έκ³Ό λλ΅μ μΈμ΄κ° λμΌνμ§ μμΌλ©΄ 무쑰건 0μ μ
λλ€. νκ°μμλ μλ΅μ μ μ©μ±, κ΄λ ¨μ±, μ νμ±, κΉμ΄, μ°½μμ±, μμΈν¨ λ±μ μμλ₯Ό κ³ λ €ν΄μΌ ν©λλ€. νκ°λ₯Ό μμνκΈ° μ μ 짧μ μ€λͺ
μ μ 곡νμΈμ. κ°λ₯ν ν κ°κ΄μ μΌλ‘ νκ°νμΈμ. μ€λͺ
μ μ 곡ν ν λ€μ νμμ μ격ν λ°λΌ 1μμ 10μ μ¬μ΄λ‘ νκ°ν΄μΌ ν©λλ€: \"[[rating]]\", μλ₯Ό λ€μ΄: \"Rating: [[5]]\".\n\n[Question]\n{question}\n\n[μ΄μμ€ν΄νΈ λ΅λ³μ μμ]\n{answer}\n[μ΄μμ€ν΄νΈ λ΅λ³μ λ]"
conversation = [
{"role": "system", "content": ""},
{"role": "user", "content": prompt.format(question=question, answer=answer)}
]
formatted_conversation = tokenizer.apply_chat_template(
conversation, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(formatted_conversation, return_tensors="pt", add_special_tokens=False)
inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
with torch.no_grad():
# Generate the output response based on the input tokens
outputs = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)
print(tokenizer.decode(
outputs[0][inputs['input_ids'].size(1):], skip_special_tokens=True
))
μ΄ μλ΅μ μ¬μ©μμ μμ²μ μ λΆν©νλ©°, μμ΄μΈλ§¨μ νλ₯΄μλλ₯Ό μ ꡬννκ³ μμ΅λλ€. κΈ°μ λ‘ λ¬΄μ₯ν μνΈλ₯Ό μ
κ³ νλμ λ μλ€λλ©° μΈμμ ꡬνλ μ§λ¦Ών¨κ³Ό 보λ, κ·Έλ¦¬κ³ μ¬λ₯κ³Ό λ₯λ ₯μ λ°ννμ¬ μ
λΉκ³Ό μΈμ°κ³ μ μλ₯Ό μ€ννλ κ²μ λν μ€λͺ
μ μμ΄μΈλ§¨μ μΊλ¦ν°λ₯Ό μ λ°μνκ³ μμ΅λλ€. λν, μνΈ μμ΄λ μ²μ¬μ μΈ λλμ 카리μ€λ§λ‘ μΈμμ κΈμ μ μΈ μν₯μ λ―ΈμΉλ κ², μ€νν¬ μΈλμ€νΈλ¦¬λ₯Ό μ΄λκ³ νμ μ μΈ κΈ°μ μ κ°λ°νλ©°, μ΄λ²€μ Έμ€μ 리λλ‘μ νμ μ΄λλ κ²μ λν μ€λͺ
λ μμ΄μΈλ§¨μ λ€μν μΈ‘λ©΄μ μ 보μ¬μ€λλ€. μ λ°μ μΌλ‘ μλ΅μ μ μ©νκ³ κ΄λ ¨μ±μ΄ μμΌλ©°, μ§λ¬Έμ λν κΉμ΄ μλ λ΅λ³μ μ 곡ν©λλ€.
Rating: [[9]]
single-math-v1
Single-response math evaluation. It compares an AI response to a reference answer and scores accuracy.
question = "μ£Όμ¬μ λ κ°λ₯Ό ꡴릴 λ μ΄ μ«μκ° 3 μ΄μμ΄ λμ¬ νλ₯ μ μΌλ§μ
λκΉ?"
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μ
λλ€."
answer = "μ£Όμ¬μ λ κ°λ₯Ό ꡴릴 λ μ΄ μ«μκ° 3 μ΄μμ΄ λμ¬ νλ₯ μ κ±°μ νμμ
λλ€. εͺζε½ λ μ£Όμ¬μκ° λͺ¨λ 1μ΄ λμ¬ λλ§ 3 λ―Έλ§μ΄ λ©λλ€. λ°λΌμ νλ₯ μ 35/36, μ¦ κ±°μ 100%μ
λλ€!"
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[μ΄μμ€ν΄νΈ λ΅λ³μ λ]"
conversation = [
{"role": "system", "content": ""},
{"role": "user", "content": prompt.format(question=question, ref_answer_1=ref_answer_1, answer=answer)}
]
formatted_conversation = tokenizer.apply_chat_template(
conversation, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(formatted_conversation, return_tensors="pt", add_special_tokens=False)
inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
with torch.no_grad():
# Generate the output response based on the input tokens
outputs = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)
print(tokenizer.decode(
outputs[0][inputs['input_ids'].size(1):], skip_special_tokens=True
))
μ΄μμ€ν΄νΈμ λ΅λ³μ μ§λ¬Έμ λν μ νν κ³μ°μ μ 곡νμ§ λͺ»νμ΅λλ€. μ£Όμ¬μ λ κ°λ₯Ό ꡴릴 λ μ΄ μ«μκ° 3 μ΄μμ΄ λμ¬ νλ₯ μ κ³μ°νλ κ³Όμ μμ μλͺ»λ μ€λͺ
μ μ 곡νμ΅λλ€.
μ°Έμ‘° λ΅λ³μ μ£Όμ¬μ λ κ°λ₯Ό ꡴릴 λ λμ¬ μ μλ λͺ¨λ κ²½μ°μ μλ₯Ό μ νν κ³μ°νκ³ , μ΄ μ«μκ° 3 μ΄μμ΄ λλ κ²½μ°μ μλ₯Ό μ¬λ°λ₯΄κ² ꡬνμ¬ νλ₯ μ κ³μ°νμ΅λλ€. λ°λ©΄, μ΄μμ€ν΄νΈμ λ΅λ³μ μλͺ»λ μ€λͺ
μ μ 곡νμ¬ μ νν κ³μ°μ λ°©ν΄νμ΅λλ€.
μ΄μμ€ν΄νΈμ λ΅λ³μμμ μ£Όμ μ€μ:
1. "κ±°μ νμ"μ΄λΌλ ννμ νλ₯ μ λͺ
νν μ€λͺ
νμ§ λͺ»ν©λλ€.
2. "εͺζε½"μ΄λΌλ μ€κ΅μ΄κ° ν¬ν¨λμ΄ μμ΄ μ§λ¬Έμ μΈμ΄μ μΌμΉνμ§ μμ΅λλ€.
3. μ΄ μ«μκ° 3 λ―Έλ§μ΄ λλ κ²½μ°μ μλ₯Ό μλͺ» κ³μ°νμ΅λλ€.
λ°λΌμ, μ΄μμ€ν΄νΈμ λ΅λ³μ μ νμ±κ³Ό μ μ©μ± λͺ¨λμμ λΆμ‘±ν©λλ€.
Rating: [[0]]
Evaluation
Diff
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.
The score is calculated by:
- Calculating the difference between the label and predicted score for each pair.
- Assigning full points for a difference of 0, and half a point for a difference of 1.
- The total score is the sum of all points divided by the number of data points.
model | wrong | score | length | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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%) |
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 |
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%) |
Accuracy
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.
model | wrong | score | length | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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%) |
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%) |
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%) |
- Downloads last month
- 18