MedGemma Night Sentinel (Q4_K_M)

This repository contains a quantized GGUF build of MedGemma-4B-IT for cardiology monitoring tasks.

Model Details

  • Base model: google/medgemma-4b-it
  • Quantization: Q4_K_M (llama.cpp)
  • Calibration: I-matrix computed from a cardiology-specific dataset
  • File: medgemma-night-sentinel-Q4_K_M.gguf

Calibration Data

The I-matrix was computed using a cardiology dataset built from:

  • Adolescent continuous HR monitoring (longitudinal Fitbit HR)
  • Adult ICU ECG/HR records (MIMIC-III)
  • Neonatal ICU ECG/HR records (MIMIC-III)

This calibration focuses on cardiology patterns (HR variability, arrhythmias, SpO2 changes) to preserve clinical reasoning after quantization.

How to Test (llama.cpp CLI)

.\llama_bin\llama-cli.exe -m medgemma-night-sentinel-Q4_K_M.gguf -c 2048 -n 256 -p "<start_of_turn>user`n[NIGHT SENTINEL SYSTEM]`nAnalyze the following continuous cardiac monitoring data:`nPatient baseline HR is 70 bpm. Current HR is 135 bpm with irregular rhythm. SpO2 is 92%. What is your assessment?`n<end_of_turn>`n<start_of_turn>model`n"

How to Test (Python)

from huggingface_hub import hf_hub_download
from llama_cpp import Llama

# Download the model from this repo
model_path = hf_hub_download(
    repo_id="Ismailea04/medgemma-night-sentinel",
    filename="medgemma-night-sentinel-Q4_K_M.gguf",
)

# Load GGUF model
llm = Llama(model_path=model_path, n_ctx=2048, verbose=False)

prompt = (
    "<start_of_turn>user\n"
    "[NIGHT SENTINEL SYSTEM]\n"
    "Patient Profile: 65yo male, post-operative recovery. Baseline HR 70.\n"
    "Event/Anomaly: Sudden HR spike to 135 bpm with irregular rhythm, SpO2 92%.\n"
    "TASK:\n"
    "1. Compare the current data to the patient's baseline (name it: ##Comparaison).\n"
    "2. Identify clinical anomalies (name it: ##Detection).\n"
    "3. Provide a short interpretation (name it: ##Interpretation).\n"
    "<end_of_turn>\n"
    "<start_of_turn>model\n"
)

response = llm(prompt, max_tokens=256, stop=["<end_of_turn>"])
print(response["choices"][0]["text"].strip())

Example Output

##Comparaison
- Baseline HR 70 bpm vs current 135 bpm (marked tachycardia).

##Detection
- Irregular rhythm suggests possible atrial fibrillation or ectopy.
- SpO2 92% indicates mild desaturation.

##Interpretation
Acute tachyarrhythmia with mild hypoxemia. Recommend prompt clinical assessment,
repeat vitals, and ECG evaluation.

Intended Use

This model is intended for research and prototyping of cardiology monitoring assistants. It is not a medical device and must not be used for clinical decision-making without qualified medical oversight.

Acknowledgements

  • Base model: google/medgemma-4b-it
  • Quantization tooling: llama.cpp
Downloads last month
9
GGUF
Model size
4B params
Architecture
gemma3
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Ismailea04/medgemma-night-sentinel

Quantized
(44)
this model