Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Dr.Samantha-8B.Q2_K.gguf | Q2_K | 2.96GB |
| Dr.Samantha-8B.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| Dr.Samantha-8B.IQ3_S.gguf | IQ3_S | 3.43GB |
| Dr.Samantha-8B.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| Dr.Samantha-8B.IQ3_M.gguf | IQ3_M | 3.52GB |
| Dr.Samantha-8B.Q3_K.gguf | Q3_K | 3.74GB |
| Dr.Samantha-8B.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| Dr.Samantha-8B.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| Dr.Samantha-8B.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| Dr.Samantha-8B.Q4_0.gguf | Q4_0 | 4.34GB |
| Dr.Samantha-8B.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| Dr.Samantha-8B.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| Dr.Samantha-8B.Q4_K.gguf | Q4_K | 4.58GB |
| Dr.Samantha-8B.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| Dr.Samantha-8B.Q4_1.gguf | Q4_1 | 4.78GB |
| Dr.Samantha-8B.Q5_0.gguf | Q5_0 | 5.21GB |
| Dr.Samantha-8B.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| Dr.Samantha-8B.Q5_K.gguf | Q5_K | 5.34GB |
| Dr.Samantha-8B.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| Dr.Samantha-8B.Q5_1.gguf | Q5_1 | 5.65GB |
| Dr.Samantha-8B.Q6_K.gguf | Q6_K | 6.14GB |
| Dr.Samantha-8B.Q8_0.gguf | Q8_0 | 7.95GB |

1
2models:
3 - model: NousResearch/Meta-Llama-3-8B
4 # No parameters necessary for base model
5 - model: ruslandev/llama-3-8b-samantha
6 parameters:
7 density: [0.25, 0.35, 0.45, 0.35, 0.25]
8 weight: [0.1, 0.25, 0.5, 0.25, 0.1]
9 - model: ProbeMedicalYonseiMAILab/medllama3-v20
10 parameters:
11 density: [0.55, 0.45, 0.35, 0.45, 0.55]
12 weight: [0.3, 0.35, 0.5, 0.35, 0.3]
13 - model: sethuiyer/Medichat-V2-Llama3-8B
14 parameters:
15 density: [0.55, 0.45, 0.35, 0.45, 0.55]
16 weight: [0.2, 0.25, 0.5, 0.25, 0.2]
17 - model: NeverSleep/Llama-3-Lumimaid-8B-v0.1-OAS
18 parameters:
19 density: [0.25, 0.35, 0.45, 0.35, 0.25]
20 weight: [0.1, 0.25, 0.5, 0.25, 0.1]
21merge_method: dare_ties
22base_model: NousResearch/Meta-Llama-3-8B
23dtype: bfloat161import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4class MedicalAssistant:
5 def __init__(self, model_name="./merge", device="cuda"):
6 self.device = device
7 self.tokenizer = AutoTokenizer.from_pretrained(model_name)
8 self.model = AutoModelForCausalLM.from_pretrained(model_name).to(self.device)
9 self.sys_message = '''
10 You are Doctor Samantha, a virtual AI doctor known for your friendly and approachable demeanor,
11 combined with a deep expertise in the medical field.
12
13 You're here to provide professional, empathetic, and knowledgeable advice on health-related inquiries.
14 At any given point, you'll only talk like a human and your name is Samantha. I repeat, talk like human
15 who is empathetic and deeply knowledgeable in the medical field.
16
17 If you're unsure about any information, Don't share false information.
18 '''
19
20 def format_prompt(self, question):
21 messages = [
22 {"role": "system", "content": self.sys_message},
23 {"role": "user", "content": question}
24 ]
25 prompt = self.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
26 return prompt
27
28 def generate_response(self, question, max_new_tokens=512):
29 prompt = self.format_prompt(question)
30 inputs = self.tokenizer(prompt, return_tensors="pt").to(self.device)
31 with torch.no_grad():
32 outputs = self.model.generate(**inputs, max_new_tokens=max_new_tokens, use_cache=True)
33 answer = self.tokenizer.batch_decode(outputs, skip_special_tokens=True)[0].strip()
34 return answer1assistant = MedicalAssistant()
2
3question = '''
4Symptoms:
5Dizziness, headache, and nausea.
6
7What is the differential diagnosis?
8'''
9response = assistant.generate_response(question)
10print(response)1Those 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:
2
31. **Benign Paroxysmal Positional Vertigo (BPPV)**: A common inner ear condition that can cause brief episodes of vertigo, nausea, and vomiting when changing head positions.
42. **Migraine**: A neurological disorder characterized by intense headaches, often accompanied by sensitivity to light and sound, and nausea or vomiting.
53. **Meniere's Disease**: An inner ear disorder that can cause vertigo, tinnitus, hearing loss, and nausea.
64. **Vestibular Migraine**: A variant of migraine that primarily affects the inner ear, leading to vertigo, nausea, and vomiting.
75. **Labyrinthitis**: An inner ear infection that can cause vertigo, nausea, vomiting, and hearing loss.
86. **Acute Cervical Strain**: A neck injury that can cause dizziness, headache, and nausea due to irritation of the cervical nerves.
97. **Inner Ear Infection**: An infection of the inner ear that can lead to vertigo, nausea, vomiting, and hearing loss.
108. **Anxiety or Panic Attack**: Episodes of intense anxiety can cause dizziness, nausea, and headaches.
119. **Dehydration**: Severe dehydration can lead to dizziness, headaches, and nausea.
1210. **Medication Side Effects**: Certain medications can cause dizziness, headache, and nausea as a side effect.
13
14It'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