Edit model card

LLaMA 3.1 8B Instruct - Healthcare Fine-tuned Model

This is a model that fine-tuned the Llama-3.1-8B-Instruct model from Unidocs using Healthcare data.
์œ ๋‹ˆ๋‹ฅ์Šค(์ฃผ)์—์„œ Llama-3.1-8B-Instruct ๋ชจ๋ธ์„ Healthcare ๋ฐ์ดํ„ฐ๋กœ ๋ฏธ์„ธ์กฐ์ •ํ•œ ๋ชจ๋ธ์ž„

Model Description

sLLM model used in Unidoc's ezMyAIDoctor, released on October 16, 2024 as a result of the AIDC-HPC project
of the Artificial Intelligence Industry Convergence Business Group (AICA)
meta-llama/Llama-3.1-8B-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๋…„ 10์›” 16์ผ ๊ณต๊ฐœํ•จ
meta-llama/Llama-3.1-8B-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.1 8B Instruct model using the healthcare dataset.
Healthcare ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ธฐ๋ณธ LLaMA 3.1 8B Instruct ๋ชจ๋ธ์—์„œ ์ „์ฒด ๋ฏธ์„ธ ์กฐ์ •์„ ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

Evaluation Results

Accuracy by category of mmlu benchmark

category Accuracy
anatomy 0.68 (92/135)
clinical_knowledge 0.75 (200/265)
college_medicine 0.68 (117/173)
medical_genetics 0.70 (70/100)
professional_medicine 0.76 (208/272)

All Accuracy Mean value: 0.72

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.1-8b-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])

Additional Information

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

Downloads last month
216
Safetensors
Model size
8.03B 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.1-8b-komedic-instruct

Finetuned
(418)
this model
Quantizations
1 model