Downloads · 30 days
13
10% of all-time downloads
patikop/Medical-llama-2
Medical-llama-2 is a text generation model from patikop. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a fine-tuned version of the LLaMA 2-based language model for medical chatbot purposes. The model has been trained on a medical dataset to provide information about various medical terms, conditions, treatments…
Downloads · 30 days
13
10% of all-time downloads
All-time downloads
131
Public
Repo size
13.9 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 99%
From the Hugging Face model README
This is a fine-tuned version of the LLaMA 2-based language model for medical chatbot purposes. The model has been trained on a medical dataset to provide information about various medical terms, conditions, treatments, and diseases in response to user queries.
It has been fine-tuned using Supervised Fine-Tuning (SFT) with the Lora (Low-Rank Adaption) method to optimize for medical conversational tasks. It is capable of providing accurate and relevant responses for medical queries.
This model can be used directly as a conversational agent for medical-related queries. By feeding it a user prompt, it generates informative and contextually relevant responses regarding medical conditions, symptoms, treatments, etc.
This model can also be used in other applications where medical information is needed, such as:
This model should NOT be used for:
The model was fine-tuned using a custom dataset of medical terms, which includes information about diseases, symptoms, treatments, and medical terminology. The dataset was formatted for use in Supervised Fine-Tuning (SFT) tasks, ensuring the model learned to generate relevant medical responses based on user inputs.
The model was tested using held-out medical texts and queries to ensure that it provides relevant and coherent answers. Key evaluation metrics include:
The model performs well for general medical queries, offering coherent and accurate answers. However, for complex or rare medical cases, the model's responses should be validated by medical professionals.
The model’s responses should be carefully examined for bias and factual correctness before being deployed in any clinical or high-stakes environment. Additionally, performance should be analyzed across different medical domains (e.g., oncology, cardiology) to ensure that the model provides consistent and reliable results across various fields.
Training large language models involves significant computational resources, which can result in substantial environmental impact. You can estimate your model’s carbon footprint using the Machine Learning Impact Calculator to better understand the emissions associated with the training process.
The model is based on the LLaMA 2 architecture, a causal language model, and was fine-tuned using Supervised Fine-Tuning (SFT) with Low-Rank Adaption (Lora).
You can quickly start using the model via the Hugging Face library. Here’s how to load and interact with the model:
altair==4.2.2
streamlit==1.19.0
transformers==4.33.2
torch==2.0.0
accelerate==0.20.3
```python
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
# Load the model and tokenizer from Hugging Face
hf_model = AutoModelForCausalLM.from_pretrained("patikop/medical-chatbot")
hf_tokenizer = AutoTokenizer.from_pretrained("patikop/medical-chatbot")
# Create the pipeline
hf_pipeline = pipeline(task="text-generation", model=hf_model, tokenizer=hf_tokenizer, max_length=300)
# Define your query
user_prompt = "What is malaria?"
# Generate the response
response = hf_pipeline(f"<s>[INST] {user_prompt} [/INST]")
# Print the response
print(response[0]['generated_text'])