Running a fine-tuned reply model entirely on my phone
A quantized language model fine-tuned on my own WhatsApp history, running fully offline on my Android phone to draft replies when I'm away.
I reply to the same twenty messages every week. The interesting version of that problem isn't a cloud assistant with a chat API key — it's whether a model small enough to live on my own phone, trained on my own messages, can sound enough like me to be useful while I'm in a lab or asleep.
So the constraint I set first: nothing leaves the device. No inference API, no chat history uploaded anywhere, no network dependency at all. That single rule decides the whole architecture.
How it runs
The runtime is llama.cpp, compiled from source with the Android toolchain inside Termux, so what actually executes on the phone is a native binary — no Python, no JVM layer, no interpreter in the hot path. The model ships as a quantized GGUF file sitting in the phone's own storage and is memory-mapped at load, which is what makes a model of this size viable on consumer RAM at all.
- Build: llama.cpp compiled on-device in Termux against the NDK toolchain
- Weights: a small instruct base, quantized to GGUF so it fits in phone memory
- Adaptation: LoRA on my own exported chat history, merged into the served weights
- Interface: a local HTTP endpoint on loopback — nothing listens on the network
The data is the hard part, not the model
A WhatsApp export is not a dataset. It is interleaved threads, media placeholders, group chatter, people's phone numbers, and a decade of context the model has no way to see. Turning that into supervised pairs means deciding what counts as a prompt (the last turn? the last five?), stripping everything personally identifying about the other side of the conversation, and throwing away the enormous share of messages that are a thumbs-up or a voice note.
I also had to accept that I'm the only labeller. There's no eval set handed to me — so I'm building one by holding out real conversations and checking whether the model's draft is something I would have actually sent, not whether it scores well on a benchmark that has nothing to do with my voice.
Where it stands
The runtime half works: the compiled binary loads the quantized model and generates on-device with no network. The fine-tune is the part still in progress, and the honest answer on quality is that I don't have numbers yet — which is exactly why this is a build log and not a launch post.
What I'm not going to do
It will not send anything by itself. A model that is confidently wrong in my voice to someone who trusts it is a worse outcome than a missed message, so the ceiling for this version is a draft I approve. Autosend, if it ever happens, needs a confidence signal I don't have yet.
What's next
- Finish the LoRA run and measure tokens/sec and peak RSS on the actual phone, not an emulator
- Build the held-out conversation eval and report accept rate honestly, including when it's bad
- Compare quantization levels for where my voice starts to flatten out
- Decide whether the adapter can stay separate rather than merged, so it can be retrained cheaply
- Status
- Inference running on-device · fine-tune in progress
- Stack
- llama.cpp · GGUF · C / gcc · Termux · LoRA · Android