CoolFace
Modelpublic

turquise/MedQA_q8

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes27downloads
Model Card

Fine-Tuning Llama-3.1 with Comprehensive Medical Q&A Dataset

This project fine-tunes the Llama-3.1 8B Model using the Comprehensive Medical Q&A Dataset to build a specialized model capable of answering medical questions.


๐Ÿš€ Features

  • โ€”Fine-tuned on a diverse dataset of over 43,000 medical Q&A pairs.
  • โ€”Supports 31 distinct types of medical queries, including treatments, chronic diseases, and protocols.
  • โ€”Provides answers sourced from doctors, nurses, and pharmacists.

๐Ÿ“‚ Dataset Overview

Comprehensive Medical Q&A Dataset

  • โ€”Source: Huggingface Hub
  • โ€”License: CC0 1.0 Universal (Public Domain Dedication)
Key Details
  • โ€”Total Questions: 43,000+
  • โ€”Categories: 31 medical question types (qtype)
  • โ€”Columns:
  • โ€”qtype: Type of medical question (e.g., Treatment, Symptoms).
  • โ€”Question: Patient's medical question.
  • โ€”Answer: Expert response (from doctors, nurses, and pharmacists).

How the Dataset is Used

  • โ€”Filtering: Questions are filtered by qtype for domain-specific fine-tuning.
  • โ€”Analysis: Queries are analyzed to understand patterns, such as correlations between treatments and chronic conditions.
  • โ€”Applications: Insights can be applied to build medical educational tools, predictive models, and virtual assistants.

For more details, check the dataset documentation.


๐Ÿ’ป How to Use This Model

The fine-tuned model is available on Hugging Face under the repository: `turquise/MedQA_q8`. Below are several ways to use the model:

Using llama-cpp-python Library

python
from llama_cpp import Llama

# Load the model
llm = Llama.from_pretrained(
    repo_id="turquise/MedQA_q8",
    filename="medQA.Q8_0.gguf",
)

# Query the model
output = llm(
    "What is Medullary Sponge Kidney?",
    max_tokens=512,
    echo=True
)
print(output)

Using llama.cpp

Install via Homebrew
bash
brew install llama.cpp

llama-cli \
  --hf-repo "turquise/MedQA_q8" \
  --hf-file medQA.Q8_0.gguf \
  -p "What is Medullary Sponge Kidney?"
Use Pre-Built Binary
bash
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases

./llama-cli \
  --hf-repo "turquise/MedQA_q8" \
  --hf-file medQA.Q8_0.gguf \
  -p "What is Medullary Sponge Kidney?"
Build from Source Code
bash
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build -DLLAMA_CURL=ON
cmake --build build -j --target llama-cli

./build/bin/llama-cli \
  --hf-repo "turquise/MedQA_q8" \
  --hf-file medQA.Q8_0.gguf \
  -p "What is Medullary Sponge Kidney?"

๐Ÿค– Example Usages

This model can assist with the following tasks:

  • โ€”Answering medical questions:
python
question = "What are the symptoms of diabetes?"
output = llm(question, max_tokens=512)
print(output)
  • โ€”Providing insights for healthcare education: Example: Answering queries about diseases, treatments, and chronic conditions.
  • โ€”Supporting virtual assistants by handling frequently asked healthcare-related questions.

โš ๏ธ Disclaimer

  • โ€”This model does not provide medical advice and should not replace professional medical consultation.
  • โ€”For any health-related questions or concerns, please consult a doctor or a licensed healthcare professional.

๐Ÿค– Applications

This fine-tuned model can be used to:

  • โ€”Build virtual assistants and chatbots for healthcare-related queries.
  • โ€”Assist healthcare professionals by handling routine inquiries.
  • โ€”Enhance medical education platforms with AI-powered insights.

๐Ÿ“œ Acknowledgements

If you use this project or dataset in your research, please credit the original authors.


๐Ÿ“ License

This project is open-sourced under the CC0 1.0 Universal License. See the dataset license details.


๐Ÿ“ง Contact

For questions or collaboration, reach out via HF Model Community.