Uploaded model
- Developed by: Elixpo
- License: apache-2.0
- Finetuned from model : unsloth/llama-3.2-1b-instruct-bnb-4bit
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
MediTalk is a medical assistant model designed to assist users by providing general health-related information based on research and expert knowledge. Trained using LLAMA 3.1, this model responds to queries with empathy, clarity, and professionalism, while also ensuring sensitive or inappropriate questions are addressed with polite negations. The model has been fine-tuned using the lavita/ChatDoctor-HealthCareMagic-100k dataset from Hugging Face, making it suitable for medical-related works.
The model is available for use on Ollama and Hugging Face, and can be interacted with similarly to GPT models.
Features
- General Medical Information: MediTalk provides clear and concise responses to common health-related queries.
- Polite Negation for Inappropriate Questions: If a user asks an awkward or inappropriate question, MediTalk responds with a polite negation like "I'm afraid I can't answer that. Please ask something else related to health."
- Fine-Tuned for Medical Content: The model is fine-tuned using the lavita/ChatDoctor-HealthCareMagic-100k dataset for more relevant medical responses.
- Maximum Tokens per Response: The model provides responses with a maximum of 512 tokens.
Setup and Installation
Prerequisites
- Ollama: Ensure you have Ollama installed on your system.
- Download: Converse with the model by running the following command:
ollama run Elixpo/LlamaMedicine
To run the code on kaggle
# run before testing this
# pip install unsloth bitsandbytes transformers
from unsloth import FastLanguageModel
from transformers import AutoTokenizer
import torch
# Load the quantized model from Hugging Face
model_name = "Elixpo/llamaMED"
model, _ = FastLanguageModel.from_pretrained(model_name)
# Prepare the model for inference
model = FastLanguageModel.for_inference(model)
# Determine the device (GPU or CPU)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Move the model to the appropriate device
model = model.to(device)
# Load the tokenizer from Hugging Face
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Test the model
input_text = "What are the symptoms of diabetes?"
inputs = tokenizer(input_text, return_tensors="pt")
# Move the input tensors to the same device as the model
inputs = {key: value.to(device) for key, value in inputs.items()}
# Generate output using the model
outputs = model.generate(inputs['input_ids'], max_length=100)
# Decode the output
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Do select T4 X2 GPUs for faster output
Scientific Parameters:
- Parameters: 760M
- Layers: 16
- Size: 4.9GB
- Precision: 4bits
- Train Precision: bf16
- Chat Template: Llama 3.1
- Mother Model: unsloth/llama-3.2-1b-instruct-bnb-4bit
- Epoches: 60
- GPU: T4 x2
- System Requirements: GPU > 4GB | CUDA Pipelined
- Learning Rate: 2e-4
- warmup_steps: 5
- Dataset Format: Shared_GPT
- Trainer: SFT_Trainer
- Primary Dataset (1/5): Elixpo/llamaMediTalk
Key Updates:
- Training with LLAMA 3.1: Mentioned that the model is trained using LLAMA 3.1.
- Fine-tuned with Dataset: Added information about the fine-tuning using the
lavita/ChatDoctor-HealthCareMagic-100k
dataset from Hugging Face. - Model Availability: Clearly stated the model's availability on Ollama and Hugging Face.
- Response Token Limit: Included the maximum token limit (512) for responses.
- Usage Example: Added a command to converse with the model and example questions.
This should provide a comprehensive overview of your model and its capabilities!
Model Availability
- Ollama Facility: The model is available for use on Ollama. You can access and run the model at https://ollama.com/Elixpo/LlamaMedicine.
- Hugging Face: The model is also available for download or direct use on Hugging Face at Elixpo/LlamaMedicine.
Customization
- System Instructions: Modify the system instructions in the
Modelfile
to adjust the assistant’s behavior. - Fine-Tuning: The model has been fine-tuned using the lavita/ChatDoctor-HealthCareMagic-100k dataset but can be further fine-tuned with other datasets to specialize in specific medical fields.
Acknowledgments
- LLAMA 3.1: Powered by LLAMA models.
- Ollama: Used for model deployment and management.
- Hugging Face: Fine-tuned using lavita/ChatDoctor-HealthCareMagic-100k dataset.
- Medical Databases: The model provides general knowledge, but it does not replace professional medical advice.
- Downloads last month
- 35