image/png

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
Safetensors
Model size
8.03B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Lowenzahn/KoBioMed-Llama-3.1-8B-Instruct

Finetuned
(1023)
this model
Quantizations
2 models

Collection including Lowenzahn/KoBioMed-Llama-3.1-8B-Instruct