Osler-4B
Osler-4B (abhinand/Osler-4B) is a standalone, merged 4.55B general medical decision model ("System One" single-pass) built for fast, low-VRAM (9.6 GB, 26.5 ms/item) deployment, delivering stronger EHR and clinical documentation understanding than much larger models (including 27B) alongside broad general medical decision coverage. Given a clinical state and typed questions (choice over 2–255 options, noul yes/no, or score over 2–10 ordered levels), it returns calibrated probabilities in one prefill pass — no text generation and no external custom library required.
- Standalone merged weights: Full BF16
Qwen3_5Modelsafetensors shards (attention LoRAr=32merged) +[255, 2560]option-code readout + bundledmodeling_osler.pyandpplx_deciderruntime. - Dev-only per-type calibration built in:
choice: 1.5222,noul: 2.3744,score: 1.5388(applied automatically by bothAutoModelandDecider). - Base model:
perplexity-ai/pplx-decider-flash-v1.2(revision9ff7cf9838e59df461c276b7699d56b244d2af58, Apache-2.0, built onQwen/Qwen3.5-4B). - Source & benchmark repository: github.com/abhinand5/MedDecide
- License: Apache-2.0 (
LICENSEandNOTICEincluded).
Quickstart — Hugging Face transformers (Zero Extra Libraries)
pip install "transformers>=5.0.0" torch safetensors accelerate pillow
from transformers import AutoModel
model = AutoModel.from_pretrained("abhinand/Osler-4B", 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"])
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-4B 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.027 / gerd (0.991) |
| 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.992) / p(yes) = 0.953 |
| 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.991) / p(yes) = 0.089 |
| 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.990) |
| 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.024 |
Batched & Fast Serving (Bundled pplx_decider Runtime)
You can also call model.decide([...]) directly on a list of requests, or install the bundled standalone package from the downloaded repo:
from pathlib import Path
import sys
from huggingface_hub import snapshot_download
ckpt = Path(snapshot_download("abhinand/Osler-4B"))
sys.path.insert(0, str(ckpt / "source" / "src"))
from pplx_decider import Decider
# Pass fast=True for torch.compile + bucketed CUDA execution (see requirements-fast.txt)
decider = Decider.from_pretrained(ckpt, device="cuda", fast=False)
responses = decider.decide([
{
"state": "Serum creatinine rose from 0.9 to 2.4 mg/dL over 36 hours with oliguria.",
"questions": {
"aki": {"type": "noul", "instructions": "Do the lab values meet KDIGO AKI criteria?"}
},
}
])
print(responses[0]["answers"])
Note on vLLM: Like Osler-9B, Osler-4B uses noncausal full attention over
Qwen3_5Modelwith a[255, 2560]marker-position option-code readout (no causallm_head). Standard autoregressivevllm servetargets causalForCausalLMarchitectures and cannot serve noncausal marker-readout models. For high-throughput HTTP serving with vLLM ecosystem tooling, seeabhinand/Osler-9B(which runs natively on vLLM Semantic Routervllm-sr serve -e abhinand/Osler-9B); for Osler-4B, wrapDecider.from_pretrained(..., fast=True)in a length-bucketed FastAPI/Uvicorn worker (at batch-1, p50 is26.54 msin9.60 GBVRAM).
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 |
pplx-flash (4B base) | 4.54B | 0.5615 | 0.6835 | 0.8889 | 0.7466 | 0.6240 | 0.7009 | 25.51 ms | 9.58 GB |
MedDecider-4B | 4.00B | 0.5436 | 0.6703 | 0.8820 | 0.6681 | 0.6019 | 0.6732 | — | — |
- ≤4B frontier: Strictly dominates
MedDecider-4Bon all five headline sets (+22.60 ptsonmr_verdict,+15.78 ptsonmimic_suite,+0.66panel,+0.26knowledge,+0.63confirm_general), and outperformspplx-27Bon EHR and clinical documentation understanding (mr_verdict+8.48 pts,mimic_suite+8.68 pts) at 3.4× lower latency and 5.5× smaller VRAM. - Calibration:
panelECE 0.0374 (raw0.1450, Brier0.5643vs.0.6416base),knowledgeECE 0.0194,mr_verdictECE 0.0314. - Selective abstention: At 80% coverage, reaches 97.93% on
mr_verdict(99.76%at 50%) and 81.10% onmimic_suite(87.87%at 50%). - Additional sets:
mednli_test0.8910,pairs_test0.9580,mimic_heldout0.6727.
Privacy & MIMIC PHI / Memorisation Audit (Local-Only)
- MIMIC-IV 3.1 / MIMIC-IV-Note 2.2 / MIMIC-IV-ED were processed strictly locally (never sent to any hosted API), split by patient (
anchor_year_group ≥ 2014held out). Zero training data or MIMIC text is included in this repository. - Visited-member membership inference (2,000 visited training rows vs. 2,000 late-anchor non-members, 0 hash overlap): AUC 0.5644
[0.5466, 0.5813]vs. zero-shotpplx-flashcontrol 0.5396 → Δ +0.0248 (clears≤ 0.05rule). Y10 compatibility AUC: 0.5033. - Verbatim extraction probe (300 MIMIC discharge notes): 0/300 matches at ≥50, ≥25, and ≥10 consecutive tokens (longest run
1, control0/300).
Honest Limitations
- OOD QA regression (~1 pt vs. own base): Trails
pplx-flashby-0.0113 [-0.0218, -0.0007]onpaneland-0.0098 [-0.0191, -0.0017]onknowledge(trading ~1 pt of general OOD accuracy for+14.7/+13.6 ptsEHR and clinical documentation gains and better Brier on 4 of 5 headline sets). Useabhinand/Osler-9Bif general OOD parity is required. - Held-out template failure (
READOUT_FAIL): Onmr_heldout_test / synthea_indicator_evidence_v1(n=514, excluded from training), falls below chance (0.245,READOUT_FAIL) whilepplx-flashpasses (0.597). - Fresh-distribution calibration shift: Dev-fitted temperatures leave the model under-confident on fresh
confirm_general(mean confidence0.801vs. accuracy0.888, ECE0.094). - Not for unsupervised clinical decisions: Research model outputs must be reviewed by qualified clinicians.