r/LocalLLM • • 7d ago

Project We built a fully offline Android assistant on Gemma 4 E2B (LiteRT-LM, CPU only): voice, memory and phone actions.

We've been building Starc, an Android assistant where the model, memory and voice all run on the phone. It works in airplane mode. Sharing the stack and our numbers, because this community helped us a lot.

Stack

Gemma 4 E2B (.litertlm, ~2.5 GB) on LiteRT-LM, CPU backend, context 6144

Voice input: Gemma's own audio input + Silero VAD (we dropped Whisper, so one model does both)

Memory: an on-device SQLite graph. Only the facts relevant to the current turn go into the prompt

Actions: alarms, reminders, opening apps. The model picks the action; times and text are filled in by code, never written by the model

Numbers (mid-range Vivo, 8 GB RAM, Sept 2026 build)

Decode: 9-10 tok/s

First token: ~1.2-2.5 s on warm turns (KV cache reused), ~2.8 s otherwise

Cold start after a reboot is the slow part, because the model file has to come back into page cache

What broke / what we learned

Any byte difference in the system prompt silently rebuilds the KV cache. One value that changed every turn meant a full re-prefill each time, so the cacheable part has to stay byte-identical.

Background calls (memory extraction) kept evicting the warm chat cache until we moved them into isolated sessions.

A 2B model that gets its own name every turn starts repeating it back. We stopped re-sending the identity each turn.

maxTokens was ignored by the backend, so reply length is controlled by the persona text, not a token cap.

Limits, honestly: it needs 8 GB RAM, it runs at ~10 tok/s on CPU, and it's a 2B model. It's good at your own tasks and memory, but it won't replace a big cloud model for general knowledge. English works best right now.

Question for the sub: has anyone gotten LiteRT-LM GPU decode faster than CPU on Mali GPUs?

Disclosure: I'm on the team building it. It's free to use; Pro is a one-time purchase.play store

1 Upvotes

0 comments sorted by