Navigate Select ESC Close

This 27B Model Shouldn't Run On Your Phone. It Does.

2026-07-15 Science & Technology
4.5k
197
27
Prompt Engineering
Prompt Engineering
245.0k subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Running a 27B Model on iPhone: Prism ML’s 1‑Bit Bonsai Quantization Explained I break down how Prism ML ran a 27B parameter Qwen-based model on an iPhone 17 Pro at about 11 tokens/sec by compressing it from ~54GB to 3.9GB using their 1-bit “Bonsai” approach. I explain quantization basics (16-bit to 8/4-bit, ternary, and 1-bit), why naive post-training quantization fails due to compounding error, and how prior open-source methods (llama.cpp mixed precision, GPTQ calibration-aware, AWQ activation-aware) work well down to ~4-bit but collapse at 2/1-bit. Then I cover quantization-aware training inspired by BitNet, end-to-end 1-bit/ternary variants (including the LM head), multimodal support with a 4-bit vision tower, a 262K context window, and speculative decoding (DeepSeek DGX Spark drafter) for latency. I also discuss benchmarks, intelligence density per GB, tool-calling weaknesses, and my own 1-bit tests on an M2 Max showing ~29–30 tok/s plus looping on harder tasks. LINKS: Blog: https://prismml.com/news/bonsai-27b Whitepaper: https://github.com/PrismML-Eng/Bonsai-demo/blob/main/bonsai-27b-whitepaper.pdf Huggingface: https://huggingface.co/collections/prism-ml/bonsai-27b Github: https://github.com/PrismML-Eng/Bonsai-demo/ Demo: https://huggingface.co/spaces/webml-community/bonsai-webgpu-kernels https://youtu.be/eFgknPFK-g0 My voice to text App: whryte.com Website: https://engineerprompt.ai/ RAG Beyond Basics Course: https://prompt-s-site.thinkific.com/courses/rag Signup for Newsletter, localgpt: https://tally.so/r/3y9bb0 Let's Connect: 🦾 Discord: https://discord.com/invite/t4eYQRUcXB ☕ Buy me a Coffee: https://ko-fi.com/promptengineering |🔴 Patreon: https://www.patreon.com/PromptEngineering 💼Consulting: https://calendly.com/engineerprompt/consulting-call 📧 Business Contact: [email protected] Become Member: http://tinyurl.com/y5h28s6h 💻 Pre-configured localGPT VM: https://bit.ly/localGPT (use Code: PromptEngineering for 50% off). Signup for Newsletter, localgpt: https://tally.so/r/3y9bb0 00:00 27B Model on iPhone 00:27 Bonsai Compression Idea 01:32 Quantization Limits Explained 03:52 From PTQ to QAT 06:11 Bonsai End to End Setup 08:36 Speed and Benchmarks 10:55 Bonsai local test

Top Comments (10)

@dustinmorrison6315 2026-07-16

I have noticed the same looping problem with "obliterated" (aka jail broken aka uncensored) models. The trick for me was to just change the inference parameters (like temperature for example) to get it to not do that. This is incredible work!

0
@adventureswithlils4331 2026-07-15

It was looping on me too But love the concept… hope the field progresses and smaller and smaller models with intelligence density Become common

1
@zhonwarmon 2026-07-15

Microsoft has something like a $13B position in OpenAI and sells inference by the token through Azure. A self-hostable, CPU-runnable, Claude-tier open model is the single most destructive thing to that business

7 2 replies
@soymhofficial 2026-07-20

Cool tutorials both on paper explanations and on new model architectures One question might feel unrelated: may I ask what you use for animations within your videos? Feels like manim, but it's not

0 1 replies
@brewhog 2026-07-15

I find the ternary version quite usable. I haven't had the looping issues you had at this time. However, I also wasn't using the 1-bit version. I think ternary is the way to go if you want to use it for anything useful. One agentic task that seems to work great is a chatbot based on traversing an LLM-Wiki (vs RAG). That seems to be working nearly flawlessly for my LLM-Wiki KBs.

6 2 replies
@fgfgfgfgfgfg1003 2026-07-17

I ran it today in a LXC on my EPYC 7713 and got ~1 token/s per 16 cores, I guess it is not that shiny yet

0
@skr_8489 2026-07-16

So how about making smaller - models that can work on yout mac machine? Will this shrink larger models without quality loss?

0 1 replies
@BalleaBlanc 2026-07-15

It's like taking a Ferrari, removing the engine, it's still a Ferrari that may fit in your budget now but you won't go anywhere.

1 1 replies
@saniaubaid6015 2026-07-15

This can be really disruptive if it holds for bigger models.

1 1 replies
@jeremybyington 2026-07-15

is there a way to expand the attention so it doesn’t loop?

0 1 replies

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot