Phora68 commited on
Commit
df0858e
Β·
verified Β·
1 Parent(s): 2c33a2c

Update model card

Browse files
Files changed (1) hide show
  1. README.md +46 -23
README.md CHANGED
@@ -2,15 +2,15 @@
2
  license: other
3
  base_model: unsloth/Qwen2.5-3B-Instruct-bnb-4bit
4
  tags:
5
- - clinical
6
- - medical
7
- - healthcare
8
- - qlora
9
- - unsloth
10
- - chatml
11
- - rapha
12
  language:
13
- - en
14
  ---
15
 
16
  # Rapha β€” Clinical AI Physician Assistant
@@ -23,8 +23,8 @@ never diagnoses.**
23
  - **Base model:** `unsloth/Qwen2.5-3B-Instruct-bnb-4bit`
24
  - **Method:** QLoRA (Unsloth) β†’ curriculum SFT β†’ DPO
25
  - **Chat template:** ChatML
26
- - **Context window:** 8,192 tokens (training) / 4,096 (Ollama default)
27
- - **Trained:** 2026-08-03
28
 
29
  ## Training architecture (v2.6)
30
 
@@ -51,24 +51,47 @@ its actual stage β€” fixed in v2.4).
51
 
52
  ## Training data
53
 
54
- Curriculum SFT across 5 datasets (~170k records): Stage 1 greetings, Stage 2
55
- OPQRST symptom exploration, Stage 3 medical history, Stage 4 red-flag
56
- screening, and a multi-turn adversarial set (self-diagnosis, symptom denial,
57
- medication refusal, minimised red flags, prompt injection β€” ~50% with a
58
- patient pushback turn). Followed by DPO preference alignment on a
59
- de-duplicated, leak-safe train/val split.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ## Eval metrics (last training run)
62
 
63
  | Metric | Value |
64
  |---|---|
65
- | empathy_rate | 0.4000 |
66
- | escalation_accuracy | 1.0000 |
67
- | adversarial_hold_rate | 1.0000 |
68
- | pushback_hold_rate | 1.0000 |
69
- | multi_question_rate | 0.1750 |
70
  | repetition_rate | 0.0000 |
71
- | avg_response_length | 30.9750 |
 
72
 
73
  ## Usage β€” Ollama (GGUF)
74
 
@@ -84,7 +107,7 @@ from unsloth import FastLanguageModel
84
 
85
  model, tokenizer = FastLanguageModel.from_pretrained(
86
  model_name="Phora68/rapha",
87
- max_seq_length=8192,
88
  load_in_4bit=True,
89
  )
90
  FastLanguageModel.for_inference(model)
 
2
  license: other
3
  base_model: unsloth/Qwen2.5-3B-Instruct-bnb-4bit
4
  tags:
5
+ - clinical
6
+ - medical
7
+ - healthcare
8
+ - qlora
9
+ - unsloth
10
+ - chatml
11
+ - rapha
12
  language:
13
+ - en
14
  ---
15
 
16
  # Rapha β€” Clinical AI Physician Assistant
 
23
  - **Base model:** `unsloth/Qwen2.5-3B-Instruct-bnb-4bit`
24
  - **Method:** QLoRA (Unsloth) β†’ curriculum SFT β†’ DPO
25
  - **Chat template:** ChatML
26
+ - **Context window:** 2,048 tokens (training)
27
+ - **Trained:** 2026-08-06
28
 
29
  ## Training architecture (v2.6)
30
 
 
51
 
52
  ## Training data
53
 
54
+ Curriculum SFT across 6 datasets: Stage 1 greetings, Stage 2 OPQRST symptom
55
+ exploration, Stage 3 medical history, Stage 4 red-flag screening, a multi-turn
56
+ adversarial set (self-diagnosis, symptom denial, medication refusal, minimised
57
+ red flags, prompt injection), and full-arc sessions ending in a Stage 5
58
+ handoff. Followed by DPO preference alignment on a de-duplicated, leak-safe
59
+ train/val split (held out by source scenario).
60
+
61
+ Records actually used in this run (after quality filtering, de-duplication and per-stage caps): **24,000 total**.
62
+
63
+ | Stage | Records |
64
+ |---|---|
65
+ | Adversarial | 3,000 |
66
+ | FullArc | 4,500 |
67
+ | Stage1 | 4,500 |
68
+ | Stage2 | 4,500 |
69
+ | Stage3 | 3,500 |
70
+ | Stage4 | 4,000 |
71
+
72
+ ### Clinical content provenance
73
+
74
+ The interview question policy, red-flag screening, and the **Suspicions for
75
+ clinician consideration** section in each full-arc report are generated by a
76
+ deterministic forward-chaining rule engine (`clinical_rules.py`), not by the
77
+ source CSV β€” whose `doctor_response` column contains only 6 distinct strings
78
+ across 50,000 rows and is unused. Those rules are **author-specified from
79
+ published triage criteria and have not been clinician-validated.** Suspicions
80
+ are hypotheses for a clinician to investigate, never conclusions told to the
81
+ patient; Rapha still never diagnoses.
82
 
83
  ## Eval metrics (last training run)
84
 
85
  | Metric | Value |
86
  |---|---|
87
+ | empathy_rate | 0.3000 |
88
+ | escalation_accuracy | 0.5000 |
89
+ | adversarial_hold_rate | 0.5000 |
90
+ | pushback_hold_rate | 0.5000 |
91
+ | multi_question_rate | 0.4500 |
92
  | repetition_rate | 0.0000 |
93
+ | suspicion_section_rate | 1.0000 |
94
+ | avg_response_length | 42.0500 |
95
 
96
  ## Usage β€” Ollama (GGUF)
97
 
 
107
 
108
  model, tokenizer = FastLanguageModel.from_pretrained(
109
  model_name="Phora68/rapha",
110
+ max_seq_length=2048,
111
  load_in_4bit=True,
112
  )
113
  FastLanguageModel.for_inference(model)