Downloads · 30 days
22
0% of all-time downloads
sinjy1203/EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval
EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval is a text classification model from sinjy1203. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model has been fine-tuned to evaluate whether the retrieved context for a question in RAG is correct with a yes or no answer.
Downloads · 30 days
22
0% of all-time downloads
All-time downloads
30.8K
Public
Parameters
10.8B
27.7 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors21.6 GB · 100%
From the Hugging Face model README
This model has been fine-tuned to evaluate whether the retrieved context for a question in RAG is correct with a yes or no answer.
The base model for this model is yanolja/EEVE-Korean-Instruct-10.8B-v1.0.
주어진 질문과 정보가 주어졌을 때 질문에 답하기에 충분한 정보인지 평가해줘.
정보가 충분한지를 평가하기 위해 "예" 또는 "아니오"로 답해줘.
### 질문:
{question}
### 정보:
{context}
### 평가:
import torch
from transformers import (
BitsAndBytesConfig,
AutoModelForCausalLM,
AutoTokenizer,
)
model_path = "sinjy1203/EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval"
nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.float16,
)
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path, quantization_config=nf4_config, device_map={'': 'cuda:0'}
)
prompt_template = '주어진 질문과 정보가 주어졌을 때 질문에 답하기에 충분한 정보인지 평가해줘.\n정보가 충분한지를 평가하기 위해 "예" 또는 "아니오"로 답해줘.\n\n### 질문:\n{question}\n\n### 정보:\n{context}\n\n### 평가:\n'
query = {
"question": "동아리 종강총회가 언제인가요?",
"context": "종강총회 날짜는 6월 21일입니다."
}
model_inputs = tokenizer(prompt_template.format_map(query), return_tensors='pt')
output = model.generate(**model_inputs, max_new_tokens=100, max_length=200)
print(output)
주어진 질문과 정보가 주어졌을 때 질문에 답하기에 충분한 정보인지 평가해줘.
정보가 충분한지를 평가하기 위해 "예" 또는 "아니오"로 답해줘.
### 질문:
동아리 종강총회가 언제인가요?
### 정보:
종강총회 날짜는 6월 21일입니다.
### 평가:
예<|end_of_text|>
| Model | Average | Ko-ARC | Ko-HellaSwag | Ko-MMLU | Ko-TruthfulQA | Ko-CommonGen V2 |
|---|---|---|---|---|---|---|
| EEVE-Korean-Instruct-10.8B-v1.0 | 56.08 | 55.2 | 66.11 | 56.48 | 49.14 | 53.48 |
| EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval | 56.1 | 55.55 | 65.95 | 56.24 | 48.66 | 54.07 |
| Model | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|
| EEVE-Korean-Instruct-10.8B-v1.0 | 0.824 | 0.800 | 0.885 | 0.697 |
| EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval | 0.892 | 0.875 | 0.903 | 0.848 |