Downloads · 30 days
0
Abiral7/MedAssistant
MedAssistant is a machine learning model from Abiral7. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
MedAssistant is an AI-powered medical assistant model designed to answer medical questions, assist in preliminary diagnosis, and provide general health information and advice. It is based on the unsloth/llama-3-8b-bnb…
Downloads · 30 days
0
Access
Public
Updated Aug 5, 2024
Repo size
168 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 95%
From the Hugging Face model README
MedAssistant is an AI-powered medical assistant model designed to answer medical questions, assist in preliminary diagnosis, and provide general health information and advice. It is based on the unsloth/llama-3-8b-bnb-4bit model and fine-tuned on the LinhDuong/chatdoctor-200k dataset.
MedAssistant is designed to:
Primary use cases include:
This model was fine-tuned on the LinhDuong/chatdoctor-200k dataset.
Currently, no specific performance metrics are available for this model.
Users should be aware of the following limitations:
Accuracy and Reliability:
Biases:
Scope of Knowledge:
Users are strongly advised to:
To use MedAssistant, you need to install the following dependencies:
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install --no-deps "xformers<0.0.27" "trl<0.9.0" peft accelerate bitsandbytes
Here's a basic example of how to use the MedAssistant model:
from unsloth import FastLanguageModel
from transformers import AutoModel, TextStreamer
from peft import PeftModel, PeftConfig
# Load base model
model_name = "unsloth/llama-3-8b-bnb-4bit"
base_model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_name,
max_seq_length=2048,
load_in_4bit=True
)
# Load adapter configuration
adapter_name = "Abiral7/MedAssistant"
peft_config = PeftConfig.from_pretrained(adapter_name)
# Apply adapter to base model
model = PeftModel.from_pretrained(base_model, adapter_name)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
# Example usage
inputs = tokenizer(
[
""" #System:
You are a Medical Assistant with knowledge in the medical domain.
#User:
I have pain in my eyes from playing too much video game. Please help?
#Assistant
"""
], return_tensors = "pt").to("cuda")
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 5000)
To run this model efficiently, the following hardware is recommended:
Users can provide feedback or report issues related to the model: Use the "Discussions" tab on this Hugging Face model page to ask questions, provide feedback, or report issues directly to the model developer or community.