<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Anvil Dev Notes]]></title><description><![CDATA[Anvil Dev Notes]]></description><link>https://anvildevnotes.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Anvil Dev Notes</title><link>https://anvildevnotes.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 15:35:41 GMT</lastBuildDate><atom:link href="https://anvildevnotes.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Fitting a chat model and an image model on one iPhone]]></title><description><![CDATA[I wanted an AI assistant I could use without my conversations living on someone else's server, and one that kept working on a plane. So I built one for the iPhone. Here's what it took to get a chat mo]]></description><link>https://anvildevnotes.hashnode.dev/fitting-a-chat-model-and-an-image-model-on-one-iphone</link><guid isPermaLink="true">https://anvildevnotes.hashnode.dev/fitting-a-chat-model-and-an-image-model-on-one-iphone</guid><category><![CDATA[iOS]]></category><category><![CDATA[Swift]]></category><category><![CDATA[AI]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[privacy]]></category><dc:creator><![CDATA[Nathan Cheng]]></dc:creator><pubDate>Fri, 09 Oct 2026 21:26:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac95b81e0afdf22f3be16d4/00bfe5f3-bf4e-462a-82f3-e0313839a01e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I wanted an AI assistant I could use without my conversations living on someone else's server, and one that kept working on a plane. So I built one for the iPhone. Here's what it took to get a chat model and an image model living in the same app.</p>
<h2>The chat model</h2>
<p>Anvil runs Gemma 4 E2B through LiteRT LM. The same model handles questions about photos and documents. That turned out to be one of the most useful features: point the camera at a sign or a menu in another language and ask what it says, with no signal at all.</p>
<h2>The image model</h2>
<p>Anvil Dream uses an SDXL Lightning model converted to Core ML with Apple's ml stable diffusion tools, running on the Neural Engine. Lightning only needs a few steps, so it makes 1024x1024 images right on the phone, as many as you want, even in airplane mode.</p>
<h2>Making them share memory</h2>
<p>An iPhone doesn't have room for both models at once, so they are never loaded at the same time. The app unloads one before loading the other. It's a simple rule, and it's the reason everything fits. It's also why Anvil requires an iPhone 15 Pro or newer.</p>
<h2>Keeping the app small</h2>
<p>The models aren't bundled. They download inside the app over WiFi after install, so the app itself stays small and people choose when to spend the storage.</p>
<h2>What stays on the phone</h2>
<p>Chat, voice, notes, tasks, photo questions and image generation all run locally. There's no account. Web search and iCloud backup are optional and are the only parts that go online.</p>
<h2>The honest tradeoffs</h2>
<p>The models are a download of several GB, and a model small enough for a phone has real limits next to the giant cloud models. For a lot of everyday things, though, having it private and always available wins.</p>
<h2>Try it</h2>
<p>Version 4.1 is on public TestFlight, and beta testers get Anvil Pro free: <a href="https://testflight.apple.com/join/s8UAwXBm">https://testflight.apple.com/join/s8UAwXBm</a></p>
<p>If you've shipped other models on iOS, I'd love to hear what worked for you in the comments.</p>
]]></content:encoded></item></channel></rss>