Osler-4B

Osler-4B (abhinand/Osler-4B) is a standalone, merged 4.55B Apache-2.0 general medical & clinical decision model ("System One" single-pass) built for fast, low-VRAM deployment (9.6 GB VRAM, 26.5 ms/item — fits on a single 12–16 GB GPU). 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 in one prefill pass — no text generation and no external custom library required.

  • Compact powerhouse (#3 overall across 12 evaluated models): Reaches 0.7530 5-set macro (within 0.7 pts of pplx-27B at 5.5× less VRAM and 3.4× lower latency), beats pplx-27B on Fresh Tier-2 (0.8883 vs. 0.8843) and by +8.6 pts on EHR & clinical documentation (0.8269 vs. 0.7411), and strictly dominates MedDecider-4B across all five headline sets (including Medical Exams & External Panel).
  • Standalone merged weights: Full BF16 Qwen3_5Model safetensors shards (attention LoRA r=32 merged) + [255, 2560] option-code readout + bundled modeling_osler.py and pplx_decider runtime.
  • Dev-only per-type calibration built in: choice: 1.5222, noul: 2.3744, score: 1.5388 (applied automatically by both AutoModel and Decider).
  • Base model: perplexity-ai/pplx-decider-flash-v1.2 (revision 9ff7cf9838e59df461c276b244d2af58, Apache-2.0, built on Qwen/Qwen3.5-4B).
  • Links: Project Page · Live Leaderboard Space · MedDecide-Bench · GitHub · Clinical Examples · Osler-9B (Flagship) · HF Collection

Key Capabilities & Pareto Frontier

1. Both sizes on the Efficiency–Accuracy Pareto frontier: On Size / Latency / VRAM vs. 5-Set Macro, Osler-4B (4.55B, 9.6 GB, 0.7530) and Osler-9B (8.39B, 17.3 GB, 0.7801) define the frontier — Osler-9B strictly outperforms pplx-27B (26.09B, 52.9 GB, 0.7600) at 3.1× less VRAM and 2.7× lower latency.

2. General medical & independent external proof (not just EHR): Even with zero EHR sets, Osler-9B sits on the Size vs. General Medical QA Pareto frontier (0.7419, best ≤10B), ranks #1 on Fresh Tier-2 (0.9008), #1 of 11 on External Panel calibration (ECE 0.0229, 5× better than pplx-27B), and #1 / #2 on independent MedNLI (0.8917 9B / 0.8910 4B — both beating pplx-27B 0.8748).

3. EHR mastery, 2–255 options & calibrated abstention: Both models beat pplx-27B on EHR & Clinical Docs (+9.6 pts 9B, +8.6 pts 4B), natively score 2–255 options (no 10-option cap), and reach 98.2% accuracy at 80% coverage (99.8% at 50%) on Clinical Docs via a single confidence threshold.


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"])
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-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_5Model with a [255, 2560] marker-position option-code readout (no causal lm_head). Standard autoregressive vllm serve targets causal ForCausalLM architectures and cannot serve noncausal marker-readout models. For high-throughput HTTP serving with vLLM ecosystem tooling, see abhinand/Osler-9B (which runs natively on vLLM Semantic Router vllm-sr serve -e abhinand/Osler-9B); for Osler-4B, wrap Decider.from_pretrained(..., fast=True) in a length-bucketed FastAPI/Uvicorn worker (at batch-1, p50 is 26.54 ms in 9.60 GB VRAM).


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-4B on all five headline sets (+22.60 pts on mr_verdict, +15.78 pts on mimic_suite, +0.66 panel, +0.26 knowledge, +0.63 confirm_general), and outperforms pplx-27B on 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: panel ECE 0.0374 (raw 0.1450, Brier 0.5643 vs. 0.6416 base), knowledge ECE 0.0194, mr_verdict ECE 0.0314.
  • Selective abstention: At 80% coverage, reaches 97.93% on mr_verdict (99.76% at 50%) and 81.10% on mimic_suite (87.87% at 50%).
  • Additional sets: mednli_test 0.8910, pairs_test 0.9580, mimic_heldout 0.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 ≥ 2014 held 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-shot pplx-flash control 0.5396 → Δ +0.0248 (clears ≤ 0.05 rule). 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, control 0/300).

Honest Limitations

  1. OOD QA regression (~1 pt vs. own base): Trails pplx-flash by -0.0113 [-0.0218, -0.0007] on panel and -0.0098 [-0.0191, -0.0017] on knowledge (trading ~1 pt of general OOD accuracy for +14.7 / +13.6 pts EHR and clinical documentation gains and better Brier on 4 of 5 headline sets). Use abhinand/Osler-9B if general OOD parity is required.
  2. Held-out template failure (READOUT_FAIL): On mr_heldout_test / synthea_indicator_evidence_v1 (n=514, excluded from training), falls below chance (0.245, READOUT_FAIL) while pplx-flash passes (0.597).
  3. Fresh-distribution calibration shift: Dev-fitted temperatures leave the model under-confident on fresh confirm_general (mean confidence 0.801 vs. accuracy 0.888, ECE 0.094).
  4. Not for unsupervised clinical decisions: Research model outputs must be reviewed by qualified clinicians.
Downloads last month
51
Safetensors
Model size
5B 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-4B

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(1,709)
this model

Space using abhinand/Osler-4B 1

Collection including abhinand/Osler-4B