Downloads · 30 days
12
21% of all-time downloads
47ag925/kormed-mcqa-klue-roberta
kormed-mcqa-klue-roberta is a multiple choice model from 47ag925. Use it for the multiple choice task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
한국 의사 국가고시(KorMedMCQA) doctor 데이터셋으로 파인튜닝한 5지선다 분류 모델입니다.
Downloads · 30 days
12
21% of all-time downloads
All-time downloads
57
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors443 MB · 100%
From the Hugging Face model README
한국 의사 국가고시(KorMedMCQA) doctor 데이터셋으로 파인튜닝한 5지선다 분류 모델입니다.
| 항목 | 내용 |
|---|---|
| 베이스 모델 | klue/roberta-base |
| 태스크 | 한국어 의료 5지선다 QA |
| 데이터셋 | sean0042/KorMedMCQA (doctor config) |
| 훈련 데이터 | train 1,890 / dev 164 / test 435 |
| 에포크 | 3 |
| 배치 크기 | 16 |
| 학습률 | 2e-5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
REPO_ID = '47ag925/kormed-mcqa-klue-roberta'
tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
model = AutoModelForSequenceClassification.from_pretrained(REPO_ID)
model.eval()
CHOICES = ['A', 'B', 'C', 'D', 'E']
def predict(question, options):
text = question
for c, opt in zip(CHOICES, options):
text += f' {c}: {opt}'
inputs = tokenizer(text, return_tensors='pt', truncation=True, max_length=256)
with torch.no_grad():
logits = model(**inputs).logits
return CHOICES[logits.argmax(-1).item()]