\

Bonsai 27B: A 27B-Class model that runs on a phone

216 points - today at 5:50 PM

Source
  • SwellJoe

    today at 8:48 PM

    What I most want to see it compared to is Gemma 4 12B in the 4-bit QAT version. It's barely bigger than this at just under 7GB, so it also runs on just about any modern device and is remarkably smart for its size. It's an excellent tool user, crazy good vision for its size. I'm still trying to wrap my head around how much is lost with each step down in resolution, but the QAT versions from Google seem to prove the answer is "very little" at four bits.

      • verdverm

        today at 9:06 PM

        4bits is a cutoff point for many model families, but also depends on what parts you quant to 4bits vs alternatives (weights, weight+activation, kv cache).

        Good evaluation from 2024 https://arxiv.org/pdf/2402.18158

        I'm currently working towards an updated version (not an og author), curious if others are aware of similar surveys, as I have yet to do a real lit search.

    • motbus3

      today at 8:34 PM

      I need help understanding this. I understood that the magic here is the quantization that allows it to use from 50G to 4G and their process retain most of the intelligence within Pareto limits of gain. And then they proceed to compare with other quantized models as in the level of intelligence per size. It gets to my attention though that the performance in tool calling is mostly affected which is a problem for other small models.

      How does this model compare to a recent 4G model? How do we know it retained intelligence from the parent rather then being fine tuned for the benchmarks?

      I am not shtng on them or anything. I'd rather find it amazing, BUT given my limited knowledge, I feel the results miss fair comparison plots and the ones might be misleading. Buy I also reckon it might be me the problem. Anyone care to explain this poor silly fellow some of those points?

        • 0c3ca83

          today at 8:41 PM

          [flagged]

          • today at 8:39 PM

        • kristianp

          today at 7:32 PM

          Apparently Apple is "in talks" with the PrismML: https://www.cnbc.com/2026/07/14/apple-prismml-ai-compression...

            • CharlesW

              today at 8:46 PM

              Notably, PrismML CEO Babak Hassibi told CNBC this, so it’s either (1) bullshit, or (2) he just ended any chance of a relationship by leaking news of the talks.

                • rogerkirkness

                  today at 9:02 PM

                  Apple would punish him severely unless they cleared it in advance, it might be to their advantage for some reason (negotiating with Google for Gemma rights? idk).

          • Arcuru

            today at 8:33 PM

            Awesome! I've been waiting for them to start scaling ternary models for over a year[1]. Excited to try it out, typical Qwen 27B is too heavy for me to run on my local hardware at reasonable speeds.

            [1] https://jackson.dev/post/dont-sleep-on-bitnet/

              • drob518

                today at 8:59 PM

                Same here. I’m excited to have a model that might be usable on a 16 GB laptop.

            • Luker88

              today at 9:03 PM

              Nice!

              Do they have plans to bring even bigger models down to ~16GB VRAM so that more consumer hardware might be useful?

                • verdverm

                  today at 9:07 PM

                  bigger quant'd harder is not always better than a model of more modest size and quant

              • simonw

                today at 6:43 PM

                The models themselves are showing up on Hugging Face here: https://huggingface.co/prism-ml/models

                I've tried a couple in LM Studio - the GGUF one and the MLX one - but neither worked there. Anyone else get them to work? Might be that LM Studio needs to upgrade their llama.cpp or MLX engines first.

                  • bansaltushar

                    today at 7:58 PM

                    Depending on which model you're running, you might need to use the custom forks.

                    Details are here -> https://github.com/PrismML-Eng/Bonsai-demo/blob/main/README....

                      • motbus3

                        today at 8:36 PM

                        I spent quite sometime trying to install their tools and nothing really worked. I used these repos you shared but the dependencies all fail on mac

                          • PrismML

                            today at 8:45 PM

                            If you can share details on where it is failing, we'd love to help fix.

                            You can also join Discord to communicate with us directly http://discord.gg/prismml

                              • motbus3

                                today at 8:57 PM

                                I did not know you guys would be watching. For sure. Let me do that tomorrow when I turn it on again :) I am happy to see the message. Thanks!

                    • trollbridge

                      today at 7:51 PM

                      Didn't work for me in Unsloth, but it will probably be fixed in a day or two when the next batch of updates comes out.

                  • erwan577

                    today at 7:38 PM

                    The KV-cache memory usage also seems remarkably frugal, even at the full context length. That could make this model particularly useful in multi-agent coding workflows.

                    I wish KV-cache memory usage and related optimizations were discussed more clearly in new model announcements and demos.

                      • verdverm

                        today at 8:13 PM

                        quanting kv cache hurts attention / recall, and long-form tasks by proxy. Model families and sizes have different tolerances to quant ting different parts of the model, same for intended tasks.

                    • sigbottle

                      today at 7:16 PM

                      What's the hiring space and business strategy around all of these smaller AI labs? Its really cool that people like these guys get paid to optimize models and give them out for free (open source). Do a lot of these labs have forward deployed engineers doing integrations with customers who want local models? Is there a general shift towards the local model crowd?

                        • trollbridge

                          today at 7:51 PM

                          If you read to the bottom of the page, it says they're funded by a few people, and one of them is Samsung. I'm betting Samsung wants to be able to ship a capable AI system on a future model of their phone so they can compete with Apple.

                            • doctoboggan

                              today at 8:17 PM

                              Agreed, and the prevailing wisdom now seems to be that unless you can release a truly frontier model, you might as well release yours as open source to undercut your competition.

                      • alvatech

                        today at 6:21 PM

                        TIL that 1 bit models are actually 1.58 bit with three values +1, 0 and -1

                          • NitpickLawyer

                            today at 6:43 PM

                            There's two variants of this (or, as the joke goes, for very big values of bit):

                            Ternary Bonsai 27B uses ternary {−1, 0, +1} weights with FP16 group-wise scaling, giving a true 1.71 effective bits per weight.

                            1-bit Bonsai 27B uses binary {−1, +1} weights with the same group-wise scaling, giving 1.125 effective bits per weight.

                              • PcChip

                                today at 7:49 PM

                                this is a really dumb question, but how is -1 represented?

                                is it a float? if so, how many bits is the float?

                                I've never heard of a bit ever having more than two possible values

                                  • edflsafoiewq

                                    today at 8:43 PM

                                    It appears they are using Q2_0 in llama.cpp, which is 2 bits per weight + 1 float16 scale per group of 64 weights. This is inefficient in two ways: one bit pattern is wasted on each weight, since ternary weights only use {-1,0,1} and Q2_0 allows {-1,0,1,2}; and their group size is 128 weights, so the scale will be stored twice in two groups of 64 instead of stored only once in one group of 128.

                                    Their fork corrects the second inefficiency by using a group size of 128, but still uses 2-bit weights AFAICT.

                                    It's possible to pack 5 trits into a byte, but the unpacking is not very efficient. Another recent idea is to add the constraint that exactly one weight in each group of four be zero, which gives exactly 32 possible states, so it fits in 5 bits.

                                    • lioeters

                                      today at 8:58 PM

                                      > never heard of a bit ever having more than two possible values

                                      It's not represented by a "bit", binary digit with value of 0 or 1; but with a "trit", ternary digit with value of {−1, 0, +1}.

                                      • petu

                                        today at 8:07 PM

                                        packing multiple trits together

                                        e.g. 5 trits (243 states) into a byte gives 1.6 bits per trit: https://compilade.net/blog/ternary-packing

                                          • JoshTriplett

                                            today at 9:06 PM

                                            It's impressive how close to optimal this is.

                                            You can beat the efficiency of 5 trits in 8 bits (1.6) with as few as 17 trits in 27 bits (~1.588), but once you account for rounding up to a whole number of bytes for practical reasons, then beating the efficiency requires going to at least 111 trits in 176 bits (~1.586), or perhaps more practically for fast unpacking, 161 trits in 256 bits (~1.59).

                                            At that level, even if you have, say, 27B trits, the more efficient encodings would save something like 38-45MB (theoretical limit ~48MB), likely at the cost of some slowdown.

                                        • zawaideh

                                          today at 8:03 PM

                                          It’s still a bit with only two possible values. But they add a scaling factor to a group of them (128 for example) which when you factor in, results in a fractional number of bits per parameter.

                                            • throwawayffffas

                                              today at 8:40 PM

                                              I believe the scaling comes in later, to turn the 1 and -1 into large numbers that may or may not activate the next layer.

                                              The way they do it is packing like the other comment says.

                                              Each byte represents 5 trinary values instead of 8 binary, and there is a little bit of waste.

                                  • bensyverson

                                    today at 6:31 PM

                                    Yeah, it's an unfortunate convention from the very first "1 bit" model. But to be clear, Bonsai comes in both ternary and actual 1-bit variants.

                                • comandillos

                                  today at 8:33 PM

                                  Quite weird that heavy quantization method on a dense model gives better results than slightly quantized MoE models like 35B-A3B from Google.

                                  At this point all the different quantization and 'compression' (look at MPO applied to LLMs...) techniques start feeling a bit like snake oil. It's just gut feeling - or scores on benchmarks models are optimized for - what ends up deciding whether a technique is good enough or not.

                                  • liuliu

                                    today at 6:28 PM

                                    The problem, of course, is if you run the UD_Q2 variant (Unsloth) which does only post-training, the number is pretty close to 1-bit model here and the 5% drop in tool-call is significant than it suggests in real-life use cases.

                                      • liuliu

                                        today at 6:38 PM

                                        You also need to pay close attention to BFCLv3 multi-turn result, that helps you to get a sense how frequently these quants will be in a doom loop.

                                          • h14h

                                            today at 8:42 PM

                                            I'm curious what kind of results one could get from combining the clever quantization PrismML is doing here with something like LiquidAI's antidoom:

                                            https://github.com/Liquid4All/antidoom

                                    • kamranjon

                                      today at 8:42 PM

                                      After using a highly capable 2-bit quant as my daily driver for months now, I get pretty excited about releases like this. After a few days for the kinks to be worked out, I’ll be excited to try it.

                                        • digdugdirk

                                          today at 8:54 PM

                                          What model? And what hardware do you run it on?

                                          I find these style of models are great, but fail hard, and fail randomly. I'd be hesitant to use it for a daily driver, but I'm using dual 3060s, so it's not like I'm quantizing a frontier model here.

                                          How do you find the overall experience? And do you have any special sauce or recommendations for going this route?

                                          • RALaBarge

                                            today at 9:03 PM

                                            What have you been using?

                                        • luckystarr

                                          today at 7:33 PM

                                          Tried it on Android and got "!!!!!!!!!!!!!" for answers.

                                            • gunalx

                                              today at 8:09 PM

                                              The qwen models really seem to have this as a failure mode, its so annoying having a proper trace ending up in !!!!!! Garbage.

                                              • verdverm

                                                today at 8:10 PM

                                                That's what happens when you quant too hard. I'm working on quant strats and evals for the same underlying qwen 27b models.

                                                When I saw 27b on a phone, I thought not fitting, big phone, or aggressive quant. NVFP4 still takes 27G before KV cache.

                                            • syntaxing

                                              today at 7:00 PM

                                              For those curious about their demo, I’m pretty sure it’s using Locally AI (iOS only) that lmstudio acquired/aquihired a couple months ago.

                                              • drob518

                                                today at 8:58 PM

                                                This is going in a good direction.

                                                • thomasjb

                                                  today at 7:20 PM

                                                  I've been watching and waiting for this, interested to see how smart it is, as it fits with my interest of getting the smartest possible model running in 10GB of VRAM (RTX3060 that has to drive 2 monitors and run an llm)

                                                    • dakolli

                                                      today at 8:19 PM

                                                      start saving your money.

                                                  • syntaxing

                                                    today at 7:14 PM

                                                    I don’t know if the llama cpp implementation is wonky (and only supports the binary version) but it’s a lot slower than 35B-A3B @ Q4_KM + MTP with CPU offloading.

                                                      • pulse7

                                                        today at 7:31 PM

                                                        Most probably not optimized yet for this model...

                                                    • verdverm

                                                      today at 8:55 PM

                                                      Preliminary analysis via lm-evaluation-harness + vllm

                                                          model         | disk | wikitext | gsm8k (match/error)
                                                          baseline      | 55G  | 8.00     | 0.50/0.09
                                                          nvfp4-gptq    | 27G  | 8.25     | 0.47/0.9
                                                          nvfp4a16-gptq | 27G  | 8.11     | 0.53/0.9
                                                          bonsai-4bit   | 19G  | 16.75    | 0/0
                                                      
                                                      Looks like they quant'd too hard at 4 bits, can't imagine the ternary being any good based on this.

                                                      Code if you'd like to reproduce or try other test sets: https://github.com/verdverm/quantr (lightly tuned to a single oem spark, probably possible in 32-48G)

                                                      Good paper to understand the effects of quant regimes across model families and tasks: https://arxiv.org/abs/2402.18158 (Evaluating Quantized Large Language Models - 2024 ICML)

                                                      • wy35

                                                        today at 8:20 PM

                                                        Entire blog post seems to be AI-generated :/

                                                          • wmf

                                                            today at 8:31 PM

                                                            Do you think people who work on AI for a living are not going to use it?

                                                              • wy35

                                                                today at 8:45 PM

                                                                Of course not, personally almost all of my code these days is generated.

                                                                The LLM style of writing is just very distracting to read. “It unlocks X”, “Y changes the equation”, and why is there always something shifting? Makes my eyes glaze over in an otherwise interesting post.

                                                                  • arjie

                                                                    today at 8:50 PM

                                                                    The text is mostly content-free. Headline + charts are enough for most HN stories.

                                                        • xyzsparetimexyz

                                                          today at 6:50 PM

                                                          That's awesome. What's the largest model that could fit onto a single 16gb gpu at 1.125 effects bits per weight?

                                                            • drob518

                                                              today at 9:09 PM

                                                              Yep, that’s the question. I asked just that when Bonsai’s first models got released. Super interesting if we can push the parameter count over 100B with 1.125 bit quantization and still keep pretty good performance versus 16-bit 100B models. That’s a definite sweet spot.

                                                              • Catloafdev

                                                                today at 7:25 PM

                                                                Doing some naive math, the F16 filesize is ~53.8gb, the 1-bit version is ~3.8gb, about 7% of the original size. The F16 size is roughly 2x param count, so that gives a rough ballpark of ~110B.

                                                            • erelong

                                                              today at 7:00 PM

                                                              I was trying Ornith 9B locally (it's up on Ollama) which claims:

                                                              > Ornith-1.0-9B, which can be easily deployed on edge devices, matches or exceeds the performance of much larger models such as Gemma 4-31B and Qwen 3.6 35B.

                                                              https://deep-reinforce.com/ornith_1_0.html

                                                              Only tried it so much so far; it did a little better than Qwen 9B

                                                                • liuliu

                                                                  today at 7:02 PM

                                                                  Note that 3.5 9B cannot do thinking (while 3.6 27B can, pretty effectively, quite verbosely).

                                                                    • gunalx

                                                                      today at 8:12 PM

                                                                      3.5 9B can do thinking. Its just disabled by default in its gguf chat template.

                                                                        • liuliu

                                                                          today at 8:44 PM

                                                                          It is disabled because it doesn't work :) Try it and see the doom loop it gets itself in.

                                                                  • verdverm

                                                                    today at 8:16 PM

                                                                    Orinth was not impressive in my vibes testing, I just completed my first grid analysis with real evals on qwen 27b. I can now scale that grid analysis and intend to include the qwen 9b ftunes I've seen going around. They were actually a main motivation because so many claim this or that one is better, but very little in the way of evals

                                                                      • drob518

                                                                        today at 9:10 PM

                                                                        I tried it, too, and it got stuck in some loops where it couldn’t recover. Shame, it was promising for the same reason as Bonsai’s models.

                                                                    • janalsncm

                                                                      today at 7:15 PM

                                                                      Is that a 1-bit LLM? I don’t understand the connection with this article.

                                                                        • erelong

                                                                          today at 7:44 PM

                                                                          Oh, I don't actually know the difference if you want to explain it

                                                                          The title says it's 27B grade running on a phone and what I was comparing it to in my mind was a model that runs at 35B grade that could presumably run on a phone "better"?

                                                                          edit: I asked AI for the difference and understand a little better, thanks for the heads up to learn the difference between models... I think the thing was, although ornith was created for a specific agentic purpose, it was still outperforming a previous generalist model I had running locally (so in my mind I thought it was still a better local model) - I'd like to try bonsai out if I can figure out how to run it lol

                                                                  • 0xbadcafebee

                                                                    today at 8:42 PM

                                                                    27B is way more than you need for a phone. Doesn't matter how much you try to compress it, it's the wrong application of the wrong tool. There are already useful tiny models that fit on phones and do basic things really well. Dumb down a big model too much and it becomes worse than a small fine-tuned model.

                                                                    • Havoc

                                                                      today at 6:41 PM

                                                                      This must be some sort of unpublished app?

                                                                      I can just see their image tool on the app store

                                                                    • pdfops

                                                                      today at 7:46 PM

                                                                      [dead]

                                                                      • ai_fry_ur_brain

                                                                        today at 6:38 PM

                                                                        [dead]

                                                                        • theLiminator

                                                                          today at 8:25 PM

                                                                          This is useful research, but this particular model itself is likely absolutely useless.

                                                                            • oceansweep

                                                                              today at 8:28 PM

                                                                              Why make this comment without having tried it first? It very clearly is not useless and performs a lot better than one might expect. I am currently waiting to do more benchmarks of it in comparison to the full weight model, but it seems promising/better than Mistral Nemo at a lower file size.

                                                                                • Onavo

                                                                                  today at 8:34 PM

                                                                                  I think what OP means is that the "minimum viable product" for a daily use LLM is probably somewhere around e.g. GPT 4o's level of intelligence (YMMV). Below a certain threshold, you are better off using specialized machine learning models rather than general purpose LLMs. It's very difficult to get that level of intelligence fully local on a mobile device without streaming to the cloud.