
Senior Full Stack Developer (Gen AI) — shipping on-device AI that keeps data on the phone.
Lahore, Pakistan · Open to remote worldwide
I ship mobile AI that actually runs on-device: a React Native demo powered by llama.rn/llama.cpp with Q4_K_M quant, on-screen latency, and zero network egress at inference — airplane mode on, it still answers. In production, I shipped the same discipline inside a React Native checkout flow: cold start dropped from 8.2s to under 2s, cloud inference cost dropped roughly 92%, and user activation moved from 11% to 47%. I'm looking for senior AI + mobile roles where data privacy matters, and I can prove the engineering in code: https://github.com/Zulqurnain/on-device-llm-rn, https://zulqurnainj.com/on-device, https://linkedin.com/in/zulqurnainjj.
Reuse this section verbatim across recruiter replies, HN comments, and email/RM signature blocks. Do not change claims per surface.
No API keys. No server. No network at inference time. This is a runnable React Native demo — pick a small GGUF, load it once, then toggle airplane mode and it still answers, because the model lives in the app sandbox. The pattern behind “ship AI features without sending user data to the cloud.”
Cold start
to first context, 1.5B Q4_K_M
Time to first token
on-device, no round-trip
Network egress
at inference time
Offline / airplane mode
works after first download
Representative figures from the live demo on a mid-tier Android device with GPU offload (1.5B Q4_K_M). Actual numbers vary by SoC, model size, and quant. Run the repo on your own hardware to benchmark.
A 45-second proof: ask the app a question, turn on airplane mode, and it still answers — with the live latency line (cold-start ms, first-token ms, tok/s) on screen.
Loom walkthrough — 45 sec
Recording slot pending. The 45-second script (hook → offline toggle → live metrics → where to find me) is in the repo's LOOM_SCRIPT.md (a longer 6-min version is also there). Drop the Loom embed iframe in this card once recorded.
src/llm/OnDeviceLLM.ts to highlight n_gpu_layers: 99 + the latency measurement.llama.cpp via llama.rn
Battle-tested native runtime, not a toy wrapper. Runs through JSI — no bridge serialization penalty.
INT4 / Q4_K_M quant
A 1.5B model drops to ~1 GB at minimal quality loss. Ships small, loads fast, fits mid-tier devices.
SoC layer sharding (n_gpu_layers)
Layers offload to the GPU/NPU when present; automatic CPU fallback on devices without it.
Prompt + KV-cache per context
The same completion() call accepts retrieved context — so context-only RAG stays on-device too.
| Concern | On-device (this repo) | Cloud LLM API |
|---|---|---|
| PII leaving the device | Never | Always (prompt + context) |
| Latency floor (1B class) | 50–200 ms | + network round-trip |
| Serving cost | ~$0 (on-device) | per-token, recurring |
| Offline / spotty 4G | ✅ works | ❌ |
| Data localisation (GDPR, fintech) | ✅ by construction | needs extra controls |
Evaluating edge-AI on mobile?
Happy to walk through this in a technical read-through.