Free · WaitlistJoin the waitlist for the free 2-day Vibecoding & AI Agents Intensive (autonomous Hermes + DeepSeek agent · led by Jemal Hamidun, Head of AI at Alpina Digital & MIPT)Join the waitlist →
ReleaseAPI / Product · ActionableHabr AI→ original

PrismML Squeezes 27B Coding Model to 5.9 GB, Keeps 75.6% on SWE-bench Verified

PrismML has released Ternary Bonsai 2.5, a version of Qwen3.8 27B in which every weight is stored as one of three values: −1, 0, or +1. That cuts the model from 54 GB to 5.93 GB, and it solves 75.6% of SWE-bench Verified tasks, against 80.6% for the original. But the format only runs in PrismML's fork of llama.cpp, and with context you need 10–12 GB of VRAM. So it won't fit on a 6 GB card, though it will run comfortably on a mid-range gaming GPU.

AI-processed from Habr AI; edited by Hamidun News
PrismML Squeezes 27B Coding Model to 5.9 GB, Keeps 75.6% on SWE-bench Verified
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
The biggest drop is on Terminal-Bench 2.110.7 points below the original
Key metric #2Up to 291 tokens/s on H100 and 204 on RTX 4090 with MTP, but the kernels are experimental
Key metric #3Weights are under Apache 2.0, but check the license of the base Qwen3.8 separately

Powerful coding models have always been limited by video memory: running a 27-billion-parameter network takes tens of gigabytes of VRAM. Startup PrismML offers a workaround. In its most compact packaging, Ternary Bonsai 2.5 27B takes up 5.93 GB and, according to the company, solves 75.6% of SWE-bench Verified tasks. The original Qwen3.8 27B, on which Bonsai is built, scores 80.6%. It sounds like a way to run a coding agent on a home GPU, but the figure comes with several caveats.

How three values become 5.9 GB

In a regular model, each weight is a number that occupies 16 bits (in BF16 format). In that form, the original 27B would weigh about 54 GB. In a ternary model, each weight takes only one of three values: −1, 0, or +1. Each group of 128 weights shares a single FP16 scaling factor, which restores the correct magnitude during computation.

A pure ternary weight carries about 1.585 bits of information. Accounting for auxiliary data, the Hugging Face model card cites an effective figure of 1.76 bits per parameter. That yields 5.93 GB in the PTQ1_0 format, roughly a ninefold compression. Straight arithmetic would give about 5.3 GB; the rest goes to scaling factors and metadata.

To keep coarse rounding from destroying accuracy on rare large outlier values, the weights are "mixed" before compression using a Hadamard rotation. Outliers get spread across the whole group, and the engine reverses the transform at runtime. Of the 27 billion parameters, 24.35 billion belong to the language part, 0.47 billion to vision, and another 2.54 billion to input embeddings and the output layer. The model card does not disclose their precision.

What was lost, and what you'll need to add

According to PrismML's benchmarks, the gain over the previous Bonsai 2 of the same size is 14.8 points on SWE-bench and 39.3 on AppWorld. Against the original Qwen3.8, the most noticeable drop is on Terminal-Bench 2.1: 10.7 points lower. The ternary version loses the most on long terminal sessions. On τ³-Bench, the model is 1.1 points above the base, but that is most likely measurement noise. Tests ran in reasoning mode with xhigh effort.

Now, memory. The 5.93 GB figure covers only the weights.

Another 1–3 GB goes to context and runtime overhead, so the model will not fit entirely on a 6 GB card. The advertised context length is up to 262,000 tokens, and that context costs memory: the FP16 KV cache takes about 6.3 GiB per 100,000 tokens.

Enabling cache compression with the environment variable BONSAI_KV4=1 brings that down to roughly 1.8 GiB. According to the documentation for the previous version, the architecture has not changed, so these calculations still hold.

On a 10 GB card, the model takes about 9.5 GB with automatic parallelism and about 7.8 GB when limited to one thread (-np 1).

For comfortable use, plan on 10–12 GB of VRAM.

Launch pitfalls

The most compact PTQ1_0 format works only in PrismML's modified version of llama.cpp. Support in the mainline branch is still under review. Standard llama.cpp will only run the heavier two-bit Q2_0 variant, and the build must be no older than b11556. On an older build, the model will load without errors but start producing incoherent text. For Apple hardware, there is a separate two-bit MLX package weighing 8.86 GB, which also requires its own loader and a modified kernel.

Speed looks impressive: 291 tokens per second on H100 and 204 on RTX 4090 with MTP (multi-token prediction), and around 300 on H200 and B200. On NVIDIA cards, the speedup is 1.5–1.8×. But the required draft head exists only in files with the mtp suffix, and the MTP kernels are listed as experimental and have not been tested on Metal, SYCL, or NPU.

A few more settings. The -min-p parameter should be set to 0 instead of the usual 0.05. The response length limit must be at least 16,384 tokens, or the model will cut off its reasoning mid-sentence. The low effort mode is not supported.

What to do with this

The measurement protocol is not disclosed: neither the specific agent nor the step limit is named. For now, this is a vendor's marketing number, and it's worth verifying on your own tasks before deploying. The weights are released under Apache 2.0, but the terms for commercial use of the base Qwen3.8 27B need to be checked separately.

The bottom line: agentic models with tens of billions of parameters are gradually moving onto consumer graphics cards. If you have a GPU with 10–12 GB, Bonsai is worth trying for local coding experiments. For production, it's wiser to wait until format support lands in mainline llama.cpp, and to test long terminal workloads separately.

Story

Key Questions Answered

How three values become 5.9 GB?

In a regular model, each weight is a number that occupies 16 bits (in BF16 format). In that form, the original 27B would weigh about 54 GB. In a ternary model, each weight takes only one of three values: −1, 0, or +1. Each group of 128 weights shares a single FP16 scaling factor, which restores the correct magnitude during computation. A pure ternary weight carries about 1.585 bits of information. Accounting for auxiliary data, the Hugging Face model card cites an effective figure of 1.76 bits per parameter.

What was lost, and what you'll need to add?

According to PrismML's benchmarks, the gain over the previous Bonsai 2 of the same size is 14.8 points on SWE-bench and 39.3 on AppWorld. Against the original Qwen3.8, the most noticeable drop is on Terminal-Bench 2.1: 10.7 points lower. The ternary version loses the most on long terminal sessions. On τ³-Bench, the model is 1.1 points above the base, but that is most likely measurement noise. Tests ran in reasoning mode with xhigh effort. Now, memory. The 5.93 GB figure covers only the weights.

What are the key details on Launch pitfalls?

The most compact PTQ1_0 format works only in PrismML's modified version of llama.cpp. Support in the mainline branch is still under review. Standard llama.cpp will only run the heavier two-bit Q2_0 variant, and the build must be no older than b11556. On an older build, the model will load without errors but start producing incoherent text. For Apple hardware, there is a separate two-bit MLX package weighing 8.86 GB, which also requires its own loader and a modified kernel.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

Free 2-Day Vibecoding & AI Agents Intensive

Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.

Join the waitlist →Nomad AI Workspace
What do you think?
Loading comments…