LLaMA 3.2 3B Instruct - Healthcare Fine-tuned Model

This is a model that fine-tuned the Llama-3.2-3B-Instruct model from Unidocs using Healthcare data.
μœ λ‹ˆλ‹₯슀(μ£Ό)μ—μ„œ Llama-3.2-3B-Instruct λͺ¨λΈμ„ Healthcare λ°μ΄ν„°λ‘œ λ―Έμ„Έμ‘°μ •ν•œ λͺ¨λΈμž„

Model Description

sLLM model used in Unidoc's ezMyAIDoctor, released on December 10, 2024 as a result of the AIDC-HPC project
of the Artificial Intelligence Industry Convergence Business Group (AICA)
meta-llama/Llama-3.2-3B-Instruct wiki, kowiki, super-large AI healthcare question-answer data,
A model that has been pretrained (Full Finetuning) by referring to the super-large AI corpus with improved Korean performance,
and the medical and legal professional book corpus.

μœ λ‹ˆλ‹₯슀(μ£Ό)의 ezMyAIDoctorμ—μ„œ μ‚¬μš©λ˜λŠ” sLLM λͺ¨λΈλ‘œ 인곡지λŠ₯μ‚°μ—…μœ΅ν•©μ‚¬μ—…λ‹¨(AICA)의 AIDC-HPC μ‚¬μ—…μ˜ 결과둜 2024λ…„ 12μ›” 10일 κ³΅κ°œν•¨
meta-llama/Llama-3.2-3B-Instruct에 wiki, kowiki, AIHub(aihub.or.kr)의 (μ΄ˆκ±°λŒ€AI ν—¬μŠ€μΌ€μ–΄ μ§ˆμ˜μ‘λ‹΅λ°μ΄ν„°, ν•œκ΅­μ–΄ μ„±λŠ₯이 κ°œμ„ λœ μ΄ˆκ±°λŒ€ AI λ§λ­‰μΉ˜, 의료/법λ₯  μ „λ¬Έμ„œμ  λ§λ­‰μΉ˜)λ₯Ό μ°Έκ³ ν•˜μ—¬ Pretrain(Full Finetuning)된 λͺ¨λΈμž„

Intended Uses & Limitations

The model is designed to assist with healthcare-related queries and tasks.
However, it should not be used as a substitute for professional medical advice, diagnosis, or treatment.
Always consult with a qualified healthcare provider for medical concerns.

이 λͺ¨λΈμ€ Healthcare κ΄€λ ¨ 질의 및 μž‘μ—…μ„ μ§€μ›ν•˜λ„λ‘ μ„€κ³„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ 전문적인 μ˜ν•™μ  μ‘°μ–Έ, 진단 λ˜λŠ” 치료λ₯Ό λŒ€μ²΄ν•˜λŠ” 데 μ‚¬μš©λ˜μ–΄μ„œλŠ” μ•ˆ λ©λ‹ˆλ‹€.
의료 κ΄€λ ¨ λ¬Έμ œλŠ” 항상 μžκ²©μ„ κ°–μΆ˜ 의료 μ„œλΉ„μŠ€ μ œκ³΅μžμ™€ μƒμ˜ν•˜μ‹­μ‹œμ˜€.

Training Data

The model was fine-tuned on a proprietary healthcare dataset.
Due to privacy concerns, details of the dataset cannot be disclosed.

wiki, kowiki 데이터 이외
κ³Όν•™κΈ°μˆ μ •λ³΄ν†΅μ‹ λΆ€, ν•œκ΅­μ§€λŠ₯μ •λ³΄μ‚¬νšŒμ§„ν₯μ›μ—μ„œ κ΄€λ¦¬ν•˜κ³  μžˆλŠ” AIHub의

  • μ΄ˆκ±°λŒ€AI ν—¬μŠ€μΌ€μ–΄ μ§ˆμ˜μ‘λ‹΅λ°μ΄ν„°
  • ν•œκ΅­μ–΄ μ„±λŠ₯이 κ°œμ„ λœ μ΄ˆκ±°λŒ€ AI λ§λ­‰μΉ˜
  • 의료, 법λ₯  μ „λ¬Έμ„œμ  λ§λ­‰μΉ˜
    등을 ν™œμš©ν•¨

Training Procedure

Full fine-tuning was performed on the base LLaMA 3.2 3B Instruct model using the healthcare dataset.
Healthcare 데이터 μ„ΈνŠΈλ₯Ό μ‚¬μš©ν•˜μ—¬ κΈ°λ³Έ LLaMA 3.2 3B Instruct λͺ¨λΈμ—μ„œ 전체 λ―Έμ„Έ 쑰정을 μˆ˜ν–‰ν–ˆμŠ΅λ‹ˆλ‹€.

Evaluation Results

Accuracy by category of mmlu benchmark

category Accuracy
anatomy 0.54 (73/135)
clinical_knowledge 0.59 (156/265)
college_medicine 0.57 (99/173)
medical_genetics 0.64 (64/100)
professional_medicine 0.60 (162/272)

All Accuracy Mean value: 0.59

Use with transformers

Starting with transformers >= 4.43.1 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.

Make sure to update your transformers installation via pip install --upgrade transformers.

import transformers
import torch

model_id = "unidocs/llama-3.2-3b-komedic-instruct"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

messages = [
    {"role": "system", "content": "당신은 μ˜λ£Œμ „λ¬Έκ°€μž…λ‹ˆλ‹€. μ§ˆλ³‘μ˜ μ •μ˜, 원인, 증상, 검진, 진단, 치료, μ•½λ¬Ό, 식이, μƒν™œ μΈ‘λ©΄μ—μ„œ λ‹΅λ³€ν•΄ μ£Όμ„Έμš”"},
    {"role": "user", "content": "κ³΅λ³΅ν˜ˆλ‹Ήμ΄ 120이상인 경우 제1ν˜• 당뇨와 제2ν˜• 당뇨 ν™˜μžλŠ” 각각 μ–΄λ–»κ²Œ 치료λ₯Ό λ°›μ•„μ•Ό ν•˜λ‚˜μš”?"},
]

outputs = pipeline(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Note: You can also find detailed recipes on how to use the model locally, with torch.compile(), assisted generations, quantised and more at huggingface-llama-recipes

Limitations and Bias

  • This model may produce biased or inaccurate results. It should not be solely relied upon for critical healthcare decisions.

  • The model's knowledge is limited to its training data and cut-off date.

  • It may exhibit biases present in the training data.

  • The model may occasionally produce incorrect or inconsistent information.

  • λͺ¨λΈμ˜ 지식은 ν›ˆλ ¨ 데이터와 마감일둜 μ œν•œλ©λ‹ˆλ‹€.

  • ν›ˆλ ¨ 데이터에 편ν–₯이 μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.

  • λͺ¨λΈμ€ 가끔 잘λͺ»λ˜κ±°λ‚˜ μΌκ΄€λ˜μ§€ μ•Šμ€ 정보λ₯Ό 생성할 수 μžˆμŠ΅λ‹ˆλ‹€.

  • 이 λͺ¨λΈμ€ 편ν–₯λ˜κ±°λ‚˜ λΆ€μ •ν™•ν•œ κ²°κ³Όλ₯Ό 생성할 수 μžˆμŠ΅λ‹ˆλ‹€. μ€‘μš”ν•œ 의료 결정에 이 λͺ¨λΈμ—λ§Œ μ˜μ‘΄ν•΄μ„œλŠ” μ•ˆ λ©λ‹ˆλ‹€.

Legal Disclaimer

The model developers and distributors bear no legal responsibility for any consequences arising from the use of this model.
This includes any direct, indirect, incidental, special, punitive, or consequential damages resulting from the model's output.
By using this model, users assume all risks that may arise, and the responsibility for verifying and appropriately using the model's output lies solely with the user.
This model cannot substitute for medical advice, diagnosis, or treatment, and qualified healthcare professionals should always be consulted for medical decisions.
This disclaimer applies to the maximum extent permitted by applicable law.

법적 μ±…μž„ λ©΄μ±… μ‘°ν•­

λ³Έ λͺ¨λΈμ˜ μ‚¬μš©μœΌλ‘œ 인해 λ°œμƒν•˜λŠ” λͺ¨λ“  결과에 λŒ€ν•΄ λͺ¨λΈ 개발자 및 λ°°ν¬μžλŠ” μ–΄λ– ν•œ 법적 μ±…μž„λ„ 지지 μ•ŠμŠ΅λ‹ˆλ‹€.
μ΄λŠ” λͺ¨λΈμ˜ 좜λ ₯으둜 μΈν•œ 직접적, 간접적, 우발적, νŠΉμˆ˜ν•œ, μ§•λ²Œμ  λ˜λŠ” 결과적 손해λ₯Ό ν¬ν•¨ν•©λ‹ˆλ‹€.
μ‚¬μš©μžλŠ” λ³Έ λͺ¨λΈμ„ μ‚¬μš©ν•¨μœΌλ‘œμ¨ λ°œμƒν•  수 μžˆλŠ” λͺ¨λ“  μœ„ν—˜μ„ κ°μˆ˜ν•˜λ©°, λͺ¨λΈμ˜ 좜λ ₯에 λŒ€ν•œ 검증 및 μ μ ˆν•œ μ‚¬μš©μ— λŒ€ν•œ μ±…μž„μ€ μ „μ μœΌλ‘œ μ‚¬μš©μžμ—κ²Œ μžˆμŠ΅λ‹ˆλ‹€.
λ³Έ λͺ¨λΈμ€ μ˜ν•™μ  μ‘°μ–Έ, 진단, λ˜λŠ” 치료λ₯Ό λŒ€μ²΄ν•  수 μ—†μœΌλ©°, 의료 κ΄€λ ¨ 결정을 내릴 λ•ŒλŠ” λ°˜λ“œμ‹œ μžκ²©μ„ κ°–μΆ˜ 의료 전문가와 상담해야 ν•©λ‹ˆλ‹€.
이 λ©΄μ±… 쑰항은 κ΄€λ ¨ 법λ₯ μ΄ ν—ˆμš©ν•˜λŠ” μ΅œλŒ€ λ²”μœ„ λ‚΄μ—μ„œ μ μš©λ©λ‹ˆλ‹€.

Model Card Contact

μœ μ„ ([email protected]), 김진싀([email protected]),
κΉ€μ’…μ™„([email protected])

Additional Information

For more details about the base model, please refer to the original LLaMA 3.2 documentation.

Downloads last month
23
Safetensors
Model size
3.21B params
Tensor type
BF16
Β·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for unidocs/llama-3.2-3b-komedic-instruct

Finetuned
(166)
this model
Quantizations
1 model