Running a 27B Model on iPhone: How 1-bit Quantization Achieves Extreme Compression

PrismML's Bonsai runs a 27B model on iPhone via 1-bit quantization, shrinking it from 54GB to 3.9GB.
PrismML's Bonsai technology compresses Qwen 3's 27B model from 54GB to just 3.9GB using 1-bit quantization-aware training, knowledge distillation, and speculative decoding — enabling ~11 tokens/sec on an iPhone 17 Pro while retaining ~90% of the original model's quality.
When a 27B Model Actually Fits in Your Phone
Running a model with 27 billion parameters typically means tens of gigabytes of VRAM and a high-end GPU. But PrismML's latest work completely upends that assumption — they've got a 27B parameter model running smoothly on an iPhone 17 Pro at roughly 11 tokens/second, while retaining the vast majority of its capabilities even after extreme compression.
The technology is called Bonsai, a fitting name: just as a bonsai tree is a miniaturized version of a full-grown tree that preserves its form and structure, Bonsai compresses massive models to their absolute limits while retaining their "skeleton." The numbers are staggering: from 54GB at full precision all the way down to 3.9GB.

The Math of Quantization: Why Previous Approaches Fell Short
The Precision–Memory Trade-off
To appreciate what Bonsai achieves, you first need to understand the basic logic of quantization. Floating-point precision is a foundational concept in deep learning — FP16 (half-precision float) uses 16 bits to store each value: 1 sign bit, 5 exponent bits, and 10 mantissa bits, representing roughly 65,000 distinct discrete values. FP32 (full precision) uses 32 bits, offering higher precision at the cost of double the memory. Most models are trained in FP16, which provides fine-grained numerical precision but comes with a substantial memory footprint.
Quantization is essentially the process of approximating weight values using fewer bits — 4-bit quantization can only represent 16 discrete values, 1-bit represents just 2 (0 or 1), and ternary quantization (-1/0/+1) allows only 3 possible values. This discretization inevitably introduces information loss, but in exchange delivers dramatic improvements in storage and computational efficiency. The common approach is to quantize models to 8 or 4 bits — the grid gets coarser, rounding errors creep in, but storage shrinks considerably.
Here are some key figures:
- 7B model @ FP16: ~54GB
- Down to 4-bit: ~18GB
- Ternary representation (-1/0/+1): ~5.9GB
- 1-bit Bonsai (~1.125 bits): ~3.9GB
The more aggressive the quantization, the greater the performance penalty. The 2B and 4B small models that previously ran on phones offered fairly limited intelligence; a full 27B model, even at 4-bit quantization, exceeds mobile memory limits. It's worth noting that the A-series chip in the iPhone 17 Pro uses a Unified Memory Architecture (UMA) where the CPU, GPU, and Neural Engine (ANE) share a single memory pool — fundamentally different from the separate VRAM architecture in traditional PCs. Additionally, the bottleneck for on-device inference is often memory bandwidth rather than compute: a smaller model means less data to move around per forward pass, which is why extreme compression to 3.9GB is what finally enables a smooth experience. 1-bit Bonsai is the first solution to make "running a full 27B model on a phone with a usable context window" a reality.
Compounding Errors: The Fatal Flaw of Naïve Quantization
The most straightforward approach is post-training quantization — simply rounding the weights of an already-trained model. The error on any single weight seems negligible, but it propagates, accumulates, and amplifies across dozens of network layers, ultimately sending the output completely off the rails. This is the so-called "compounding error" problem.
At 2-bit or even 1-bit precision, the grid becomes extremely coarse, and the structure the model has learned breaks down along with it. The classic symptoms of highly quantized models follow: endless repetition, garbled output, strings of exclamation marks. By this logic, a genuinely usable 1-bit model would seem to be impossible.
Bonsai Stands on the Shoulders of Open-Source Giants
This work openly acknowledges that it builds on a wealth of prior open-source contributions, integrating a range of established quantization techniques:
- llama.cpp and GGUF K-quant: Mixed-precision strategies that allocate a few extra bits to fragile layers.
- GPTQ: Introduces calibration — observing sample data during quantization to place rounding errors where they have the least impact on actual outputs.
- AWQ: Activation-aware quantization that identifies the weights that "do the most work" during inference and prioritizes protecting them.
Stacking these techniques can smoothly push the quantization curve down to 4-bit. But attempt to go to 2-bit or 1-bit, and performance collapses catastrophically.

From Post-Training Quantization to Quantization-Aware Training
The real breakthrough comes from a shift in thinking: rather than quantizing after training, let the model optimize for low-bit precision from the very start of training. This is the core idea behind Quantization-Aware Training (QAT) — the model retains a full-precision copy of its weights, but every forward pass "practices" the rounding operation, learning a weight distribution that can survive extreme compression.
BitNet validated this approach in extreme scenarios: ternary weights trained from scratch can indeed withstand the shock of quantization. Pair that with group-wise scaling to preserve dynamic range, and distill the full 27B "teacher model" into a tiny "student model."
Knowledge Distillation — the model compression paradigm introduced by Hinton et al. in 2015 — is key here. The output of a large teacher model isn't just hard labels (final answers); its probability distribution (soft labels) carries rich structural information, such as the model's confidence distribution across candidate answers. By learning from these soft labels, the student model achieves generalization far beyond what direct training alone could provide. In Bonsai's case, the full 27B model serves as the teacher, transferring its internal representations and reasoning patterns to the extremely compressed student version — one of the key mechanisms behind retaining 90% of the original capability. With all these techniques combined, roughly 90% of the large model's quality is preserved.
Technical Details and Two Deployment Variants
Bonsai is based on the full 27B version of Qwen 3, trained through large-scale data compression with a standardized end-to-end pipeline — even the top-level LM Head is quantized to 1-bit. Two variants are currently available:
- Ternary version: 1.71 bits, ~6GB, retaining approximately 97% of the base model's quality.
- 1-bit version: 3.9GB, optimized for mobile, retaining approximately 90% of quality.
Notably, the original 27B model has multimodal capabilities, and these are fully preserved after compression. It includes a 4-bit vision tower (~0.5GB) capable of processing screenshots, documents, and camera input, and supports an ultra-long context window of approximately 262,000 tokens — more than enough for the vast majority of real-world use cases.

Speculative Decoding: Near-Free Speed Gains
Bonsai also incorporates speculative decoding, using DeepSeek's DS Spark draft model approach. Speculative decoding was formally introduced by Google DeepMind in 2023 to address a core inefficiency in autoregressive language model generation: the traditional approach requires a full forward pass through the large model for every single token generated — a clear serial bottleneck. The idea behind speculative decoding is to use a lightweight "draft model" to quickly predict the next N tokens (typically 4–8), then have the main model verify this entire batch in a single parallel forward pass — if the draft is correct, the tokens are accepted directly; if an error occurs at some position, generation resumes from that point. The draft model predicts multiple tokens at once, and the main model verifies them in a single forward pass. Since parallel verification is much faster than serial generation, and the main model still guarantees the consistency of the output distribution, this achieves nearly double the speed compared to running without it, with almost no loss in output quality — because the main model still checks every token.
Is the Intelligence Actually Preserved?
After such extreme compression, how much of the model's capability actually survives? PrismML's benchmark results are relatively candid.
Compared to the original QN27B, the 1-bit Bonsai retains most of its performance on math and coding tasks and can handle information-retrieval conversational scenarios. However, tool calling shows significant degradation — meaning the 1-bit version isn't the ideal choice for running Agent-type tasks on iPhone.
Intelligence Density: A New Lens for Measuring Compression Efficiency
PrismML introduces the concept of "intelligence density" — the model capability packed into each GB of storage. The 1-bit Bonsai scores 0.53/GB, more than 10× that of the full-precision model and roughly 2.7× the best low-bit alternatives. It runs at usable speeds on everything from an iPhone to an RTX 5090.

That said, the authors are upfront: intelligence density is not the same as absolute quality.
Real-World Testing: Impressive Results and Clear Limitations
Testing at 1-bit precision on an M2 Max with 96GB of memory: when asked to "explain quantization in three bullet points," generation speed stayed consistently around 28–30 tokens/second. This is a 27B thinking model that retains reasoning capability — that speed is quite impressive. It handles chain-of-thought reasoning normally and produces well-structured output.
But when the difficulty increases — asking the model to "generate encyclopedia entries for the first 25 legendary Pokémon" — the model visibly falls into repetitive loops and fails to complete the task. This aligns with the benchmark findings: on complex tasks, the "repetition degradation" problem of 1-bit quantization starts to show.
Closing Thoughts: The Boundaries of On-Device AI Keep Moving
Bonsai isn't without flaws — its shortcomings on complex tasks and tool calling are still significant. But its importance lies in proving something: through a combination of quantization-aware training, knowledge distillation, mixed precision, and speculative decoding, models that once required a data center can fit in your pocket while retaining the vast majority of their capabilities.
For privacy-sensitive, offline-first applications, this kind of extreme compression technology is pointing toward a path worth exploring deeply. It's teams like this — willing to experiment with new architectures and techniques — that keep pushing the boundaries of local AI inference further forward.
Key Takeaways
Related articles

Disaster and Glory of the Apollo Program: The History We Must Revisit Before Returning to the Moon
From the fatal Apollo 1 fire to Apollo 8's daring lunar orbit to Apollo 11's successful landing—revisiting the disasters, fears, and compromises of the Apollo program and their lessons for today's return to the Moon.

Netflix Trust Exercise Turns Into Firing Trap: Where Are the Boundaries of Corporate Trust?
A Netflix employee was fired after sharing private info in a trust exercise. We analyze the risks of corporate trust exercises and how employees can protect themselves.

AMD CDNA5 Architecture Deep Dive: Technical Evolution and the AI Computing Competition Landscape
Deep analysis of AMD's CDNA5 architecture covering Chiplet packaging upgrades, HBM memory evolution, and low-precision compute optimization, examining how AMD challenges NVIDIA's AI chip dominance.