KoBioMed-Llama-3.1-8B-Instruct
Instroduction
We introduce KoBioMed-Llama-3.1-8B-Instruct, a bilingual (English and Korean) generative model specialized in the BioMedical domain, developed by ezCaretech. This model has been instruction tuned and Direct Preference Optimization (DPO) from medical datasets.
Our KoBioMed-Llama-3.1-8B-Instruct has achieved state-of-the-art performance on both Korean and English BioMedical benchmarks. We hope this model will contribute significantly to the biomedical and medical research community.
This repository contains an 8 Billion generative language model with the following key features:
- Developed by: AI Team, ezCaretech R&D Center
- Language Support: English and Korean
- Context Length: 8,192 tokens
- Vocab Size: 12,800
- License: llama3.1
Notice!
This model was developed through Instruction Tuning and Direct Preference Optimization (DPO)
This model was developed with support from the Korea Artificial Intelligence Industry Cluster Agency (AICA).
Evaluation
We evaluated the KoBioMed-Llama-3.1-8B-Instruct using various Korean and English biomedical benchmarks.
- Benchmark evaluations were carried out using EleutherAI/lm-evaluation-harness and performed with 5-shot examples.
- The subsets used for the KMMLU and MMLU evaluations are listed below.
- KMMLU: 'kmmlu_direct_biology'
- MMLU: 'mmlu_college_biology', 'mmlu_clinical_knowledge', 'mmlu_anatomy', 'mmlu_college_medicine', 'mmlu_medical_genetics', 'mmlu_professional_medicine'
Models | KMMLU | KorMedMCQA | MedMCQA | MMLU | PubMedQA | Mean |
---|---|---|---|---|---|---|
KoBioMed-Llama-3.1-8B-Instruct | 0.4030 | 0.6151 | 0.5948 | 0.7481 | 0.7860 | 0.6294 |
Llama-3.1-8B-Instruct | 0.3750 | 0.5387 | 0.5981 | 0.7504 | 0.7940 | 0.6112 |
EXAONE-3.5-7.8B-Instruct-Llamafied | 0.3700 | 0.5637 | 0.4621 | 0.6915 | 0.7200 | 0.5615 |
Mistral-7B-Instruct-v0.3 | 0.2770 | 0.3926 | 0.4980 | 0.6795 | 0.7860 | 0.5266 |
Llama-3-Open-Ko-8B-Instruct-preview | 0.0020 | 0.0018 | 0.3266 | 0.3808 | 0.5800 | 0.2582 |
SOLAR-10.7B-Instruct-v1.0 | 0.3260 | 0.5287 | 0.4973 | 0.6990 | 0.7760 | 0.5654 |
Quickstart
Here is a code snippet for model inference.
We strongly recommend applying NFKC Unicode normalization and using the following stop words.
- "<|reserved_special_", "<|start_header_", "<|end_header_id|>", "<|eot_id|>", "๏ฟฝ"
from vllm import LLM, SamplingParams
import unicodedata
model_path = "Lowenzahn/KoBioMed-Llama-3.1-8B-Instruct"
llm = LLM(model=model_path, dtype='bfloat16', tensor_parallel_size=4, gpu_memory_utilization=0.9, trust_remote_code=True)
tokenizer = llm.get_tokenizer()
prompt = tokenizer.apply_chat_template(
conversation=[
{"role": "system", "content": "You are a helpful assistant. Answer the user's question truthfully."},
{"role": "user", "content": "ํ์์ ๋ํด์ ๊ฐ๋จํ๊ฒ ์ค๋ช
ํด์ฃผ์ธ์."},
],
tokenize=False,
add_generation_prompt=True
)
prompt = unicodedata.normalize('NFKC', prompt)
stop_words = ["<|reserved_special_", "<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>", "๏ฟฝ"]
sampling_params = SamplingParams(temperature=0.8, top_p=0.8, top_k=2, max_tokens=512, repetition_penalty=1.2, skip_special_tokens=False, stop=stop_words)
outputs = llm.generate(prompt, sampling_params)
print(outputs[0].outputs[0].text)
Generation Sample
๋ฌธ์ ๋ฅผ ์ดํดํ๊ธฐ ์ํด ํ์์ ์ ์์ ํน์ฑ์ ์ดํด๋ณด์์ต๋๋ค. ํ์์ ์ฃผ๋ก ํธํก๊ธฐ๊ณ์์ ๋ฐ์ํ๋ ์์ผ๋ก, ๋ค์ํ ํํ๊ฐ ์์ผ๋ฉฐ ์ฌ๋ฌ ์ข
๋ฅ์ ์ธํฌ ์ ํ์ด ๊ด์ฌํ ์ ์์ต๋๋ค.
์ด ์งํ์๋ ๋ ๊ฐ์ง ์ฃผ์ ์ ํ์ด ์๋๋ฐ, ์์ธํฌ ํ์๊ณผ ๋น์์ธํฌ ํ์์
๋๋ค.
์ผ๋ฐ์ ์ผ๋ก ํก์ฐ์ด๋ ํ๊ฒฝ์ ์์ธ(์: ๋๊ธฐ ์ค์ผ) ๋ฑ์ด ์์ธ์ด ๋ ์ ์์ง๋ง ์ ์ ํ๋ ์ค์ํ ์ญํ ์ ํ ์ ์๋ค๋ ์ ์ ๊ฐ์กฐํด์ผ ํฉ๋๋ค.
์น๋ฃ ๋ฐฉ๋ฒ์ผ๋ก๋ ํํ์๋ฒ, ๋ฐฉ์ฌ์ ์๋ฒ ๋๋ ์ธ๊ณผ์ ์ ์ ์ ๋ฑ์ ํฌํจํ๋ฉฐ, ์ด๋ ๊ฐ์ธ์ ์ํ ๋ฐ ๋ณ๊ธฐ์ ์ฐจ์ด์ ๋ฐ๋ผ ๋ค๋ฆ
๋๋ค.
๋ํ ์กฐ๊ธฐ์ ๋ฐ๊ฒฌํ๊ณ ์ ์ ํ ์๋ฃ ์ง์์ ๋ฐ์ผ๋ฉด ์์กด ๊ฐ๋ฅ์ฑ์ด ํฌ๊ฒ ์ฆ๊ฐํ๋ค๊ณ ์ธ๊ธํ์์ผ๋ฏ๋ก, ์๋ฐฉ๊ณผ ์กฐ๊ธฐ ์ง๋จ์ด ์ค์ํ๋ค๋ ๊ฒ์ ์ ์ ์์ต๋๋ค.
๋ฐ๋ผ์ ํ์์ ์ ์ฒด ๋ด๋ถ ๊ธฐ๊ด ์ค ํ๋์ธ ํ์์ ์์๋๋ ์์ ์ผ์ข
์ด๋ฉฐ, ์ฌ๊ธฐ์๋ ๊ณต๊ธฐ๋ฅผ ํํฐ๋งํ์ฌ ํ์ก์ผ๋ก ์ด๋ฐ๋๋๋ก ํ๋ ๋ฐ ๋์์ ์ค๋๋ค.
๋๋ถ๋ถ์ ๊ฒฝ์ฐ ๋ด๋ฐฐ ์ฐ๊ธฐ๋ก ์ธํด ๋ฐ์ํ์ง๋ง, ์ผ๋ถ ์ฌ๋๋ค์ ์ํ ๋จผ์ง๋ ๊ธฐํ ์ฐ์
๋ฌผ์ง์ ๋
ธ์ถ๋์ด ๋ฐ๋ณํ ์๋ ์์ต๋๋ค.
ํ์์ ํธํ์ธํฌ(lung cancer), ์ ์(adeno-carcinoma of lung), ์์ธํฌ์(small cell carcinoma)์ ํฌํจํ ๋ค์ํ ์ ํ์ด ์์ ์ ์์ผ๋ฉฐ, ๊ฐ๊ฐ ๋ค๋ฅธ ์ฆ์ ํจํด๊ณผ ํ๋ ์์์ ๊ฐ์ง๋๋ค.
ํ์ฌ ์ฌ์ฉ ๊ฐ๋ฅํ ํ์ ์น๋ฃ ์ต์
์ผ๋ก๋ ์์ , ์ฝ๋ฌผ ์น๋ฃ, ๊ทธ๋ฆฌ๊ณ ๋๋๋ก ๋ฐฉ์ฌ์ ์๋ฒ(radiation therapy)์ด ํฌํจ๋ฉ๋๋ค.
์ด๋ฌํ ๋ชจ๋ ๊ฒ์ ๊ฐ๋ณ ํ์์ ๋์ด, ์ ๋ฐ์ ์ธ ๊ฑด๊ฐ ์ํ, ์ง๋ณ ๋จ๊ณ(stage)์ ๋ง์ถฐ์ผ ํ๋ฉฐ, ์ด๋ค ๊ฒ์ด ๊ฐ์ฅ ํจ๊ณผ์ ์ผ์ง๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
๋ง์ ์ฌ๋๋ค์ด ์ด๊ธฐ ๋จ๊ณ์์๋ ์ฑ๊ณต์ ์ผ๋ก ์น๋ฃ๋ ์ ์์ง๋ง, ์งํ๋ ๋จ๊ณ์์์ ์น๋ฃ๋ ๋ ์ด๋ ต๊ฑฐ๋ ๋ถ๊ฐ๋ฅํ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ํนํ ์กฐ๊ธฐ ๋ฐ๊ฒฌ ์์๋ ํ์์ ์น๋ฃํ ํ๋ฅ ์ด ๋์์ง๋ ๊ฒฝํฅ์ด ์์ด, ์ด๋ฅผ ์ํ ์ ๊ธฐ ๊ฒ์ง(regular screenings)์ ํ์์ฑ๊ณผ ์ฅ์ ์ ๊ฐ์กฐํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
Limitations
KoBioMed-Llama-3.1-8B-Instruct demonstrates strong performance in the biomedical domain, but it can sometimes generate inappropriate responses. While we have made considerable efforts to avoid providing sensitive data, racial discrimination, harm, or biased information in the training data, issues may still arise. We emphasize that the text generated by KoBioMed-Llama-3.1-8B-Instruct does not reflect the views of the ezCaretech R&D center AI Team.
- The model may generate responses containing biased information related to age, gender, or race.
- The model may generate responses containing personal information, harmful content, or other inappropriate information.
- Since the model does not reflect the most up-to-date information, its responses may be outdated or contradictory.
- The performance of model may degrade on tasks unrelated to the biomedical and healthcare domains.
- KoBioMed-Llama-3.1-8B-Instruct can make mistakes. Critical information should be verified independently.
Training Data
This model was trained on medical Instruction Tuning and DPO datasets as follows:
- Instruction Tuning Dataset
- dialogue_soap_train (English, Translated Korean)
- medical_meadow_health_advice_train (English, Translated Korean)
- medical_meadow_medical_flashcards_train (English, Translated Korean)
- medical_meadow_medqa_train (English, Translated Korean)
- medical_meadow_mmmlu_train (English, Translated Korean)
- medical_meadow_wikidoc_patient_information_train (English, Translated Korean)
- medmcqa_train (English, Translated Korean)
- MedQuad_train (English, Translated Korean)
- DPO Dataset
- AquilaMed-RL (English, Translated Korean)
License
This model is released under llama3.1 license.
Supported by
This model was developed with support from the Korea Artificial Intelligence Industry Cluster Agency (AICA).
Contact
์กฐํ๋ฏผ(Hyeongmin Cho), [email protected]
๊น์ธํ(Inhu Kim), [email protected]
์ด๋ํ(Donghyoung Lee), [email protected]
๋ฐ๋ฌํธ(Dalho Park), [email protected]
Citation
KoBioMed-Llama-3.1-8B-Instruct
@article{kobiomedllama,
title={KoBioMed-Llama-3.1-8B-Instruct},
author={Hyeongmin Cho and Inhu Kim and Donghyoung Lee and Sanghwan Kim and Dalho Park and Inchul Kang and Kyul Kim and Jihoon Cho and Jongbeom Park},
year={2025},
url={https://huggingface.co/Lowenzahn/KoBioMed-Llama-3.1-8B-Instruct}
}
- Downloads last month
- 103