# When Networks Fail, SARA Stands Up: Offline Flood Rescue with Gemma 4 E4B

> Source: <https://dev.to/codedbyasim/when-networks-fail-sara-stands-up-offline-flood-rescue-with-gemma-4-e4b-1idp>
> Published: 2026-05-22 18:50:31+00:00

This is a submission for the Gemma 4 Challenge: Build with Gemma 4
During major floods—like the catastrophic 2022 Pakistan Floods that displaced over 33 million people—mobile towers lose power and internet services collapse. This creates a critical communication blackout where stranded victims cannot signal for help, and rescue teams deploy boats, helicopters, and medical assets based on guesswork.
SARA (Safety And Rescue Assistant) is a 100% offline-first, local emergency command center. Deployed on a single coordinator laptop alongside a simple Wi-Fi hotspot, it creates a private local network—no internet required.
SARA simplifies disaster coordination into a seamless, offline process:
Flood victims connect to the hotspot (SARA-HELP
) and access SARA’s intake form using their mobile browser—no app installation needed.
Here is the walkthrough of SARA's offline system deployment, victim-side emergency reporting form, and real-time dashboard triage updates:
The complete codebase, configurations, and deployment steps are fully open-source and available on GitHub:
👉 GitHub Repository: SARA Offline Rescue
At the center of SARA is Google's Gemma 4 Edge-optimized family (gemma4:e4b
/ 4B) running locally on the coordinator laptop via Ollama.
Gemma 4 powers SARA in three major ways:
Disaster response centers operate on battery backups or portable generators. I needed a highly capable model that could run locally on consumer-grade laptop CPUs/GPUs without needing a connection to cloud servers. Gemma 4 4B fits comfortably within under 8GB VRAM, delivering stable, sub-5-second local inferences in the field.
Stranded victims report emergencies under high stress. Gemma 4's native multimodal capabilities allow me to process multiple modalities in a single pipeline without context switching.
nomic-embed-text
embeddings, injecting critical first-aid instructions into Gemma's prompt.SARA provides a natural language command box for rescue coordinators. When a coordinator types "Are there any available rescue boats?" or "Dispatch helicopter to case #3", Gemma 4 maps the query to custom Python tools (dispatch_rescue_team
, get_resource_status
, etc.) via Ollama's native tool calling. It updates the SQLite database, triggers WebSocket alerts, and returns structured confirmation text—all fully offline.
