PrismML · Research Deep Dive

PrismML squeezes a 27B model into your iPhone without gutting its smarts

It compresses an ~54GB 27B model down to about 3.9–5.9GB — runnable locally on a phone, while keeping roughly 90% of the average benchmark score. Here's the big picture first, then the technical details and the caveats.

July 15, 2026 · ~12 min read · Cross-checked across the launch page, whitepaper, and official demo repo

PrismML just shipped Bonsai 27B. The headline: a model that used to need a beefy workstation or the cloud now fits inside your iPhone — and it barely loses a step in raw intelligence.

3.9GB1-bit phone model size (language weights)
≈90% / 95%Avg score vs. original (phone / desktop, 15 custom benchmarks)
~11 tok/sSustained generation on iPhone 17 Pro Max
01The gist

Three minutes to the core idea

Why this is a new bar

Previously, a mid-to-large model like 27B (27 billion parameters) needed about 54GB in its original form. Even with common 4-bit compression, you're still looking at ~18GB — far too big to fit or run on a phone.

Bonsai 27B uses extreme low-bit compression (1-bit and ternary) to shrink the language weights down to roughly 3.9GB–5.9GB (the actual ternary deployment package is about 7.2GB). You can run it locally, offline, on a phone or a regular laptop. On the desktop, it hits peak speeds around 163 tok/s on an RTX 5090, and roughly 66–87 tok/s on Apple's M5 Max.

Did it get dumber?

Heavier compression usually means a noticeably dumber model. In their tests, they ran 15 benchmarks in the high-effort thinking mode and compared against the original:

≈95%
Avg score, ternary version (desktop-leaning)
≈90%
Avg score, 1-bit version (phone-leaning)

Math and coding hold up best. Tool calling and vision take a bigger hit — more on that later. This isn't a toy that only chats; on this benchmark suite, it still performs like a production-ready model.

Two versions — don't mix them up
  • 1-bit phone version · ~3.9GB · Fits within a flagship iPhone's app budget; keeps about 90% of the avg score
  • Ternary desktop version · Ideal 5.9GB / actual ~7.2GB · Better for laptops; keeps ~95% avg score
  • License · Apache 2.0 — weights and demo are public
Keep these three points in mind

Below, we break down the tech: which model it's based on, why regular compression falls apart, what actually fits in phone memory, and how to read the speed/demo claims. "Runs on a phone" doesn't mean you can switch on 262K long-context, vision, and long-running agent tasks all at once.

02The base model

Qwen3.6-27B is the base; Bonsai maps the whole network into extreme low-bit

The base is Alibaba Qwen's Qwen3.6-27B: roughly 27B parameters, hybrid attention (75% linear attention layers, 25% full attention), with native support for very long contexts. PrismML didn't train a bespoke 27B from scratch. Instead, they mapped this pre-trained network onto binary or ternary weights and wrote custom kernels to run those weights directly.

Entire language-side pipeline runs low-bit Embeddings Attention MLP Output head Vision tower, separateHQQ 4-bit · optional Common practice: a "2-bit" model often only compresses part of the tensors, leaving sensitive layers at 4–8 bit. Bonsai's language matrix side has no such high-bit escape hatches, so the size numbers match the name.
Contrast with typical low-bit packaging: a model might say "2-bit" but actually average 2.8 bit. Source: Whitepaper, Chapter 3.
Ternary · quality-first
−10+1

One shared scale factor per 128 weights. Theoretically ~1.71 bit/weight, ideal size 5.9GB; the current kernel packs them in 2-bit slots, so real-world size is ~7.2GB. Avg score: 80.49 — about 94.6% of the original.

1-bit · size-first
−1+1

Only the sign bit plus group scaling, ~1.125 bit/weight, deploying at ~3.9GB. Avg score: 76.11 — about 89.5% of the original. This is the one that fits within a single phone app's budget.

The vision tower sits at ~4-bit on disk (~0.63GB) and usually isn't kept in memory during text-only sessions. The optional DSpark speculative decoding layer adds another ~1.8–2.0GB.

03Why it's hard

The real barrier to a local 27B: you have to stream the entire model for every token

When generating text locally, the device has to re-read the entire set of model weights from memory for each new token. In low-batch scenarios, memory bandwidth — not raw compute — is usually the bottleneck. A bigger model means more data shuffled per step, which hurts speed, thermals, and battery life all at once.

All weights in memory Compute core emits next tokens Cycle repeats for next token Shrinking weights from 54GB to 3.9GB cuts the bytes shuffled per step, freeing up speed and power.
The key equation for on-device inference: before you can compute fast, you have to be able to move the data fast.

FP16 Qwen3.6-27B is about 54GB. A typical "4-bit" package like Q4_K_XL actually averages ~5.2 bit/weight, landing around 17.6GB. The more aggressive IQ2_XXS is labeled "2-bit" but averages ~2.8 bit, ~9.4GB — still too heavy for most phone app budgets, and its long-chain reasoning scores collapse.

Language model deployment size comparison (smaller is more on-device friendly)
FP16 baseline
54GB
Typical "4-bit"
17.6GB
Typical "2-bit"
9.4GB
Ternary deploy
7.2GB
1-bit deploy
3.9GB
Lengths are based on deployment sizes from the whitepaper. Ternary is often quoted as 5.9GB — that's the information-theoretic ideal; the current package is about 7.17GB. iOS typically allows a single app to use roughly half of physical memory, so on a 12GB device you only have about 6GB for the model, cache, and activations combined.

This is where "what's the big deal about 27B" actually lands: it's not the parameter count that's new, it's that this capability tier has been squeezed into a size that's truly deployable on-device. Regular methods hold up above 4-bit, but below that, scores don't just degrade evenly — tool-call parsing and multi-step reasoning coherence start to shatter. Bonsai's claim is that it keeps these behaviors largely intact even in the sub-2-bit zone.

04How it works

It compresses weights, but the KV cache determines whether long contexts fit

One 27B network, split into four pieces — then ask "can it fit on a phone?" Only language weights must stay resident; the rest are optional Lang. weights 3.9 / 7.2 GB Must stay KV cache grows w/ context compressible to 4-bit Vision tower ≈0.63 GB optional, on-demand DSpark ≈1.8–2.0GB optional speed-up What actually passes on a phone is the dark green block on the left: 1-bit language weights at ~3.9GB, with some room left in the ~6GB single-app budget. Pile on 262K full context + vision + draft layer, and peak usage will quickly blow through that 6GB.
How to read this: don't take "3.9GB model file" to mean "my phone can run every feature at once." Source: Whitepaper, Chapter 4 component breakdown.

Qwen3.6-27B's hybrid attention helps a lot: only 16 of the 64 layers have full attention caches that grow with sequence length. An FP16 cache costs about 0.064GB per 1K tokens — already roughly 4× cheaper than a full-attention 27B. Still, an FP16 cache at 262K context is about 17.2GB, which is larger than the 1-bit weights themselves.

1-bit GGUF peak memory vs. context length Weights + activations + cache + runtime overhead; excludes vision tower & draft layer 5.2 4K · FP16 cache 5.6 10K · FP16 11.6 100K · FP16 6.8 100K · 4-bit cache ≈6GB iOS single-app line
Units in GB. An uncompressed 4K cache sits around 5.2GB and might still fit; at 100K with FP16 cache you're looking at ~11.6GB. Turning on 4-bit cache brings 100K down to ~6.8GB and full 262K to ~9.4GB — both past the whitepaper's assumed ~6GB phone budget. Source: Whitepaper, Table 7 and text.

Bonsai weights are quite "tolerant" of a 4-bit KV cache. Measured by forward-KL divergence from the output distribution: with the same 4-bit cache enabled, Bonsai's deviation from its own FP16-cache baseline is about an order of magnitude smaller than for FP16 or typical 4-bit weights. Compressing the weights and compressing the cache work together on this path, not against each other. The repo still flags 4-bit KV as experimental: it saves memory, decoding gets a bit slower, and you should calibrate it against your actual workload.

05Scores

Average holds at ~90%; losses concentrate in instruction-following, tools, and vision

Benchmarks were run in thinking mode, 15 tests total, covering knowledge, math, coding, instruction following, tool calling, and vision. FP16 baseline averages 85.07; ternary gets 80.49; 1-bit scores 76.11. The most striking contrast isn't how much Bonsai drops — it's how badly typical aggressive quantization collapses: IQ2_XXS falls from 93.33 to 57.5 on AIME26 and from 87.77 to 56.4 on LiveCodeBench. On the same tasks, 1-bit Bonsai still scores above 87 on AIME and 76.4 on LiveCodeBench.

On long-chain reasoning, typical "2-bit" collapses; Bonsai holds Left: AIME26 · Right: LiveCodeBench (thinking mode) AIME26 FP16 93.3 IQ2 57.5 1-bit 87.1 LiveCodeBench 87.8 56.4 76.4 Short tasks (e.g., MMLU) still look fine with typical 2-bit; long-chain reasoning exposes the collapse. Source: Whitepaper Appendix C.
This is the difference between "acceptable average, but core abilities are shattered" and "slightly lower average, core abilities intact."
Ability categoryFP16Ternary1-bit1-bit delta
Math95.3393.4091.66−3.67
Coding88.7485.9681.88−6.86
Knowledge & reasoning83.1576.9673.39−9.76
Instruction following78.4771.7765.74−12.73
Tool calling80.0074.0166.03−13.97
Vision72.6165.1959.57−13.04
Overall avg (15 tests)85.0780.4976.11−8.96

That's the split between the two versions: ternary is for laptops with enough RAM, aiming to stay close to the original 27B feel; 1-bit solves "it fits" first. Don't read "90% average" as "90% agent capability." A few points off on tool calling is plausible for ternary; for 1-bit, the tool category is nearly 14 points behind.

Bonsai 27B vs. other models in intelligence density per GB
"Intelligence per GB" measures size efficiency: 1-bit hits ~0.53/GB, roughly 10× FP16 and about 2.7× the densest typical low-bit package. This metric is custom to PrismML, dividing raw scores by size, which strongly rewards smaller models. It's useful for deployment efficiency, not a substitute for absolute capability scores.

Where to discount the eval

They used EvalScope, vLLM, and H100, and published token budget and scoring methodology for each test — far more complete than a press release with only a radar chart. But no third-party replication exists yet. Most runs are single-shot; Bonsai used sampling temperature 0.7 while Qwen baselines and typical quantization used 1.0, so generation settings aren't fully consistent. The overall average is a simple mean of 15 tests, with math making up 4 of them — Bonsai happens to retain math best, so the "95% / 90%" figures look better than a tool-heavy or instruction-heavy real-world load would be. For agent work, look at BFCL v3, τ²-Bench, IFEval, and IFBench rather than the overall average.

06Speed

Speed has two layers: low-bit data movement, and draft acceleration on CUDA

Low-bit weights directly reduce the bytes shuffled each step, so token generation benefits the most. Speeds are reported uniformly at tg128 (~128 tokens generated) and pp512 (512 input tokens processed), batch size 1, without draft layer and vision tower.

RTX 5090 · 1-bit
≈163 tok/s
H100 · 1-bit
104.8
M5 Max · 1-bit
66.4
M5 Pro · ternary
26.2
iPhone 17 Pro Max
11.0
The point of the phone number isn't "faster than a GPU" — it's that this model class previously couldn't run at all. RTX 5090 peak differs slightly from the standardized tg128 metric in Table 8; the labels here reflect the device's actual test configuration.

DSpark speculative decoding: a small draft model guesses a few tokens (depth k=4), then the target model validates them in one pass. Validation is lossless — the output distribution matches running the target model alone. On H100, ternary goes from 98.0 to 131.8 tok/s (~1.34×), and 1-bit from 104.8 to 143.8 (~1.37×). On Apple Silicon, with single-request workloads, multi-token validation can't amortize its cost, so it's off by default; the project itself labels it highly experimental.

On energy: 1-bit on M5 Pro draws about 0.275 mWh/token — an order of magnitude lower than the 0.63–1.32 mWh/token range across six data-center GPUs. On iPhone 17 Pro Max, it generates roughly 672 tokens per 1% battery, sustaining ~10.8 tok/s, and after ~5.2 minutes (~3,360 tokens) battery drops from 100% to 95% with mild thermal throttling. Treat these as ballpark figures; specific devices will vary.

Demo 1: Ternary Bonsai 27B running a Hermes agent workflow on an RTX 5090. This validates the GPU path, not the phone path.
Demo 2: The ternary version handles tool calling and MCP integration on M5 Max — that's the laptop-class config.
Demo 3: The 1-bit version handles a multimodal task on an iPhone 17 Pro Max. This demo uses a cached, pre-filled image context, so it doesn't independently prove full on-device vision preprocessing speed.
07What it's good for

What to try first — and what not to assume

Good first tries

Privacy-sensitive local Q&A and document work; offline assistant; offloading repetitive, non-critical agent steps from the cloud to local; hosting a 27B on a single consumer GPU; long-document work with the ternary version on a laptop.

Don't assume

Full 262K context on a phone; keeping the vision tower resident; enabling DSpark by default; long multi-file agentic coding; treating the 15-task average as a guarantee of production reliability.

08Install & usage

Desktop is easiest; mobile is still a developer path

Want to try it now? The desktop demo is the smoothest route. It does run on phones, but there's no "App Store one-click install" app yet — you'd need to integrate the 1-bit weights with Apple's MLX / Swift kernels yourself, or wait for a future app wrapper.

On desktop (Mac / Linux / Windows) · Recommended

Official all-in-one repo: PrismML-Eng/Bonsai-demo. Two commands spin up a local chat service (including vision and tool calling).

  • Default pulls ternary 27B: quality-first, good for laptops / desktops with enough RAM (~7GB language package)
  • To match the phone's footprint: switch to the 1-bit family with BONSAI_FAMILY=bonsai
  • If 27B weights are still private: set your Hugging Face read token to BONSAI_TOKEN
  • Once up: open http://localhost:8080 in your browser; Mac users can also use the MLX script run_mlx.sh
  • Windows: use setup.ps1 / run_llama.ps1 from the same repo
Quick Start · 5-minute desktop path
  1. Install git, ensure ~15GB+ free disk (weights + runtime)
  2. Clone and enter the repo (see copy-paste block below)
  3. Run ./setup.sh (downloads models, precompiled binaries; on Mac also handles MLX)
  4. Run ./scripts/start_llama_server.sh, open localhost:8080 in browser
  5. For 1-bit: set BONSAI_FAMILY=bonsai before setup/start
Copy-paste · macOS / Linux (official demo)
git clone https://github.com/PrismML-Eng/Bonsai-demo.git
cd Bonsai-demo

# Default: ternary 27B (better for laptops)
export BONSAI_MODEL=27B
# Only if the 27B repo is still private — add your HF read token
export BONSAI_TOKEN="hf_your_token_here"
./setup.sh
./scripts/start_llama_server.sh
# Open http://localhost:8080 in your browser

# To switch to the 1-bit phone-class family:
# BONSAI_FAMILY=bonsai BONSAI_MODEL=27B ./setup.sh
On mobile (currently: devs / integration, not store one-click)

On iPhone 17 Pro Max, 1-bit fits in ~3.9GB of language weights and generates around 11 tokens per second. Apple devices use MLX (Python / Swift).

  • Weights: 1-bit MLX package on Hugging Face, e.g., prism-ml/Bonsai-27B-mlx-1bit (~4GB scale, includes packaging overhead)
  • Kernels: officially maintained mlx-swift branch (iOS / macOS low-bit kernels); only the language side runs true 1-bit
  • Reality check: flagship phone memory budgets are tight (~half of physical RAM for the app); you need Xcode / Swift integration skills — this isn't a drag-and-drop installer for casual users
  • Don't force the ternary version on a phone: ~7.2GB deployment will blow past typical iOS single-app budgets
  • Android: this release focuses on Apple MLX and NVIDIA CUDA; there's no equivalent one-click Play Store path. If you're a developer, you can port via GGUF / llama.cpp yourself, but there's no official plug-and-play package.
Don't want to install locally? Try the cloud

The launch page offers a limited-time free developer preview API, so you can test its capabilities without downloading the 27B locally. The local weights and demo remain the main Apache 2.0 open-source path: see the Bonsai 27B Collection.

Checklist before installing

Data and demos above come from launch materials and the technical whitepaper. Independent replication and mid-range phone viability are still open questions. The 27B weights have pushed the local deployment bar down to ~4GB for the first time; long-context, multimodal residency, and agent reliability still need real-world testing per scenario.

What to take away: three key value points, a size/capability comparison, one-command desktop startup, and a clear mobile/desktop install split.

Primary sources

PrismML launch page: Announcing Bonsai 27B

Technical whitepaper: Bonsai 27B Whitepaper

Runtime & limitations: Bonsai Demo Repository

Model weights: Bonsai 27B Collection