DEV Community

Nathan Cheng
Nathan Cheng

Posted on

I put a chat model and an image model on an iPhone, here's what I learned

Hey DEV, I'm Nathan and I've been building Anvil, a private AI assistant that runs right on the iPhone.

The chat side is Gemma 4 E2B running through LiteRT LM. The image side, Anvil Dream, is an SDXL Lightning variant converted to Core ML with Apple's ml-stable-diffusion, making 1024x1024 images on the Neural Engine. The hardest part was memory: the two models are never loaded at the same time, so the app swaps between them depending on what you're doing.

After a one time download over WiFi, chat, voice and working with your notes, tasks, photos and documents all happen on the phone. There's no account. Web search and iCloud backup are optional and kept separate from on device chat.

It's in public beta on TestFlight and beta testers get Anvil Pro free. It needs an iPhone 15 Pro or newer because of the memory.

https://testflight.apple.com/join/s8UAwXBm

I'd love feedback on speed, battery and anything confusing, and I'm happy to answer questions about the on device setup.

Top comments (0)