Views
No views yet
google/medgemma-4b-itQ4_K_M (llama.cpp)medgemma-night-sentinel-Q4_K_M.gguf.\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"1from huggingface_hub import hf_hub_download
2from llama_cpp import Llama
3
4# Download the model from this repo
5model_path = hf_hub_download(
6 repo_id="Ismailea04/medgemma-night-sentinel",
7 filename="medgemma-night-sentinel-Q4_K_M.gguf",
8)
9
10# Load GGUF model
11llm = Llama(model_path=model_path, n_ctx=2048, verbose=False)
12
13prompt = (
14 "<start_of_turn>user\n"
15 "[NIGHT SENTINEL SYSTEM]\n"
16 "Patient Profile: 65yo male, post-operative recovery. Baseline HR 70.\n"
17 "Event/Anomaly: Sudden HR spike to 135 bpm with irregular rhythm, SpO2 92%.\n"
18 "TASK:\n"
19 "1. Compare the current data to the patient's baseline (name it: ##Comparaison).\n"
20 "2. Identify clinical anomalies (name it: ##Detection).\n"
21 "3. Provide a short interpretation (name it: ##Interpretation).\n"
22 "<end_of_turn>\n"
23 "<start_of_turn>model\n"
24)
25
26response = llm(prompt, max_tokens=256, stop=["<end_of_turn>"])
27print(response["choices"][0]["text"].strip())##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.google/medgemma-4b-itllama.cpp