BlogOpen Source Models

A 27B AI Model Just Ran on a Phone. The Math Behind It Is Absurd.

PrismML compressed a 54GB model into 3.9GB and kept 90% of its intelligence. It can reason, code, call tools, and see — all on an iPhone. Here is what actually works, what does not, and why it changes the local AI economics.

Chethan·July 15, 2026·9 min read

A 27-billion-parameter AI model just ran on a phone. Not a stripped-down toy version — the real thing, with reasoning, tool calling, vision, and a 262K context window.

PrismML announced Bonsai 27B yesterday. It's based on Qwen3.6 27B, and it comes in two flavors: a 5.9 GB "ternary" build that runs on your laptop, and a 3.9 GB "1-bit" build that fits on an iPhone 17 Pro. The full-precision version of this model is 54 GB. They compressed it by a factor of 14 and kept 90% of its intelligence.

Let me explain why that's a bigger deal than it sounds.

The 54-GB Problem

Here's the math nobody talks about at AI conferences. A 27B model in 16-bit precision — the format it's trained in — occupies about 54 GB of memory. Even a solid 4-bit quantization, the kind most people use when they say "I run local models," eats 18 GB. That's more RAM than most laptops have in total.

So when someone says "27B models can run locally," what they usually mean is "27B models can run on a workstation with 64 GB of RAM and a $1,500 GPU." That's technically local. It's not exactly accessible.

Your phone has 12 GB of RAM, and only about 6 GB of that is available to any single app. No conventional quantization of a 27B model gets anywhere near that budget. The math doesn't work. You need a fundamentally different approach.

Enter 1-Bit Weights

PrismML's approach is called extreme low-bit quantization. Instead of storing each model weight as a 16-bit float (the default) or even a 4-bit integer (standard quantization), they compress weights to their absolute theoretical minimum: ternary values of {-1, 0, +1} or binary values of {-1, +1}.

The ternary version gets 1.71 effective bits per weight. The 1-bit version gets 1.125. Both use FP16 group-wise scaling to recover some precision, but the weights themselves are essentially on/off switches.

The result:

VariantSizeEffective Bits/WeightIntelligence Retained
Full precision (FP16)54 GB16.0100%
Standard 4-bit quant18 GB4.0~85%
Ternary Bonsai 27B5.9 GB1.7195%
1-bit Bonsai 27B3.9 GB1.12590%

Read that table again. The ternary version — at 5.9 GB — retains more intelligence than standard 4-bit quantization, while using less than a third of the memory. That shouldn't be possible by conventional wisdom. PrismML's training methodology apparently recovers what the compression throws away, then some.

Where It Hurts

Now the honest part. The aggregate "90% retention" number hides where the damage lands. Here's the category breakdown for the 1-bit variant:

Math: 91.7 vs. 95.3 baseline. Basically unscathed. A 27B model that still does near-frontier math from 3.9 GB is genuinely impressive.

Coding: 81.9 vs. 88.7. Noticeable but workable. This won't replace your frontier coding agent, but it'll write a script, debug a function, and explain a stack trace without breaking a sweat.

Tool calling: 66.0 vs. 80.0. This is the wound. A 17.5% drop in agentic capability matters. If you're building an agent that needs to reliably call APIs, parse responses, and chain tool calls across multiple steps, 66% accuracy means roughly one in three tool calls has some issue. That compounds fast in a multi-step loop.

Vision: 59.6 vs. 72.6. The biggest hit. The vision tower ships in 4-bit, and it shows. OCR tasks and document understanding take the brunt of the compression. If your use case is "analyze this screenshot," you'll feel this one.

So the story isn't "27B for free, no tradeoffs." It's more like: you get a model that's remarkably strong at language, math, and reasoning, decent at coding, shaky at agentic tool use, and noticeably degraded on vision. All from 3.9 GB on a device in your pocket.

What the Community Thinks

The Hacker News thread (522 upvotes, 187 comments as of this writing) is where the real analysis happened. The top comment compared Bonsai 27B to Google's Gemma 4 12B in its QAT (quantization-aware training) variant — about 7 GB, also designed for on-device use.

The verdict from commenters who actually tested both: Bonsai crushes Gemma on math and coding. It's slightly worse on knowledge and tool calling. And it's significantly worse on vision — which makes sense, because Google's models have historically been vision powerhouses, and Gemma 4 12B punches well above its weight class on multimodal tasks.

One commenter put it bluntly: "Being good at coding is of no use if you're worse at tool calling, as coding in an agentic way requires quite a bit of tool calling." Fair point. An agent that writes great code but can't reliably invoke the compiler isn't an agent — it's a autocomplete.

Another commenter noted they were "cynical about the underlying 27B dense Qwen" to begin with, preferring the 35B MoE variant which is faster and often smarter. That's a legitimate criticism — Qwen3.6 27B is a dense model, and dense models in this size range have always lived in an awkward middle ground between smaller MoEs and true frontier models.

But here's the counterargument that matters: none of those other models run on a phone. The comparison isn't "is Bonsai 27B better than a 35B MoE?" Of course it isn't. The comparison is "is Bonsai 27B better than nothing?" Because right now, nothing is what runs on your phone. And Bonsai 27B is a lot better than nothing.

The Intelligence Density Argument

PrismML introduced a metric they call "intelligence density" — benchmark performance per gigabyte of memory. By this measure, 1-bit Bonsai 27B delivers 0.53 points per GB. The full-precision baseline delivers about 0.05. That's a 10x improvement.

This is the metric that actually matters for the local AI movement. Raw intelligence determines what a model can do. Density determines where it can do it. Every improvement in density expands the set of devices, products, and environments where real AI can operate.

Think about what that means in practice. Right now, if you want a genuinely capable AI assistant, you have two options: pay $20-200/month for cloud API access (and watch your bill explode when your agent makes 50 tool calls per task), or buy a workstation with enough VRAM to run a quantized model. There's no middle ground.

Bonsai 27B creates one. A phone running a 27B-class model can handle a huge chunk of what people currently use cloud APIs for — text generation, summarization, Q&A, basic coding help, math — without sending a single byte to a server. No per-token costs. No rate limits. No privacy concerns about your data crossing the network.

The Real Prize: Hybrid Architectures

Here's where it gets interesting for anyone building AI products. PrismML explicitly calls out a "hybrid deployment" model: route easy tasks and privacy-sensitive work to the local model, reserve cloud APIs for the hard stuff.

This is the architecture that actually makes economic sense for agents. An agent running a 100-step loop doesn't need a frontier model for every step. It needs a frontier model for the 5 steps that require deep reasoning, and a competent local model for the 95 steps that are "read this file," "call this API," "parse this response," "format this output."

If your local model handles those 95 steps at zero marginal cost, your API bill drops by 95%. Your latency drops because most steps never hit the network. And your privacy posture improves because most of the user's data — their files, their screen, their context — never leaves the device.

This is the same thesis that CopperRiver is built on. A desktop AI assistant that runs open-source models locally can browse the web, execute terminal commands, read files, and automate workflows without routing every interaction through a cloud API. The agent lives on your machine. Your data stays on your machine. The cloud is a tool you reach for when you need it, not a tollbooth you pass through for every interaction.

Bonsai 27B makes that architecture more viable by pushing the capability floor of local models higher. A year ago, "local model" meant a 7B model that was good for chat and not much else. Today it means a 27B-class model with reasoning, vision, and tool calling. Next year it might mean 70B.

The Catch(es)

Three things worth being honest about.

First, the demo on iPhone is "cached and prefilled image context." That's PrismML's own language, not mine. The phone demo is showing what the model can do, not necessarily what it does in real-time on-device with no preparation. The speeds they report — 87 tok/s for 1-bit on an M5 Max — are desktop-class hardware, not phone-class. Real-world phone performance is almost certainly slower.

Second, the agentic capability gap is real. A 17.5% drop in tool-calling accuracy on the 1-bit variant means this isn't ready to be your primary agent brain. It's a strong local layer for tasks that don't require precise tool orchestration. For complex multi-step agent workflows, you'll still want to route to a frontier model.

Third, PrismML is a small team (Caltech research origin) with a free "limited-time developer preview API." The model weights are Apache 2.0 and available on Hugging Face, which is great. But the custom low-bit kernels that make this fast are their secret sauce, and it's worth watching how sustainable that is as a business.

Why This Matters

The trajectory of AI hardware has been clear for a while: models get bigger, they need more compute, and that compute lives in data centers owned by a handful of companies. The implicit assumption is that serious AI requires serious infrastructure, and serious infrastructure requires serious money.

Projects like Bonsai 27B challenge that assumption. Not by building a better data center, but by asking a different question: what if the model itself got dramatically smaller without getting dramatically dumber?

The answer turns out to be: your phone becomes an AI device. Your laptop becomes an AI workstation. Every device you already own gets smarter without new hardware. The compute was always there — it was the model size that was the bottleneck.

And when the model fits on the device, the economics flip entirely. No API costs. No data leaving your machine. No rate limits. No vendor lock-in. No sudden price hikes when the cloud provider decides their AI division needs to show revenue.

That's not a marginal improvement. That's a different paradigm.


If you're interested in running AI agents locally — with real tool use, web browsing, file access, and task automation on your own machine — CopperRiver is a desktop AI assistant for Mac that does exactly that. It uses open-source models like GLM, DeepSeek, and Qwen. Plans start at $9/month.

#bonsai-27b#prismml#on-device-ai#quantization#local-models#open-source

Try CopperRiver yourself

A desktop AI assistant that browses, codes, and automates. Plans from $9/mo.

Read next