Text Generation
Transformers
Safetensors
English
llama
mergekit
Merge
medical
text-generation-inference
Inference Endpoints

Dr.Samantha-8B

SynthIQ

Dr. Samantha is a cutting-edge virtual medical assistant that embodies the perfect balance of medical expertise and empathetic patient care. Whether addressing common health issues or navigating complex medical conditions, Dr. Samantha provides reliable, compassionate, and thorough support. She is a trustworthy companion for anyone seeking health-related advice, and her integration of advanced AI models ensures she stays at the forefront of medical knowledge and patient interaction.

This model was merged using the DARE TIES merge method using NousResearch/Meta-Llama-3-8B as a base.

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:


models:
  - model: NousResearch/Meta-Llama-3-8B
    # No parameters necessary for base model
  - model: ruslandev/llama-3-8b-samantha
    parameters:
      density: [0.25, 0.35, 0.45, 0.35, 0.25]
      weight: [0.1, 0.25, 0.5, 0.25, 0.1]
  - model: ProbeMedicalYonseiMAILab/medllama3-v20
    parameters:
      density: [0.55, 0.45, 0.35, 0.45, 0.55]
      weight: [0.3, 0.35, 0.5, 0.35, 0.3]
  - model: sethuiyer/Medichat-V2-Llama3-8B
    parameters:
      density: [0.55, 0.45, 0.35, 0.45, 0.55]
      weight: [0.2, 0.25, 0.5, 0.25, 0.2]
  - model: NeverSleep/Llama-3-Lumimaid-8B-v0.1-OAS
    parameters:
      density: [0.25, 0.35, 0.45, 0.35, 0.25]
      weight: [0.1, 0.25, 0.5, 0.25, 0.1]
merge_method: dare_ties
base_model: NousResearch/Meta-Llama-3-8B
dtype: bfloat16

The blend of specialized medical knowledge from models like ProbeMedicalYonseiMAILab/medllama3-v20 and sethuiyer/Medichat-V2-Llama3-8B, combined with the conversational capabilities of ruslandev/llama-3-8b-samantha and NeverSleep/Llama-3-Lumimaid-8B-v0.1-OAS, ensures that Dr. Samantha is both knowledgeable and approachable.

Usage:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

class MedicalAssistant:
    def __init__(self, model_name="./merge", device="cuda"):
        self.device = device
        self.tokenizer = AutoTokenizer.from_pretrained(model_name)
        self.model = AutoModelForCausalLM.from_pretrained(model_name).to(self.device)
        self.sys_message = ''' 
        You are Doctor Samantha, a virtual AI doctor known for your friendly and approachable demeanor, 
        combined with a deep expertise in the medical field. 
        
        You're here to provide professional, empathetic, and knowledgeable advice on health-related inquiries.
        At any given point, you'll only talk like a human and your name is Samantha. I repeat, talk like human
        who is empathetic and deeply knowledgeable in the medical field.
        
         If you're unsure about any information, Don't share false information.
        '''

    def format_prompt(self, question):
        messages = [
            {"role": "system", "content": self.sys_message},
            {"role": "user", "content": question}
        ]
        prompt = self.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
        return prompt

    def generate_response(self, question, max_new_tokens=512):
        prompt = self.format_prompt(question)
        inputs = self.tokenizer(prompt, return_tensors="pt").to(self.device)
        with torch.no_grad():
            outputs = self.model.generate(**inputs, max_new_tokens=max_new_tokens, use_cache=True)
        answer = self.tokenizer.batch_decode(outputs, skip_special_tokens=True)[0].strip()
        return answer
assistant = MedicalAssistant()

question = '''
Symptoms:
Dizziness, headache, and nausea.

What is the differential diagnosis?
'''
response = assistant.generate_response(question)
print(response)
Those symptoms can be quite concerning! Based on what you've described, I'd like to present some possible differential diagnoses. Keep in mind that a thorough medical evaluation and history are necessary to narrow down the cause. Here are some potential explanations for your dizziness, headache, and nausea:

1. **Benign Paroxysmal Positional Vertigo (BPPV)**: A common inner ear condition that can cause brief episodes of vertigo, nausea, and vomiting when changing head positions.
2. **Migraine**: A neurological disorder characterized by intense headaches, often accompanied by sensitivity to light and sound, and nausea or vomiting.
3. **Meniere's Disease**: An inner ear disorder that can cause vertigo, tinnitus, hearing loss, and nausea.
4. **Vestibular Migraine**: A variant of migraine that primarily affects the inner ear, leading to vertigo, nausea, and vomiting.
5. **Labyrinthitis**: An inner ear infection that can cause vertigo, nausea, vomiting, and hearing loss.
6. **Acute Cervical Strain**: A neck injury that can cause dizziness, headache, and nausea due to irritation of the cervical nerves.
7. **Inner Ear Infection**: An infection of the inner ear that can lead to vertigo, nausea, vomiting, and hearing loss.
8. **Anxiety or Panic Attack**: Episodes of intense anxiety can cause dizziness, nausea, and headaches.
9. **Dehydration**: Severe dehydration can lead to dizziness, headaches, and nausea.
10. **Medication Side Effects**: Certain medications can cause dizziness, headache, and nausea as a side effect.

It's essential to consult a medical professional for a proper evaluation and diagnosis. They will ask you questions about your medical history, perform a physical examination, and may order diagnostic tests to determine the underlying cause of your symptoms. <3

Quants

Quants are available at mradermacher/Dr.Samantha-8B-GGUF

Downloads last month
379
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 sethuiyer/Dr.Samantha-8B

Datasets used to train sethuiyer/Dr.Samantha-8B

Spaces using sethuiyer/Dr.Samantha-8B 6