Alert-Turbo Β· CPU (902 MB)

A bedside alarm that reads the nursing note β€” and runs on a laptop.

Alert-Turbo turns every bed into one card (vitals + nursing note) and asks a 2B decision model five questions about it. It answers with calibrated probabilities, not text. The alarm rings when the risk rises, not when a number crosses a factory threshold.

We built it in four moves.

  1. Teach a 2B model to read notes. We used LoRA on 41,358 bed cards: 38,870 real surgical states from VitalDB, plus note-only minimal pairs labeled by a 27B teacher.
  2. Make it fit on a laptop. Layer pruning, MLP width pruning with a 5-minute healing run, and int4 quantization took it from 3.6 GB to 902 MB without losing the ability to read notes.
  3. Make its probabilities honest. Platt scaling on 56,958 real minutes brought the calibration error from 0.302 to 0.0007.
  4. Test it once. Every threshold was frozen on the dev set and pre-registered. Then we opened a sealed box of 618 surgeries a single time.

This repository is the deployment package: 902 MB, int4, CPU only, no GPU, no internet.

βˆ’73% false alarms 25 per 10-bed night shift vs 93 for MEOWS, at the same or higher sensitivity
5.0 min earlier Β· +10.7 %p more than Shock Index trend at the same false-alarm rate
64% of bleeding patients caught on average 17 min ahead
0.809 15-min AUROC hybrid model, best of every method compared
+0.065 AUROC over a numeric model given every field, on a specialty never seen in training
99.3% note-only pairs read correctly (a numbers-only model scores 50%)
1.66 s per bed MacBook M2 8 GB CPU Β· peak RAM 1.2 GB Β· 10 beds in 17.5 s
$16.6 total development compute

How Alert-Turbo was built

Ward screen Ward screen built on this model (synthetic patients). Bed 5 is a masked bleed. Under a beta-blocker her heart rate only went from 50 to 61, and her Shock Index is still normal. But the 15-min risk rose from 4% to 14% in five minutes, and the screen says why.


Why another alarm

Bedside monitors ring on fixed limits. A patient whose normal heart rate is 46 triggers a bradycardia alarm all night. A slipped cuff or a cough sets it off again. In our data, fixed-limit alarms fire 0.71 times per hour with nothing wrong. Nurses learn to tune them out.

And the patient who is actually bleeding can stay silent. A beta-blocker holds the heart rate down. Blood pressure stays above the limit. The monitor only rings once the pressure collapses.

What would have caught it was written down: "bloody drain output increasing, dizzy." No monitor reads that line. Alert-Turbo does.

What it does

One card per bed. The static part sits on top: age, procedure, history, baseline and nursing note. The last 30 minutes of vitals sit below, with sensor-error cleanup and 5- and 15-min deltas precomputed. The static part is cached per bed (prefix KV cache, 1.82Γ— faster), so each minute only the new rows are computed.

Five questions, five probabilities. Strands Decider does not generate text. Five heads read the last hidden state:

head question used for
urgent_5m Deterioration within 5 min? hybrid alarm, ward screen
urgent_15m Deterioration within 15 min? rising alarm, hybrid alarm
urgent_30m Deterioration within 30 min? hybrid alarm, ward screen
caution_6h Systolic > 160 within 6 h? pre-eclampsia watch
is_baseline_or_artifact Is the abnormal value the patient's baseline or measurement noise? explanation on the ward screen

Two alarms, the ward picks one.

  • Rising alarm rings first, for high-bleeding-risk beds. It fires when urgent_15m rises β‰₯ 0.055 within 5 min, or reaches β‰₯ 0.85.
  • Hybrid alarm rings least, for wards drowning in alarms. It fires when the hybrid probability is β‰₯ 0.20.

Results (sealed set, 618 surgeries, evaluated once)

Earlier and more Left: at every false-alarm rate, the rising alarm catches more deterioration than Shock Index trend (shaded gap). Right: sensitivity in bleeding patients. The rising alarm reaches 64.0%, against 46.3% for Shock Index trend and 53.7% for logistic regression trained on the same data.

Method Sensitivity Lead time False alarms / h
Shock Index trend (reference) 40.8% 11.0 min 0.49
Rising alarm 51.5% 16.0 min 0.50
Hybrid alarm 41.6% 11.0 min 0.31

Fewer alarms and hybrid AUROC Left: false alarms in one 10-bed, 8-hour shift at matched sensitivity (about 41%). Right: hybrid model 15-min AUROC by set. It adds +0.020 over its own numeric model, with every 95% CI above zero.

The hybrid model

Neither model wins alone. The numeric model (HistGBDT, 52 features, 1 MB) has the higher AUROC on its own, 0.789 vs 0.757. The language model wins where it matters clinically: bleeding patients (64.0% vs 61.0%), lead time, reading notes (99.3% vs 50%) and unseen specialties. They are wrong in different places, so we combine them with four weights:

logit p = 0.07Β·L5 + 2.14Β·L15 βˆ’ 2.02Β·L30 + 0.71Β·G15 + 0.71

L = Alert-Turbo logits, G = HistGBDT logit. The weights were fit on the dev set only. Extra cost: 1 MB, 0.2 ms. The +2.14 / βˆ’2.02 pair on the 15- and 30-min heads means the hybrid reads the gap between horizons, not just their level. In a note-only pair the vitals are identical, so the G15 term cancels and the 99.3% note accuracy survives untouched.

15-min AUROC Hybrid Numeric only Numeric, every field* Language only
Sealed (618) 0.809 0.789 0.789 0.757
Bleeding (200) 0.809 0.789 0.801 0.764
Gynecology, unseen (150) 0.710 0.690 0.645 0.675

*Department, anesthesia, ECG, procedure name (TF-IDF), diagnosis, plus separate 5/15/30-min models.

Hybrid minus numeric only (patient bootstrap, 1,000Γ—):

Set Difference [95% CI]
Sealed +0.020 [0.013, 0.027]
Bleeding +0.020 [0.008, 0.032]
Gynecology +0.020 [0.005, 0.035]

All three have p ≀ 0.004. Handing the numeric model every field does not close the gap. On the unseen specialty it overfits the procedure names and falls to 0.645.


How we trained it

1 Β· Real bed states, labeled minute by minute

We split VitalDB surgeries by patient with zero overlap:

  • Train: 2,005 surgeries
  • Dev: 459 surgeries, used for calibration and thresholds
  • Sealed: 618 surgeries
  • Separate sealed sets: gynecology (150, a specialty absent from training) and obstetric (30)

Every training sample is one bed card at one minute. Deterioration means MAP < 65 or SBP < 90 for at least 2 minutes. Each card is labeled for 5, 15 and 30 minutes ahead. For the 15-min head, the 16–45 min window before an event is masked out of the loss, because early compensation makes those minutes genuinely ambiguous.

The training set was built to contain the cases that fool threshold alarms:

Bucket States Why it is there
Deterioration, bleeding 10,542 the case that matters most
Deterioration, other 10,095
Hard negative A: stably abnormal value, no deterioration 5,487 the bradycardic patient who rings all night
Hard negative B: one-minute spike that rebounds 2,445 the cuff, the cough
Stable 10,301

The is_baseline_or_artifact head is trained on the two hard-negative buckets. That head is how the ward screen can say "this value is probably her normal".

2 Β· Teaching it to read the note

Numbers alone cannot tell a dangerous card from a harmless one when the numbers are identical. So we built minimal pairs. Both cards in a pair carry the same 30 minutes of vitals; only the text says danger or harmless. There are five clinical patterns:

Pattern Pairs used
Masked bleed under a beta-blocker 46
Postpartum hemorrhage with reassuring vitals 93
Pre-eclampsia drift 106
Chronic baseline vs acute drop 28
Artifact note vs real symptom 38
  • Labeling: Qwen3.8-27B (H100, vLLM, about 22 min) scored all 1,200 states.
  • Audit: we dropped 261 unparsable rows and 61 pairs whose two sides differed by less than 0.15. None of the remaining pairs broke 5 ≀ 15 ≀ 30 min ordering. 311 pairs (622 states) passed.
  • Role of the teacher: it only labels training data. It never runs at the bedside.
  • Test pairs: the dev and sealed note pairs (60 and 150) share no templates with training.

3 Β· LoRA on a decision model

Training curves

Base Strands Decider 2B (Qwen3.5 hybrid: 6 full-attention + 18 Gated DeltaNet layers). Its original LoRA was merged, then a new one attached.
LoRA rank 32, alpha 64, dropout 0.05 on attention, MLP and DeltaNet projections
Trainable 36.27M of 1,918M parameters (1.89%) + 5 heads (hidden 256)
Data 38,870 VitalDB states + 622 note states Γ— 4 = 41,358 rows
Loss horizon-masked BCE + 0.5 Β· monotonic hinge (p5 ≀ p15 ≀ p30) + 0.3 Β· cosine anchor to the frozen original
Schedule 2 epochs, 2,585 steps, batch 32 (16 Γ— 2), lr 1e-4 (heads 5e-4), cosine
Hardware one H100 80 GB, 1 h 34 min

The monotonic hinge keeps the three horizons consistent: risk within 5 minutes can never exceed risk within 30. The cosine anchor keeps the hidden states close to the original model, so it learns the task without forgetting how to read. Training loss fell from 0.69 to 0.22. Note-pair accuracy on dev stayed at 100% at all ten validation checks.

On the sealed note pairs, accuracy rose from 96.7% to 99.3%. On the hardest pattern, the masked bleed under a beta-blocker, it rose from 86.7% to 100%.

4 Β· Shrinking it to 902 MB

Stage Layers Γ— MLP Size val loss Note-pair accuracy (dev)
LoRA merged (bf16) 24 Γ— 6,144 3,637.5 MB 0.850 100%
Drop 4 layers 20 Γ— 6,144 3,188.8 MB 0.499 100%
Halve MLP width 20 Γ— 3,072 2,468.8 MB 0.510 73.3%
Healing, 300 steps 20 Γ— 3,072 2,468.8 MB 0.498 100%
int4 g128 + int8 mmap embeddings 20 Γ— 3,072 901.9 MB 0.471 93.3% (sealed 99.3%)

Layer pruning

  • Layer pruning. The six full-attention layers are locked. We skipped each linear-attention layer in turn and measured validation loss on 512 states. Removing layers 5, 16, 18 and 20 together lowered the loss from 0.746 to 0.587: those layers were adding noise for this task.
  • Width pruning + healing. We ranked MLP channels by activation magnitude and kept the top half (6,144 β†’ 3,072). This was the one step that hurt. Note accuracy fell to 73.3%, and only 18.3% of pairs kept a gap of 0.15 or more. A 300-step healing run (about 5 minutes) brought accuracy back to 100%.
  • int4. All 154 linear layers use group-128 symmetric int4. The 248k-token embedding table is int8 and memory-mapped, so only the rows a card actually uses are read from disk. That is how peak RAM stays at 1.2 GB.

5 Β· Making the probabilities honest

Calibration

Training data was 40% positive for the 15-min head, so the model learned to overstate risk. In a real operating room the rate is 6.7% per minute. We fit two-parameter Platt scaling per head on 56,958 continuous dev minutes. For 15 min it is pβ€² = Οƒ(0.605Β·logit p βˆ’ 2.479).

  • Calibration error: ECE fell from 0.302 to 0.0007.
  • Sensitivity: dev sensitivity rose from 35.0% to 45.6%, past Shock Index trend's 35.7%.
  • Sealed set: ECE is 0.0020 / 0.0048 / 0.0063 for 5, 15 and 30 min.

6 Β· One look at the sealed set

Alarm thresholds, the hybrid weights and the pass criteria were all set on the dev set. They were written into a pre-registration file locked with a checksum. Only then was the sealed set scored, once. Confidence intervals come from a patient-level bootstrap.

One bed at a time. Ten cards together are 6,078 tokens, past the 4,096 default window, and beds bleed into each other. In our test, a calm bed next to a critical one gained 13.6 %p of risk, and 20.8% of calls flipped. Asked one by one, ten beds take 17.5 s, which is 29% of the one-minute cycle.


Quickstart

pip install -r requirements.txt
python example.py
from alert_ews.turbo.serve_turbo import AlertTurboEngine

engine = AlertTurboEngine("path/to/this/repo")   # CPU, ~1.3 GB RAM
out = engine.score_state(bed_card_text)
out["answers"]["urgent_15m"]["probability"]

example.py scores a minimal pair from the sealed note test: identical vitals, different text. On a MacBook CPU:

Note 15-min risk Baseline / artifact
"Baseline HR 45 on bisoprolol, 35 min after delivery. Uterine atony, clots increasing, cold sweat." 0.066 0.149
"Usual HR 65. Measured right after breastfeeding. Lochia normal, uterus firm, no symptoms." 0.016 0.597

The serving engine also runs as a FastAPI server with python -m alert_ews.turbo.serve_turbo --model .. It exposes /health, /v1/warm, /v1/systemone and /v1/recalibrate, the last being an 8 ms on-site Platt refit.

Files

Path Contents
torso_int4.safetensors, quant_config.json 20-layer Qwen3.5 torso, int4 g128
embed_tokens.int8.bin, embed_scales.fp32.bin, embed_meta.json int8 row-symmetric embeddings (mmap)
turbo_heads.safetensors, turbo_config.json 5 decision heads + Platt calibrators
calibration_report.json ECE / Brier / NLL before and after calibration
alert_ews/ loader, int4 kernels, prefix-cache engine, bed-card renderer
hybrid/ HistGBDT (52 features) and the 4-weight hybrid model; hybrid_weights.json has the weights in plain text

The .pkl files in hybrid/ are scikit-learn pickles. Load them only if you trust this repository.

Data

  • Vitals: VitalDB (Lee et al., Sci Data 2022, CC BY 4.0).
  • Notes: Korean, generated from a written labeling contract as minimal pairs. Training uses 600 pairs, dev 60 and sealed 150, with no template overlap between them.

Limits

  • Not a medical device. This is a research prototype and must not be used for clinical decisions.
  • Intraoperative data only. It has not been evaluated on ward patients. The ward screens use synthetic patients.
  • Rule-generated notes. Real nursing notes use abbreviations and styles not covered here. All notes are in Korean.
  • Obstetric records. These use cuff pressure every 3–5 min. AUROC held (0.731), but the probability scale shifted (ECE 0.158). Recalibrate on local data first with /v1/recalibrate.
  • Still to do: prospective ward validation, a standard on-site recalibration procedure, and clinician usability testing.

Citation

@misc{park2026alertturbo,
  title  = {Alert-Turbo: A Note-Reading Bedside Early-Warning Alarm on a Laptop CPU with LoRA, Pruning and int4 Quantization},
  author = {Park, William},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/carlclausewitz/alert-turbo-cpu}}
}

Base model: StrandsAgents/strands-decider-2B-qwen3.5-v1-2610 (Apache-2.0), built on Qwen3.5-2B-Base.

Contact

William Park β€” open a discussion in the Community tab.

Downloads last month
45
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for carlclausewitz/alert-turbo-cpu