What I Built
During natural disasters, connectivity loss, or travel in remote regions, standard cloud-based AI solutions become inaccessible the moment an internet connection drops. In high-stakes emergency situations, triage advice should never depend on network bandwidth, paid API keys, or remote cloud servers.
To solve this, I designed OpenEdge, a lightweight, offline-first emergency triage assistant built with open-source AI at its core. It operates directly inside any modern web browser to deliver deterministic, step-by-step first-aid guidance (such as CPR cadences, severe bleeding protocol, burn classification, and fracture stabilization) completely offline.
Why Open-Source AI Matters Here
Centralized closed models fail in two major areas during emergencies:
- Network Availability: When a tower goes down or an area lacks coverage, API-based models are non-functional.
- Data Sovereignty & Cost: Edge-deployed open-weight models have zero running cost once downloaded and ensure personal health queries remain private on the user's device.
Using open weights allows the application to embed model runtimes directly on-device using WebAssembly (Transformers.js / ONNX Runtime Web). By relying on small, efficient open-weight models like SmolLM or Gemma 2B, the system provides structured, life-critical triage steps without transmitting a single byte to an external server.
Technical Stack & Architecture
- Core Model Engine: Open-weight language model quantized to 4-bit weights for low-memory edge devices.
- Client Runtime: WebAssembly (Wasm) and WebGPU via ONNX / Transformers.js to execute inferences client-side.
- Triage Architecture: Constrained decoding with temperature controls ($T \le 0.2$) paired with prompt-anchored decision trees to eliminate conversational filler and focus purely on actionable instructions.
- Local Cache: PWA service workers and Cache API to allow instant offline reload.
What I Learned
Designing an AI system around open weights shifts the focus from simple prompt engineering to resource optimization:
- Small Models Excel at Focused Tasks: A general 70B model is unnecessary for structured emergency triage. A fine-tuned or strictly prompt-bound 1B–2B open model performs reliably while remaining responsive on everyday hardware.
- True Portability: Open-source AI ensures developers can deploy software anywhere—from a web browser on a phone to an embedded device in a disaster relief kit—without gatekeepers or licensing bottlenecks.
What's Next
- Adding voice-prompt interaction through open-source on-device Whisper models for hands-free guidance.
- Integrating offline mesh-network relays to sync emergency status reports across local devices without cellular towers.












