File size: 1,839 Bytes
b2a2f2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
language:
- en
license: apache-2.0
tags:
- medical
- clinical
- mistral
- gguf
- unsloth
- lora
base_model: mistralai/Mistral-Nemo-Base-2407
---

# 🩺 Rapha — Clinical AI Physician Assistant (GGUF)

**Rapha** is a clinical AI assistant fine-tuned on **Mistral-Nemo-12B** using Unsloth.  
It performs forward-chaining medical reasoning — gathering symptoms conversationally,  
reasoning step by step, and escalating structured findings to a physician.

> ⚠️ Rapha is a research prototype. It does not diagnose. All outputs must be reviewed by a qualified medical professional.

---

## 🚀 Quickstart

### Ollama
```bash
ollama run hf.co/Phora68/rapha
```

### llama.cpp
```bash
./llama-cli -m rapha-q4_k_m.gguf \
  --chat-template mistral \
  -p "I've been having chest pain and shortness of breath for two days." \
  -n 512
```

### Python (llama-cpp-python)
```python
from llama_cpp import Llama

llm = Llama(
    model_path = "rapha-q4_k_m.gguf",
    n_ctx      = 2048,
    n_gpu_layers = -1,   # use all GPU layers
)

response = llm.create_chat_completion(messages=[
    {"role": "user", "content": "I've had a persistent headache for three days and I'm really worried."}
])
print(response["choices"][0]["message"]["content"])
```

---

## 📊 Model Details

| Property | Value |
|---|---|
| **Base model** | `mistralai/Mistral-Nemo-Base-2407` |
| **Fine-tuning** | QLoRA (r=64, α=16) via Unsloth |
| **Quantisation** | Q4_K_M |
| **Context length** | 2048 tokens |
| **Training format** | ShareGPT |
| **Chat template** | Mistral `[INST]` |
| **Domain** | Clinical / Medical triage |
| **Dataset** | 200,000 samples (170k train / 20k val / 10k test) |

---

## ⚠️ Limitations

- Not a medical device
- Does not provide diagnoses
- Must be reviewed by a qualified clinician
- Not validated for clinical deployment