Views
No views yet
1{
2 "severity": "CRITICAL",
3 "incident_type": "MEDICAL",
4 "summary": "Hiker fell 30 feet from cliff, unable to move legs...",
5 "location": {
6 "description": "Pacific Crest Trail, mile marker 1847",
7 "accessibility": "TRAIL"
8 },
9 "resources_needed": ["Helicopter EMS", "Rope rescue team", "Trauma kit"],
10 "priority_actions": ["Immobilize legs", "Apply thermal protection", "Request helicopter evacuation"],
11 "requires_evacuation": true,
12 "communication_status": "LIMITED"
13}1# Download the GGUF file
2hf download ajvikram/emergency-triage-4b-gguf emergency-triage-4b-q4_k_m.gguf
3
4# Create a Modelfile
5cat > Modelfile << 'EOF'
6FROM ./emergency-triage-4b-q4_k_m.gguf
7
8TEMPLATE """{{- if .System }}<|im_start|>system
9{{ .System }}<|im_end|>
10{{ end }}<|im_start|>user
11{{ .Prompt }}<|im_end|>
12<|im_start|>assistant
13"""
14
15SYSTEM """You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment."""
16
17PARAMETER temperature 0.3
18PARAMETER num_ctx 2048
19PARAMETER stop "<|im_end|>"
20EOF
21
22# Import into Ollama
23ollama create emergency-triage -f Modelfile
24
25# Run it
26ollama run emergency-triage "A hiker has collapsed on a remote trail 8 miles from the nearest road. They are unresponsive, breathing shallow. Two other hikers are present. No cell service. Temperature is 95F with high humidity."1# Download the GGUF
2hf download ajvikram/emergency-triage-4b-gguf emergency-triage-4b-q4_k_m.gguf
3
4# Run inference (Metal GPU on Mac, CUDA on Linux)
5llama-cli \
6 -m emergency-triage-4b-q4_k_m.gguf \
7 -p "<|im_start|>system
8You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment.<|im_end|>
9<|im_start|>user
10Your emergency scenario here<|im_end|>
11<|im_start|>assistant" \
12 -n 512 --temp 0.3 -ngl 99 --single-turnemergency-triage-4b-q4_k_m.gguf (2.4 GB) to your deviceYou are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment.emergency-triage-4b-q4_k_m.gguf to your device1from transformers import AutoModelForCausalLM, AutoTokenizer
2import json
3
4model = AutoModelForCausalLM.from_pretrained("ajvikram/emergency-triage-4b-gguf", subfolder="merged")
5tokenizer = AutoTokenizer.from_pretrained("ajvikram/emergency-triage-4b-gguf", subfolder="merged")
6
7messages = [
8 {"role": "system", "content": "You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment."},
9 {"role": "user", "content": "Your scenario here"}
10]
11
12text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
13inputs = tokenizer(text, return_tensors="pt").to(model.device)
14outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3)
15print(tokenizer.decode(outputs[0], skip_special_tokens=True))1# On Raspberry Pi 5 (8GB) or Jetson Nano
2# Build llama.cpp for your platform
3git clone https://github.com/ggerganov/llama.cpp
4cd llama.cpp && cmake -B build && cmake --build build
5
6# Run inference (CPU-only on Pi, CUDA on Jetson)
7./build/bin/llama-cli -m emergency-triage-4b-q4_k_m.gguf \
8 -p "your prompt" -n 512 --temp 0.3 --single-turn| Format | Size | BPW | Use case |
|---|---|---|---|
| F16 (merged) | 7.6 GB | 16.0 | Server / fine-tuning base |
| Q4_K_M | 2.4 GB | 4.95 | Mobile / edge deployment |
| Platform | Speed | Notes |
|---|---|---|
| Mac (Metal) | ~84 tok/s | M1/M2/M3 Apple Silicon |
| NVIDIA GPU | ~100+ tok/s | CUDA, depends on GPU |
| iPhone 15 Pro | ~15-20 tok/s | A17 Pro chip |
| Raspberry Pi 5 | ~5-10 tok/s | CPU only, 8GB model |
1{
2 "severity": "CRITICAL | HIGH | MEDIUM | LOW",
3 "incident_type": "MEDICAL | NATURAL_DISASTER | RESCUE | INFRASTRUCTURE | WILDLIFE | WEATHER | VEHICLE | OTHER",
4 "summary": "1-2 sentence dispatch summary",
5 "location": {
6 "description": "location details",
7 "accessibility": "ROAD | TRAIL | OFF_TRAIL | AIR_ONLY"
8 },
9 "resources_needed": ["specific resources"],
10 "priority_actions": ["ordered by urgency"],
11 "requires_evacuation": true/false,
12 "communication_status": "FULL | LIMITED | NONE"
13}