PrismML · Research Brief

PrismML Stuffs a 27B Model into Your iPhone — With Barely Any IQ Drop

It squeezes a ~54GB 27B model down to about 3.9–5.9GB: it runs on-device, and average scores still hold about nine-tenths. Core value first; technical detail and the fine print come later.

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

PrismML shipped Bonsai 27B. The headline trick: take a "giant" model that used to need the cloud or a top-end machine, shrink it until it fits on your iPhone, and barely blunt its IQ.

3.9GB1-bit phone build size (language weights)
≈90% / 95%Phone / desktop avg. score vs original (15-task suite)
~11 tok/sSustained generation on iPhone 17 Pro Max
01Get the idea

Three minutes to the core

Why this is a new bar

Until now, mid-to-large models like 27B (27 billion parameters) sat at about 54GB in full form. Even a common 4-bit pack still lands near 18GB—too big and too heavy for a phone.

Bonsai 27B uses extreme low-bit compression (1-bit and ternary) to push language weights to about 3.9GB–5.9GB (ternary real deploy pack ~7.2GB). It can run offline on a phone or ordinary laptop; on desktop (RTX 5090) official peak is about 163 tok/s, and Apple M5 Max is roughly 66–87 tok/s class.

Shrunk hard—still smart?

Harder compression usually makes models dumber. Under "high-intensity thinking mode," 15 benchmarks were compared to the original:

≈95%
Ternary (desktop-leaning) avg. vs original
≈90%
1-bit (phone-leaning) avg. vs original

Math and coding hold up best. Tool use and vision drop more—we break that down later. This is not a chat-only toy; at least on this suite, it still looks like a productivity model that can work.

Two builds—don't mash them into one "phone bundle"
  • 1-bit phone build · ~3.9GB · Flagship iPhone budget can fit language weights; ~90% average score
  • Ternary desktop build · Ideal 5.9GB / real deploy ~7.2GB · Better for laptops; ~95% average
  • License · Apache 2.0; weights and demo are public
Those three cards are enough to orient you

Only after this do we unpack the tech: base model, why ordinary compression collapses, what actually sits in phone memory, and how to read speed and demos. The slogan "it runs on a phone" is not the same as 262K long context, vision, and long-running agents all maxed out at once.

02What's the base

Base is still Qwen3.6-27B; Bonsai packs the whole net into extreme bits

The base is Alibaba Qwen team's Qwen3.6-27B: about 27B parameters, hybrid attention, roughly 75% linear-attention layers and 25% full attention, with native long-context support. PrismML did not train a brand-new 27B from scratch; it mapped this already-trained net to binary or ternary weights, then shipped custom kernels that actually run those weights.

Language-side full stack stays low-bit Embed Attention MLP Out head Vision tower aloneHQQ 4-bit · optional Whitepaper note: marketing "2-bit" often only compresses some tensors; sensitive layers stay at 4–8 bit. Bonsai's language-matrix side has no high-bit escape hatch—so size numbers match the name.
Vs common low-bit packaging: the name says 2-bit; real average often hits 2.8 bit. Source: whitepaper ch. 3.
Ternary · quality-leaning
−10+1

One shared scale per 128 weights. Theory ~1.71 bit/weight; ideal size 5.9GB; current kernels pack into 2-bit slots, real ~7.2GB. 15-task average 80.49, about 94.6% of original.

1-bit · size-leaning
−1+1

Sign bit plus group scale only, ~1.125 bit/weight, deploy ~3.9GB. Average 76.11, about 89.5% of original. This is the tier that fits a phone single-app budget.

Vision tower is separate ~4-bit, ~0.63GB on disk; usually not resident for pure text. Optional DSpark draft-accel layer adds roughly another 1.8–2.0GB.

03Why it's hard

What blocks local 27B first: "every generated token reloads the whole body"

In local token-by-token generation, the device almost has to stream the full model weights from memory again for every new slice of text. In small-batch settings, the bottleneck is usually memory bandwidth, not peak FLOPs. Bigger model → more data moved per step → speed, heat, and battery all suffer together.

Full weights in memory Compute core Emit next slice Stream again Next token Weights from 54GB down to 3.9GB cut bytes moved per step—then speed and power get headroom.
On-device inference's first bill: before you can compute, you must be able to move the data.

The numbers are blunt: FP16 Qwen3.6-27B is ~54GB. A common "4-bit" pack Q4_K_XL averages ~5.2 bit/weight in reality, ~17.6GB. More aggressive IQ2_XXS is labeled "2-bit" but is really ~2.8 bit, ~9.4GB—still too heavy for most phone single-app budgets, and long-chain reasoning scores collapse hard.

Language-model deploy size (smaller = easier on-device)
FP16 baseline
54GB
Common "4-bit"
17.6GB
Common "2-bit"
9.4GB
Ternary pack
7.2GB
1-bit pack
3.9GB
Bar lengths follow whitepaper deploy sizes. Ternary is often written 5.9GB—that is the information-theoretic ideal; current packing is ~7.17GB. iOS grants a single app roughly half of physical RAM; a 12GB device leaves about ~6GB for model, cache, and activations together.

That is the real point of "what's so special about 27B": not that the parameter count is novel, but that this capability tier was first squeezed inside the physical envelope of on-device deploy. Ordinary methods still hold scores above 4-bit; further down, the drop is often not uniform—tool-call parsing and multi-step coherence start to shatter. Bonsai's claim: in the sub-2-bit zone it still keeps a slice of those behaviors.

04Mechanism

You compress weights; long context is gated by cache

One 27B net, four blocks—then ask "phone-ready?" Only language weights must stay resident; the rest are optional Lang weights 3.9 / 7.2 GB Must resident KV cache Grows w/ ctx 4-bit capable Vision tower ≈0.63 GB Optional, load on use DSpark ≈1.8–2.0GB Optional accel What phones truly clear is the deep-green block: 1-bit language weights ~3.9GB, with headroom inside a ~6GB single-app budget. Stack full 262K context + vision + draft layer and peak memory will eat that 6GB fast.
Read: do not treat "model file 3.9GB" as "phone can run every capability maxed at once." Source: whitepaper ch. 4 component split.

Qwen3.6-27B's hybrid attention helps a lot: of 64 layers, only 16 full-attention layers grow cache with length; FP16 cache is about ~64KB/step, roughly 4× cheaper than a full-attention 27B. Even so, 262K-context FP16 cache is still ~17.2GB—larger than the 1-bit weights themselves.

How 1-bit GGUF peak memory grows with context Weights + activations + cache + runtime overhead; excludes vision tower and 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 GB. 4K uncompressed cache ~5.2GB may still fit; 100K with FP16 cache hits ~11.6GB; with 4-bit cache, 100K is ~6.8GB and full 262K ~9.4GB. The last two already cross the whitepaper's assumed ~6GB phone budget. Source: whitepaper Table 7 and text estimates.

Bonsai weights themselves are quite "tolerant" of 4-bit KV cache. Measured with output-distribution forward-KL: with the same 4-bit cache on, Bonsai's deviation from its own FP16-cache baseline is about an order of magnitude lower than FP16 / common 4-bit weights. In other words, compressed weights and compressed cache pull the same direction on this path—they do not sabotage each other. Project docs still mark 4-bit KV as experimental: mainly memory savings, slightly slower decode; calibrate on real workloads.

05Scores

Average holds ~90%; losses land on instruction, tools, and vision

Evals ran in thinking mode across 15 tasks covering knowledge, math, coding, instruction following, tool use, and vision. FP16 baseline average 85.07; ternary 80.49; 1-bit 76.11. The stark contrast is not how many points Bonsai lost, but how ordinary aggressive quant collapses: IQ2_XXS drops AIME26 from 93.33 to 57.5 and LiveCodeBench from 87.77 to 56.4; on the same suite, 1-bit Bonsai stays above 87 on AIME and 76.4 on LiveCodeBench.

On long-chain tasks, common "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 On short tasks (e.g. MMLU) common 2-bit still looks fine; long-chain tasks expose the crash. Source: whitepaper Appendix C.
The gap between "average OK, critical ability already shattered" and "average a bit lower, critical ability still there."
CapabilityFP16Ternary1-bit1-bit gap
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 use80.0074.0166.03−13.97
Vision72.6165.1959.57−13.04
Overall avg (15 tasks)85.0780.4976.11−8.96

Positioning is therefore clear: ternary fits memory-rich laptops when you want close to stock 27B feel; 1-bit first solves "it fits"—do not read "~90% average" as "~90% agent ability." The site says tool use is only a few points below full precision; that roughly holds for ternary; for 1-bit, tool-category average gap is near 14 points.

Bonsai 27B intelligence density per GB vs other models
Official "intelligence density per GB" stresses volume efficiency: 1-bit ~0.53/GB, over 10× FP16 and ~2.7× the densest common low-bit pack. This metric is PrismML-defined; the denominator is raw size, so it heavily rewards smaller models. Good for deploy efficiency, not a substitute for absolute capability scores. Source: PrismML launch page.

Where the eval framing needs a discount

EvalScope, vLLM, H100, per-task generation length budgets, and scoring methods are documented—more complete than a radar-chart-only press kit. Third-party reproduction is not yet public. Most items ran once; Bonsai sampling temperature 0.7 vs Qwen baseline and common quants at 1.0—generation settings are not fully aligned. Overall average is a simple mean of 15 tasks; math is 4 of them, and Bonsai happens to retain best on math, so "95% / 90%" looks better than real product loads that lean tool- or instruction-heavy. People building agents should prioritize BFCL v3, τ²-Bench, IFEval, IFBench over the overall average alone.

06Speed

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

Low-bit weights directly cut bytes moved each step, so token-by-token generation benefits most. Speed is reported uniformly as tg128 (~128 generation units) and pp512 (process 512 input units), batch size 1, excluding 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
Phone numbers are not "faster than a GPU"—they mean this capability tier used to be unrunnable. Launch-page peak (RTX 5090) and whitepaper Table 8 (standardized tg128) use slightly different methods; when mixed above, trust the device label.

DSpark speculative decoding: a small draft model guesses a segment first (depth k=4); the target verifies in one pass. Verification is lossless—output distribution matches target-only. On H100, ternary rises from 98.0 to 131.8 tok/s (~1.34×); 1-bit from 104.8 to 143.8 (~1.37×). On Apple Silicon single-request paths, multi-row verification does not amortize cost, so it is off by default; the project also marks it highly experimental.

Energy: on M5 Pro, 1-bit is ~0.275 mWh/token, an order of magnitude under six data-center GPUs at 0.63–1.32 mWh/token. On iPhone 17 Pro Max, about 672 tokens per 1% battery, sustained ~10.8 tok/s; after ~5.2 minutes and ~3360 tokens, battery goes 100%→95% with mild thermal throttle. Vendor self-tests, but the order of magnitude is useful.

Demo 1: ternary Bonsai 27B runs a Hermes agent flow on RTX 5090. This proves the GPU path, not the phone path.
Demo 2: ternary build does tool calling and MCP integration on M5 Max—laptop-class hardware.
Demo 3: 1-bit build handles multimodal tasks on iPhone 17 Pro Max. The source page notes the demo used cached, prefilled image context—so it alone does not prove full on-phone vision preprocessing speed.
07What you can do

Worth trying first—and what not to assume

Worth trying first

Privacy-sensitive local Q&A and docs; offline assistants; shifting repetitive, non-hardest agent steps off the cloud; hosting 27B on a single consumer GPU; ternary on a laptop for long documents.

Don't assume yet

Maxing 262K on a phone; vision tower always resident; DSpark on by default; long multi-file agent coding (official next item); treating this 15-task average as production reliability.

08Install & use

Desktop is easiest; phone is still a developer path

Bottom line: if you want to touch it now, install the official desktop demo first. On phone, official work proves it runs, but there is no App Store one-tap finished app yet—you integrate 1-bit weights + Apple-side MLX / Swift kernels yourself, or wait for an official/third-party wrapper.

On desktop (Mac / Linux / Windows) · most recommended

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

  • Default pulls ternary 27B: quality-leaning; for memory-rich laptops/desktops (~7GB-class language pack)
  • Want phone-class size: switch to 1-bit family BONSAI_FAMILY=bonsai
  • If 27B weights are still private: set a Hugging Face read token to BONSAI_TOKEN
  • Once up: open http://localhost:8080 in a browser; on Mac you can also use the MLX script run_mlx.sh
  • Windows: same repo with setup.ps1 / run_llama.ps1
Quick card · desktop 5-minute path
  1. Install git; leave ~15GB+ free (weights + runtime)
  2. Clone and enter the repo (commands in the copy block below)
  3. Run ./setup.sh (downloads model, prebuilds binaries; Mac also handles MLX)
  4. Run ./scripts/start_llama_server.sh, open localhost:8080 in a browser
  5. For 1-bit: set BONSAI_FAMILY=bonsai then setup / start again
Copy-ready · macOS / Linux (official demo)
git clone https://github.com/PrismML-Eng/Bonsai-demo.git
cd Bonsai-demo

# 默认:三元 27B(笔记本更合适)
export BONSAI_MODEL=27B
# 若 27B 仓库仍私有,填你的 HF 读 token
export BONSAI_TOKEN="hf_your_token_here"
./setup.sh
./scripts/start_llama_server.sh
# 浏览器打开 http://localhost:8080

# 改成 1-bit 手机同款家族:
# BONSAI_FAMILY=bonsai BONSAI_MODEL=27B ./setup.sh
On phone (today: developer / integrate—not store one-tap)

Officially measured on iPhone 17 Pro Max: 1-bit ~3.9GB language weights, about 11 tok/s. Platform coverage: Apple devices via MLX (Python / Swift).

  • Weights: 1-bit MLX pack on Hugging Face, e.g. prism-ml/Bonsai-27B-mlx-1bit (~4GB class with pack overhead)
  • Kernels: official mlx-swift branch (iOS / macOS low-bit kernels); language side can truly run 1-bit
  • Real barrier: flagship memory budgets are tight (~half physical RAM per app); you need Xcode / Swift integration—not a pure-novice "download the package" flow
  • Don't force ternary onto phones: deploy ~7.2GB blows common iOS single-app budgets
  • Android: this release prioritizes Apple MLX + NVIDIA CUDA; no equal "one-tap Play Store" path. Capable developers can port via GGUF / llama.cpp; no official foolproof pack
Don't want local install? Try cloud first

The launch page offers a time-limited free developer preview API—feel the capability without downloading 27B. Local weights and demo remain the Apache 2.0 open main path: weight collection at Bonsai 27B Collection.

Check these before install

Numbers and demos come from the launch materials and technical whitepaper; third-party reproduction and mid-range phone fitness still need your own checks. 27B weights first push local deploy near ~4GB; long context, multimodal residency, and agent reliability still need scenario-level testing.

What to take away: three value cards, size/capability contrast, one-shot desktop start commands, and the phone vs desktop install split.

Primary sources

PrismML launch page: Announcing Bonsai 27B

Technical whitepaper: Bonsai 27B Whitepaper

Runtime & limits: Bonsai Demo Repository

Model weights: Bonsai 27B Collection