Downloads · 30 days
15
13% of all-time downloads
youknowho/kanana-nano-2.1b-fft-KorMedMCQA-final
kanana-nano-2.1b-fft-KorMedMCQA-final is a text generation model from youknowho. Use it when you need the model to write or continue text. The card lists the license as cc-by-nc-4.0.
language: - ko tags: - causal-lm - korean - medical - multiple-choice - finetuning - transformers datasets: - sean0042/KorMedMCQA basemodel: kakaocorp/kanana-nano-2.1b-base libraryname: transformers
Downloads · 30 days
15
13% of all-time downloads
All-time downloads
116
Public
Parameters
2.1B
4.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.2 GB · 100%
From the Hugging Face model README
language:
This model is a **Full Fine-Tuned (FFT) variant of Kanana Nano 2.1B, adapted for the KorMedMCQA multiple-choice medical QA task.
kakaocorp/kanana-nano-2.1b-base⚠️ This model is intended for research and experimentation only.
It must NOT be used for real medical decision-making. The output of this model should not be considered as professional medical advice, diagnosis, or treatment. For accurate diagnosis and treatment of any specific medical issue, please consult a
qualified physician or healthcare professional.
Also, the commercial usage of this model is prohibited.
This model was fine-tuned to answer medical multiple-choice questions using a structured response format:
Answer: A / B / C / D / E
Rationale: (optional short explanation)
The tuning objective was to improve:
sean0042/KorMedMCQAConfigs were merged into unified train/dev/test splits.
Note: Evaluation also includes the
pharmsubset, which may not have been explicitly included during training.
The supervised fine-tuning (SFT) prompt structure:
### Instruction:
You are a medical expert AI assistant. Answer the following question professionally.
Select the correct option and, if possible, briefly explain your reasoning.
### Input:
Question: {question}
Options:
A. {A}
B. {B}
C. {C}
D. {D}
E. {E}
### Response:
Answer: {A|B|C|D|E}
Rationale: {optional short rationale}
Fine-tuning was performed using Hugging Face transformers (Trainer-based FFT).
Key Hyperparameters
Optimization Controls
eval_lossEvaluation was conducted on the KorMedMCQA Multiple-Choice benchmark.
| Task | Accuracy | StdErr |
|---|---|---|
| kormedmcqa_mc (overall) | 0.4327 | ±0.0090 |
| dentist | 0.3588 | ±0.0169 |
| doctor | 0.4023 | ±0.0235 |
| nurse | 0.4897 | ±0.0169 |
| pharm | 0.4588 | ±0.0168 |
acc and acc_norm are identical → no strong normalization bias observed.| Task | Accuracy | StdErr |
|---|---|---|
| kormedmcqa_mc (overall) | 0.4610 | ±0.0090 |
| dentist | 0.3625 | ±0.0169 |
| doctor | 0.4184 | ±0.0237 |
| nurse | 0.5626 | ±0.0168 |
| pharm | 0.4712 | ±0.0168 |
Few-shot prompting produced expected performance gains, particularly on the nurse subset.
Example loading with Hugging Face transformers:
from transformers import AutoTokenizer, AutoModelForCausalLM
repo_id = "your_repo_id_here"
tokenizer = AutoTokenizer.from_pretrained(repo_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(repo_id, device_map="auto")
prompt = """### Instruction:
You are a medical expert AI assistant. Answer the following question professionally.
Select the correct option and, if possible, briefly explain your reasoning.
### Input:
Question: ...
Options:
A. ...
B. ...
C. ...
D. ...
E. ...
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training and preprocessing logic are documented in:
KananaNano2.1B_FFT_KorMedMCQA.ipynb
The notebook includes:
🔒 Security Note: Never hardcode Hugging Face tokens in notebooks or scripts. Use
huggingface-cli loginor environment variables instead.
Human expert verification is required for any real-world usage.
Dataset License: KorMedMCQA is licensed under CC-BY-NC-2.0. This dataset must be used for non-commercial research and experimentation only. Proper attribution to the authors and source should be provided
Base Model License: Kanana-Nano-2.1B is licensed under CC-BY-NC-4.0. This model and any derived work must be used for non-commercial purposes only