Osler-9B

Osler-9B (abhinand/Osler-9B) is a standalone, merged 8.39B general medical decision model ("System One" single-pass) that combines broad medical decision-making with stronger EHR and clinical documentation understanding than much larger models (including 27B). Given any clinical state (an EHR note, discharge summary, clinical trial record, FDA drug label, or medical question) and typed questions (choice over 2–255 options, noul yes/no, or score over 2–10 ordered levels), it returns calibrated probabilities for every offered option in one prefill pass — no text generation and no external custom library required.

  • Standalone merged weights: Full BF16 Qwen3_5Model safetensors shards (attention LoRA r=32 merged) + FP32 [255, 4096] option-code readout + bundled d3_runtime & d3_server.py.
  • Non-generative by architecture: Carries no lm_head (Qwen3_5Model + 255-way option-code readout); cannot generate free text.
  • Dev-only per-type calibration built in: choice: 1.5274, noul: 2.3185, score: 1.7035 (applied automatically by AutoModel.from_pretrained(..., trust_remote_code=True)).
  • Base model: vllm-sr/d3-flash (revision 67e03e1bc157961c582ee7c6a35d9b15fada3dec, Apache-2.0, built on Qwen/Qwen3.5-9B).
  • Source & benchmark repository: github.com/abhinand5/MedDecide
  • License: Apache-2.0 (LICENSE and NOTICE included).

Quickstart — Hugging Face transformers (Zero Extra Libraries)

pip install "transformers>=5.0.0" torch safetensors accelerate pillow
# Optional fast linear-attention kernels on CUDA:
pip install flash-linear-attention
from transformers import AutoModel

model = AutoModel.from_pretrained("abhinand/Osler-9B", trust_remote_code=True)

result = model.system_one(
    state=(
        "68-year-old male admitted with fever 38.9C, HR 118, RR 26, BP 84/52 mmHg, "
        "lactate 4.2 mmol/L, and blood cultures growing E. coli. Started on IV norepinephrine "
        "and piperacillin-tazobactam in the ICU."
    ),
    questions={
        "sepsis_supported": {
            "type": "noul",
            "instructions": "Does the clinical documentation support a diagnosis of septic shock?",
        },
        "acuity": {
            "type": "choice",
            "instructions": "Select the highest-acuity clinical syndrome documented.",
            "criteria": {
                "septic_shock": "Sepsis with vasopressor-dependent hypotension and hyperlactatemia",
                "uncomplicated_uti": "Lower urinary tract infection without systemic involvement",
                "stable_angina": "Exertional chest pain relieved by rest",
            },
        },
        "documentation_strength": {
            "type": "score",
            "instructions": "Rate the strength of clinical indicator evidence for severe sepsis.",
            "criteria": ["none", "weak", "moderate", "strong", "definitive"],
        },
    },
)

print(result["answers"])
Example Clinical Decisions (click to expand 5 diverse real-world vignettes)

Measured directly on this merged checkpoint (one question per call, built-in dev calibration). See more examples on GitHub.

Clinical Scenario (condensed state) Question (type) Osler-9B Output
Negation / Ruled-out PE: Substernal burning post-flight; CTA chest showed NO PE, trop <6, resolved with lidocaine + pantoprazole. Confirm PE? (noul) / Final dx (choice: pe, nstemi, gerd, pneumothorax) p(yes) = 0.043 / gerd (0.993)
Messy EHR distractor: Childhood asthma + mild wheeze ("cardiac asthma"), failed albuterol; EF 25%, JVP 14, BNP 2,650, Kerley B lines. Primary driver of dyspnea? (choice: asthma, hfref_exacerbation, copd, pneumonia) / IV diuretic indicated? (noul) hfref_exacerbation (0.997) / p(yes) = 0.956
Metabolic differential: T2DM on metformin, gastroenteritis, Cr 4.1 (base 1.5), glucose 114, lactate 10.2, ketones negative. Metabolic emergency? (choice: dka, hhs, mala, salicylate) / Supports DKA? (noul) mala (0.985) / p(yes) = 0.086
Abstention / Missing evidence: 1.8 cm spiculated RUL lung nodule on screening CT; PET-CT and biopsy pending, no pathology yet. Confirmed TNM stage? (choice: stage_i, stage_iii, stage_iv, insufficient_info) insufficient_info (0.968)
Trial eligibility exclusion: Meets HFrEF inclusion (NYHA III, LVEF 30% on GDMT), but eGFR 28 (<30 exclusion) & active FOLFOX chemo. Eligible to enroll? (noul) p(yes) = 0.019

Serving with vLLM Semantic Router & Standalone HTTP Server

Note on standard vllm serve: Osler-9B is a noncausal full-attention single-pass decision model (Qwen3_5Model + [255, 4096] option-code readout, no lm_head). Standard autoregressive vllm serve expects a causal ForCausalLM architecture and does not serve noncausal System-One readout heads. Use vLLM Semantic Router Engine mode (vllm-sr) or the bundled d3_server.py HTTP server below.

Option A — vLLM Semantic Router (vllm-sr, recommended for production throughput)

Osler-9B uses the native Decision 3.0 (d3-code-readout-v1) package layout supported directly by vLLM Semantic Router:

curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel dev --no-launch
export PATH="$HOME/.local/bin:$PATH"
vllm-sr serve -e abhinand/Osler-9B

Query the live endpoint:

curl -s http://localhost:8899/v1/systemone   -H 'content-type: application/json'   -d '{
    "model": "abhinand/Osler-9B",
    "state": "Serum creatinine rose from 0.9 mg/dL to 2.4 mg/dL over 36 hours with oliguria.",
    "questions": {
      "aki": {"type": "noul", "instructions": "Do the documented lab values meet KDIGO AKI criteria?"}
    }
  }'

(Note: vllm-sr uses the scalar temperature in decision_config.json (1.5274, exact for choice); for exact per-qtype noul/score temperatures over HTTP, use Option B below.)

Option B — Bundled Standalone HTTP Server (d3_server.py)

huggingface-cli download abhinand/Osler-9B --local-dir ./Osler-9B
python ./Osler-9B/d3_server.py --model ./Osler-9B --host 0.0.0.0 --port 8080

Headline Benchmark Results (12-Model Unified Evaluation, 9 Frozen Sets)

Model Params panel (4,353) knowledge (5,456) confirm_general (5,988) mr_verdict (13,103) mimic_suite (4,253) 5-Set Macro Batch-1 p50 Peak VRAM
Osler-9B 8.39B 0.5927 0.7322 0.9008 0.9016 0.7733 0.7801 33.71 ms 17.32 GB
pplx-27B (27B ceiling) 26.09B 0.6510 0.7823 0.8843 0.8093 0.6729 0.7600 90.96 ms 52.92 GB
Osler-4B 4.55B 0.5502 0.6728 0.8883 0.8941 0.7597 0.7530 26.54 ms 9.60 GB
d3-flash (9B base) 8.39B 0.5899 0.7335 0.8774 0.7351 0.6301 0.7132 33.80 ms 17.32 GB
pplx-flash (4B base) 4.54B 0.5615 0.6835 0.8889 0.7466 0.6240 0.7009 25.51 ms 9.58 GB
Clef-Flash 9.00B 0.5711 0.6864 0.8933 0.6831 0.6306 0.6929 — —
MedDecider-9B 9.00B 0.5603 0.6997 0.8825 0.6653 0.6189 0.6853 — —
MedDecider-4B 4.00B 0.5436 0.6703 0.8820 0.6681 0.6019 0.6732 — —
  • Global 2-axis Pareto front (General Medical QA Avg vs. EHR & Clinical Docs Avg): Osler-9B (0.7419, 0.8375) and pplx-27B (0.7725, 0.7411). Osler-9B is the only ≤10B model on the front, outperforms pplx-27B by +9.6 pts on EHR and clinical documentation tasks (mr_verdict +9.23, mimic_suite +10.04) while running 2.7× faster in 3.1× less VRAM, and strictly dominates every comparable ≤10B model on all five headline sets.
  • Calibration: panel ECE 0.0229 (raw 0.1085, best of all 12 models; Brier 0.5223), mr_verdict ECE 0.0220 (Brier 0.1421), knowledge ECE 0.0441.
  • Selective abstention: At 80% coverage, Osler-9B reaches 98.22% accuracy on mr_verdict (99.77% at 50%) and 82.81% on mimic_suite (90.31% at 50%).
  • Additional sets: mednli_test 0.8917 (#1), pairs_test 0.9620 (#1), mimic_heldout 0.7000.

Privacy & MIMIC PHI / Memorisation Audit (Local-Only)

  • MIMIC-IV 3.1 / MIMIC-IV-Note 2.2 / MIMIC-IV-ED were processed strictly on local hardware (never sent to any hosted API), split by patient (anchor_year_group ≥ 2014 held out). Zero training data or MIMIC text is included in this repository.
  • Visited-member membership inference (2,000 MIMIC rows visited during training vs. 2,000 late-anchor non-members with 0 hash overlap): AUC 0.5876 [0.5703, 0.6051] vs. zero-shot d3-flash control 0.5408 → Δ +0.0468 (clears pre-registered ≤ 0.05 rule). Y10 historical compatibility AUC: 0.5018.
  • Verbatim extraction: Structurally not applicable — Osler-9B carries no lm_head and cannot generate text.

Honest Limitations

  1. OOD QA parity vs. base / ceiling vs. 27B: Ties (does not beat) d3-flash on panel (+0.0028 [-0.0069, +0.0129]) and knowledge (-0.0013 [-0.0090, +0.0062]), and trails pplx-27B on hard multi-step medical QA (MedXpertQA, MMLU-Pro Health).
  2. Held-out template failure (READOUT_FAIL): On mr_heldout_test / synthea_indicator_evidence_v1 (n=514, excluded from training), Osler-9B falls below chance (0.356, READOUT_FAIL) while its base passes (0.459).
  3. Fresh-distribution calibration shift: Dev-fitted temperatures leave the model under-confident on fresh confirm_general (mean confidence 0.814 vs. accuracy 0.901, ECE 0.090). Recalibrate on a small target-domain dev split when deploying under strong distribution shift.
  4. Not for unsupervised clinical decisions: Research model outputs must be reviewed by qualified clinicians.
Downloads last month
2
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for abhinand/Osler-9B

Finetuned
Qwen/Qwen3.5-9B
Finetuned
(1,577)
this model