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.
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.
Three minutes to the core
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.
Harder compression usually makes models dumber. Under "high-intensity thinking mode," 15 benchmarks were compared to the 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.
- 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
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.
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.
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.
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.
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.
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.
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.
You compress weights; long context is gated by cache
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.
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.
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.
| Capability | FP16 | Ternary | 1-bit | 1-bit gap |
|---|---|---|---|---|
| Math | 95.33 | 93.40 | 91.66 | −3.67 |
| Coding | 88.74 | 85.96 | 81.88 | −6.86 |
| Knowledge & reasoning | 83.15 | 76.96 | 73.39 | −9.76 |
| Instruction following | 78.47 | 71.77 | 65.74 | −12.73 |
| Tool use | 80.00 | 74.01 | 66.03 | −13.97 |
| Vision | 72.61 | 65.19 | 59.57 | −13.04 |
| Overall avg (15 tasks) | 85.07 | 80.49 | 76.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.
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.
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.
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.
Worth trying first—and what not to assume
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.
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.
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.
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:8080in a browser; on Mac you can also use the MLX scriptrun_mlx.sh - Windows: same repo with
setup.ps1/run_llama.ps1
- Install git; leave ~15GB+ free (weights + runtime)
- Clone and enter the repo (commands in the copy block below)
- Run
./setup.sh(downloads model, prebuilds binaries; Mac also handles MLX) - Run
./scripts/start_llama_server.sh, open localhost:8080 in a browser - For 1-bit: set
BONSAI_FAMILY=bonsaithen setup / start again
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
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
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.
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.
Primary sources
PrismML launch page: Announcing Bonsai 27B
Technical whitepaper: Bonsai 27B Whitepaper
Runtime & limits: Bonsai Demo Repository
Model weights: Bonsai 27B Collection