r/expo • u/DarkRyoshin17 • 6h ago
Running Llama 3.2 & Qwen 2.5 100% offline in Expo 52 with llama.rn (Free Android Demo APK + Architecture)
Hey everyone,
I’ve been documenting how to run quantized GGUF LLMs (Llama 3.2 1B/3B, Qwen 2.5, Gemma 2, DeepSeek-R1 1.5B) completely offline in Expo 52 without ejecting out of CNG/prebuild.
The two biggest mobile blockers were Android OS memory kills and thermal throttling during long generations. We solved both via an Expo Config Plugin that injects a cooperative C++ duty-cycle throttle into llama.rn, driven every 500ms by an Android foreground service monitoring thermal status, MemoryInfo, and Choreographer frame jank—plus SQLite WAL checkpointing and offline PDF/DOCX/MLKit OCR.
I just published a standalone arm64 Android Demo APK (v1.0.0-demo) and the full architecture breakdown (Mermaid diagrams + Expo config setup) on GitHub:
https://github.com/Itsvks17/localai-mobile
Happy to share config plugin details or answer any Expo prebuild questions!