How to Run a 27B AI on Your Laptop for Free With Bonsai 2.5
Your laptop can now run a 27-billion-parameter AI that writes code, calls tools and reasons through multi-step jobs, and it costs nothing. No subscription, no API bill, no data leaving your machine. The model is called Ternary Bonsai 2.5 27B, released on 24 November 2026 by PrismML under the Apache 2.0 licence, which allows commercial use. It fits in about 6 GB, and on a 16 GB laptop it runs at a usable speed.
Here is the honest part, and it belongs at the top. This is not a one-click install. Ollama and LM Studio do not list Bonsai 2.5 yet. The smallest files need PrismML's own llama.cpp fork. And if you download the wrong file for the wrong runtime, you get either an error or, worse, silent garbage output that looks like the model is broken when it is your setup that is old.
The good news is that one file does work in plain stock llama.cpp, and this post is the exact path to it. Pick the right file, check your llama.cpp version, download the weights, start the server, and give it a real coding task. About fifteen minutes of setup, most of it waiting for a download.
What is Ternary Bonsai 2.5, and why does a 27B model fit in 6 GB?
Most open models store every weight as a 16-bit number. A 27-billion-parameter model at 16 bits needs 53.8 GB of disk and memory, which is why models this size normally live on servers with several datacentre GPUs.
Bonsai 2.5 does something radical with the weights. Every weight is reduced to one of three values: minus one, zero, or plus one. That is what "ternary" means. Each group of 128 weights shares one 16-bit scale number that restores the range. The result is 1.76 bits per weight instead of 16, and the whole model takes 5.93 GB instead of 53.8 GB. About nine times smaller, for the same 27 billion parameters.
The base model is Qwen3.8-27B, a 27.36-billion-parameter model with a 262,144-token context window and a hybrid attention design. Bonsai 2.5 keeps that architecture and that context length. It also reads images, through a separate vision file you only load if you want image input, so text-only use never pays for it.
Do not confuse Bonsai 2.5 with Bonsai 2. Bonsai 2 came out on 17 September 2026 and is the same 5.93 GB size. What changed in 2.5 is how well the model holds up when it has to do real agent work: long chains of tool calls, reading results, adjusting when a step fails, and keeping the goal in mind through the whole job. PrismML's own numbers say SWE-bench Verified rose from 60.8 to 75.6, DeepSWE from 0 to 27.0, and AppWorld from 51.2 to 90.5. Those are the maker's numbers, not independent scores, and nobody has published an independent check yet. Treat them as the claim to test, not as a verdict.
The trade is small on paper and visible in the numbers. Full-precision Qwen3.8-27B scores 80.6 on SWE-bench Verified; Bonsai 2.5 scores 75.6. On tool calling, averaged over five benchmarks, it is 77.2 against 77.7 for the full model, which is essentially level. Its weakest spot is Terminal-Bench 2.1, where it scores 60.1 against 70.8. PrismML names that gap itself. For a free model that runs on a laptop, that is a good trade. For the hardest problems, keep a frontier model in reach.
Which file should you download? This is the decision that matters
The same model comes packed four ways, and the file you pick decides which runtime you need. Get this wrong and nothing works, so choose before you download anything.
The recommendation for almost everyone reading this post is the Q2_0 file, 7.67 GB. It is the only file that runs in stock llama.cpp, from build b11556 onward. If you already have a recent llama.cpp, you need nothing else. If you are on an NVIDIA GPU and want the fastest decode, the PTQ1_0 file at 5.99 GB is smaller and faster, but it needs PrismML's llama.cpp fork, because stock llama.cpp rejects it as an unknown type. On a Mac, PQ2_0 at 7.25 GB is the format PrismML benchmarked on Apple Metal, and it also needs the fork. The MLX 2-bit pack at 8.88 GB is the Python route for Apple silicon Macs, and it is slower: PrismML measured 21.7 tokens a second on an M5 Pro in MLX, against 30.2 in llama.cpp.
Each file also comes as an MTP variant, about 0.24 GB larger, with a draft head that guesses the next few tokens so the model can check several at once. PrismML measured it speeding up decoding 1.5 to 1.8 times on NVIDIA GPUs. Skip it for your first run. Get the plain file working first, then try the MTP variant when you want more speed.
Step 1: Check your llama.cpp build, or get one
Stock llama.cpp learned to run Bonsai in pull request 29600, first released in build b11556 on 11 October 2026, so llama.cpp 1.0 runs the Q2_0 file. Check yours first:
llama-cli --version
If the build is b11556 or newer, you are ready. If it is older, update before you download anything. This matters more than it sounds. PrismML warns that older stock builds load the Q2_0 file without any warning and produce garbage. You will think the model is broken. It is not. Your build is old.
If you do not have llama.cpp at all, download a release archive from the llama.cpp GitHub releases page and extract it. You do not need to build from source for this tutorial. If you are new to running models locally, our Ollama tutorial covers the same idea with a friendlier tool, and the concepts carry over. If you chose the PTQ1_0 or PQ2_0 file instead, download a binary from the PrismML llama.cpp fork releases instead of stock llama.cpp, because those two files need the fork's ternary kernels.
Step 2: Download the weights
The weights live on Hugging Face, in the repo prism-ml/Ternary-Bonsai-2.5-27B-GGUF. Download the Q2_0 file with the Hugging Face command line tool:
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF Ternary-Bonsai-2.5-27B-Q2_0.gguf --local-dir .
That is a 7.67 GB download, so expect a few minutes on a normal connection. If the hf command is not installed, install the Hugging Face Hub package first with pip install -U "huggingface_hub[cli]".
One file, one download, no account and no licence key. The Apache 2.0 licence means you can use the weights commercially, which is not true of every open model. Check the licence file in the repo if your use case needs certainty.
Step 3: Start the server and run your first real task
With the file downloaded, start llama-server from the folder that holds it:
llama-server -m Ternary-Bonsai-2.5-27B-Q2_0.gguf --alias bonsai-2.5-27b \ -ngl 99 -fa on -c 32768 -np 1 \ --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0
Each flag does a job. -ngl 99 offloads every layer to your GPU, or to Metal on a Mac; set it to 0 for CPU-only. -fa on turns on flash attention. -c 32768 sets the context to 32,768 tokens, which is the comfortable size for a 16 GB machine, and the tutorial's recommended starting point. -np 1 limits the server to one request slot, which matters on limited memory: in automatic mode the server can start four slots that share a cache, and on a 10 GB RTX 3080 one user measured about 9.5 GB of GPU memory in use before adding -np 1, and 7.8 GB after. The sampling flags are the model card's own recommendation, and --min-p 0 matters because llama.cpp applies a default of 0.05 that you need to override.
Once the server is up, open http://localhost:8080 in your browser for the chat page. The server also answers an OpenAI-compatible API at the same address, which is how coding agents reach it.
Now give it a real task, not a greeting. A chat greeting tells you nothing. Ask it to write a Python script that reads a CSV file and finds the three most common values in a column, or to fix a failing test in a small project, and watch whether it reads the result, corrects itself and finishes. That is the work this model was tuned for. If it rambles, remember it is a reasoning model and it thinks before it answers. It reasons at xhigh effort by default, the most accurate setting. If you want shorter, faster answers, ask for medium effort per request. low is not supported. And keep the output limit at 16,384 tokens or more, because a small cap can end generation mid-thought, before any answer appears.
How fast is it, really, and will it fit in 16 GB?
Speed depends on your hardware, and every number here is PrismML's own measurement, not a RiseMe test. On an RTX 5090 it decodes at 174 tokens a second, or 305 with the MTP draft head. On an RTX 4090 it is 111, or 204 with the head. On an Apple M4 Pro it is 22.9, or 25.3 with the head. On an M5 Pro, a separate test measured 30.2 tokens a second in llama.cpp and 21.7 in MLX. On an Intel Core Ultra laptop with integrated graphics it is 11.1, or 23.1 with the head. That is usable on a laptop and fast on a desktop GPU, and the MTP head is worth trying once the basic setup works.
Memory is the other half of the question. PrismML does not publish a minimum, so here is the maths. The weights are 7.67 GB for the Q2_0 file. The context cache costs about 64 KiB per token, which is about 2 GiB at 32,768 tokens. Weights plus a 32K cache come to about 8 to 10 GB before the runtime's own buffers. On a 16 GB Mac that leaves room for macOS and your other apps. A guide measured about 8.6 GB total on a 16 GB Mac at the automatic context size, or 7.9 GB with a 4-bit KV cache, so the numbers line up.
The 262,144-token context is real, but it is not realistic on 16 GB. At 64 KiB a token, a full 262K context would need about 17 GB of cache alone, before the weights. On a 16 GB machine, 32K is comfortable and 64K is realistic. Start at 32K. Raise it only if you have the memory to spare, and watch the server's memory use when you do.
What is it good at, and where does it fall short?
Its strength is agentic coding and tool use, and that is where you should use it. SWE-bench Verified 75.6, Terminal-Bench 2.1 60.1, DeepSWE 27.0, and a tool-calling average of 77.2 across five benchmarks, all PrismML's numbers. It is the strongest model under 10 GB on those tasks by the maker's own comparison, ahead of every conventional low-bit build of the same base model. It keeps about 90 percent of the full model's agentic coding score at a ninth of the size.
Its weak spots are honest ones. Terminal-Bench 2.1 is the furthest from full precision, 60.1 against 70.8. It can overthink: users reported long thinking times in the first days after release, and the fix is medium reasoning effort, not a smaller model. PrismML has not measured workloads that run for hours across many context windows, so do not hand it an unsupervised multi-hour job and walk away. And every score above is PrismML's own. No independent lab has published a check yet.
The most useful way to run it is inside a coding agent. Start llama-server with the command above, then point OpenCode, one of the free coding CLIs we compared, at it as a custom provider: base URL http://127.0.0.1:8080/v1 and model ID bonsai-2.5-27b, matching the --alias in the server command. OpenCode's docs describe the custom provider recipe. Then give it small, well-defined jobs, and run it where a wrong command cannot do damage. It can take scheduled workflows too, but keep it supervised until you know how it behaves on your code.
The trap: why "ollama run bonsai" does not work today
This is the mistake most guides will make in the next few weeks, so it is worth a section of its own. Ollama's library has the older Bonsai 2, whose 27B model is ollama run bonsai-2:27b, an 8.3 GB download. That is Bonsai 2, which scores 60.8 on SWE-bench Verified, not 2.5. LM Studio's catalog lists the first Bonsai 27B. OpenRouter serves Bonsai 2, not 2.5. So if a guide tells you to run Bonsai 2.5 with a one-line Ollama command, it is wrong today. It may become right later, when Ollama and LM Studio add the new version, but check their catalogs before you believe it.
The same warning applies to hosted copies. There is no hosted price for Bonsai 2.5 yet, and no official API. The free route is the one in this post: download the weights and run them yourself.
FAQ
How much memory do I need to run Bonsai 2.5?
PrismML does not publish a minimum. The files are 5.99 GB to 7.67 GB, and the context cache costs about 64 KiB a token, so about 2 GiB at 32K tokens. Weights plus a 32K cache come to about 8 to 10 GB. On a 10 GB RTX 3080, one user measured 7.8 GB of GPU memory in use after limiting the server to one slot with -np 1.
Does Bonsai 2.5 work in Ollama or LM Studio?
Not from their catalogs yet. As of 25 November 2026, Ollama's library has the older Bonsai 2, and LM Studio's has the first Bonsai 27B. The tutorial above uses stock llama.cpp, which is the supported route today.
Why does Bonsai 2.5 output gibberish?
Most likely your llama.cpp is older than build b11556, from 11 October 2026. PrismML warns that older builds load the Q2_0 file without any warning and produce garbage, so check with llama-cli --version and update. The PTQ1_0 and PQ2_0 files need PrismML's own llama.cpp fork, and stock llama.cpp rejects them as unknown types.
Is Bonsai 2.5 as good as Qwen3.8-27B?
Close, by PrismML's numbers, at a ninth of the size. It scores 75.6 on SWE-bench Verified against 80.6 for full-precision Qwen3.8-27B, and 77.2 against 77.7 on tool calling, averaged over five benchmarks. It trails most on Terminal-Bench 2.1, 60.1 against 70.8. Nobody has published independent scores yet.
Why does Bonsai 2.5 think for so long?
It reasons at xhigh effort by default, the most accurate setting. PrismML suggests asking for medium effort, which it says thinks noticeably less, and keeping the output limit at 16,384 tokens or more so generation does not stop mid-thought.
What is the difference between Bonsai 2 and Bonsai 2.5?
Same size, 5.93 GB, same ternary format. Bonsai 2.5 is the upgrade for agent work: SWE-bench Verified 60.8 to 75.6, DeepSWE 0 to 27.0, AppWorld 51.2 to 90.5, all PrismML's numbers. If a download or guide says Bonsai 2, it is the older model.
Sources
PrismML model card, Ternary Bonsai 2.5 27B
Enjoy, Bonsai 2.5 fits a 27B coding model in 6 GB
PrismML Bonsai demo, setup and run scripts
PrismML llama.cpp fork, for PTQ1_0 and PQ2_0
Andrew, How to run a 27B LLM on a 16 GB laptop
Ollama library, Bonsai 2
Keep reading on RiseMe
Run AI on Your Own PC: The Complete Beginner's Ollama Tutorial
Qwen3.8-27B vs Gemma 4: Which Free AI Actually Runs on Your PC?
Linger Explained: A 125B Personal Agent That Runs on Your PC
Raon-1 Mini: KRAFTON's 30B Open AI That Fits 256K Context on One GPU


