Editorial

Ternary Bonsai 2.5 27B VRAM: Which GGUF to Run

Bonsai 2.5 27B ships six GGUFs. PTQ1_0 fits 138K context on a 12 GB GPU; Q2_0 needs llama.cpp b11556+ or it prints garbage.

JJyoti Ranjan SwainUpdated
Ternary Bonsai 2.5 27B: 5.58 GiB PTQ1_0 file holds 138K tokens of context on a 12 GB GPU

Prism ML put Ternary Bonsai 2.5 27B on Hugging Face on 24 November 2026. It's Qwen3.8-27B squeezed to ternary weights (every weight is -1, 0 or +1), and the headline is 5.93 GB against 53.8 GB for FP16, with tool-calling scores level with the full model: 77.2 against 77.7 averaged over five agent benchmarks.

The repo ships six GGUF files, though, and they don't all run in the same llama.cpp. One of them loads in an old llama.cpp build without a warning and then prints garbage. Below is which file to download for your GPU, how much context each one leaves on 8, 12, 16 and 24 GB cards, and the server flags that keep it from eating an extra 1.7 GB.

Table of Contents

What changed from Bonsai 2

The weight format didn't change. Bonsai 2.5 keeps Bonsai 2's ternary g128 layout: one FP16 scale per group of 128 weights, stored in a Hadamard-rotated basis, 1.76 bits per weight. What Prism ML retrained is behaviour on long tool-driven tasks, and the coding numbers show it:

BenchmarkBonsai 2 27BBonsai 2.5 27BQwen3.8-27B FP16
SWE-bench Verified60.875.680.6
Terminal-Bench 2.152.860.170.8
DeepSWE0.027.030.1
AppWorld51.290.593.2
Tool-calling average (5)67.077.277.7

Bonsai 2 solved no DeepSWE task at all. Bonsai 2.5 solves 27.0, which is 90% of FP16. The coding average across the three agentic coding tests went from 37.9 to 54.2, or 89.6% of FP16's 60.5.

The other addition is a set of -mtp files with a multi-token prediction draft head for speculative decoding. On an RTX 4090 that takes decode from 111 to 204 tokens per second in Prism ML's server test, 1.84x.

Six files, three runtimes

Prism ML packs the same ternary model three ways, each with and without the draft head. The sizes below are the byte counts from the Hugging Face file list.

FileSizeGiBRuns in
PTQ1_05.99 GB5.58PrismML llama.cpp fork only
PTQ1_0-mtp6.23 GB5.80PrismML fork only
PQ2_07.25 GB6.76PrismML fork (and the MLX export)
PQ2_0-mtp7.49 GB6.98PrismML fork only
Q2_07.67 GB7.15stock llama.cpp b11556 or newer
Q2_0-mtp7.91 GB7.37stock llama.cpp b11556 or newer

The advertised 5.93 GB is the weight figure. The smallest actual file is 5,993,834,848 bytes, so budget 5.99 GB of download and 5.58 GiB of VRAM. Vision is a separate mmproj file (0.87 GiB in BF16, 0.59 GiB in Q8_0) that you load only for images.

Ternary Bonsai 2.5 27B files: PTQ1_0 and PQ2_0 need the PrismML fork, Q2_0 runs on stock llama.cpp b11556+

The split is about runtime more than quality. All three packings are the same model. PTQ1_0 stores the trits densely and decodes fastest on every NVIDIA GPU Prism ML measured, but stock llama.cpp rejects it as an unknown type. Q2_0 is llama.cpp's standard 2-bit type, so Ollama, LM Studio and anything else that bundles a recent llama.cpp can load it. You pay 1.68 GB, or 28% more file, for that convenience. On an H200, stock llama.cpp decodes the Q2_0 file at 109 tokens per second against 150 in the PrismML runtime.

Memory by context length

Bonsai 2.5 keeps Qwen3.8-27B's hybrid stack, so the KV-cache maths is the same as for any other build of that model. Of 64 layers, 16 use full attention and keep a cache that grows per token. config.json gives 4 KV heads and a head dimension of 256:

  • FP16 KV per token: 2 x 16 layers x 4 heads x 256 x 2 bytes = 65,536 bytes (64 KiB)
  • q8_0 KV per token: 34,816 bytes (34 bytes per 32 values)
  • Gated DeltaNet state for the other 48 layers: a fixed 144 MiB, whatever the context
ContextKV, FP16KV, q8_0PTQ1_0 total, FP16 KVPTQ1_0 total, q8_0 KVQ2_0 total, FP16 KV
8,1920.50 GiB0.27 GiB6.22 GiB5.99 GiB7.79 GiB
32,7682.00 GiB1.06 GiB7.72 GiB6.79 GiB9.29 GiB
65,5364.00 GiB2.12 GiB9.72 GiB7.85 GiB11.29 GiB
131,0728.00 GiB4.25 GiB13.72 GiB9.97 GiB15.29 GiB
262,14416.00 GiB8.50 GiB21.72 GiB14.22 GiB23.29 GiB

Totals are weights plus KV cache plus DeltaNet state, before compute buffers. The AI VRAM Calculator gives the same KV line if you pick the Qwen3.8 27B preset; its lowest weight setting is INT4, so swap in the file size from the table above yourself.

How much context fits on your card

To turn that into a context limit, I kept 15% of each card free for compute buffers and the CUDA context, and assumed one request slot (-np 1, covered below).

CardPTQ1_0, FP16 KVPTQ1_0, q8_0 KVQ2_0, FP16 KVQ2_0, q8_0 KV
8 GB17,64833,220does not fitdoes not fit
10 GB45,50185,64919,87637,414
12 GB73,354138,07847,72989,843
16 GB129,059242,935103,434194,700
24 GB240,470262,144 (full)214,845262,144 (full)

Max context for Ternary Bonsai 2.5 27B PTQ1_0 with q8_0 KV: 33K on 8 GB, 138K on 12 GB, 243K on 16 GB, full 262K on 24 GB

On an 8 GB card the choice of file decides whether the model runs at all. Q2_0 is 7.15 GiB, which leaves negative room once you hold back 15%, so 8 GB owners need the fork and PTQ1_0. With a q8_0 cache that gives about 33K tokens, enough for a coding agent on a small repo.

A 12 GB card (RTX 3060 12 GB, 4070) is where this model makes the most sense. PTQ1_0 with a q8_0 cache holds 138K tokens. Compare Underdog's Saluki 27B, the 7.89 GB 2-bit build of the same base model: on the same card it's at 64K with a q8_0 cache. The MTP file costs 0.22 GiB, which takes about 3,600 tokens off the FP16 figures and 6,900 off the q8_0 ones.

Agent scores against FP16 and Saluki-class builds

Prism ML ran every build in the same harness, in thinking mode at reasoning effort xhigh. That makes this table a fair comparison between builds, though it's Prism ML's own harness and nobody has reproduced it yet.

BuildSizeTool-calling avg (5)Agentic coding avg (3)AppWorld
Qwen3.8-27B FP1653.8 GB77.760.593.2
GSQ-RCO IQ3_XXS10.1 GB75.355.586.1
GSQ-RCO IQ2_XS8.4 GB65.648.546.5
Unsloth UD-IQ2_XS7.6 GB75.347.889.6
Bonsai 2.5 27B5.93 GB77.254.290.5

Ternary Bonsai 2.5 27B tool-calling 77.2 vs FP16 77.7, ahead of IQ3_XXS 75.3 at 1.7x less size

The AppWorld column is the one I'd look at. GSQ-RCO IQ2_XS is the file Saluki was built from, and it scores 46.5 there: Prism ML says that in about one task in five it writes a long script guessing every API call and marks the task done before seeing any output. Bonsai 2.5 finishes every task in a scenario 89.3% of the time. If your agent chains API calls, that's the failure you care about, and the two-tool-call benchmarks don't show it.

Where it gives ground: BFCL v4 trails FP16 by 3.6 points, math trails by 3.1, and Terminal-Bench 2.1 sits at 60.1 against 66.3 for the 1.7x larger IQ3_XXS.

Running it as a local agent server

On NVIDIA with the PrismML fork, download the small file and start the server with one slot:

bash
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF \
  Ternary-Bonsai-2.5-27B-PTQ1_0.gguf --local-dir .

# 12 GB card: 128K context, q8_0 KV cache, one request slot
./bin/llama-server -m Ternary-Bonsai-2.5-27B-PTQ1_0.gguf \
  -ngl 99 -fa on -c 131072 -np 1 --jinja \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0

For the draft head, Prism ML's CUDA preset uses the -mtp file with -c 16384 -np 1 plus --spec-type draft-mtp --spec-draft-n-min 0 --spec-draft-n-max 3 --spec-draft-p-min 0.1. On stock llama.cpp, check llama-cli --version reports b11556 or later, then use the Q2_0 file with the same flags.

The server speaks the OpenAI chat API on port 8080, so Hermes Agent, OpenCode or any client that takes a custom base URL can point at http://localhost:8080/v1. Tool calls need --jinja so the embedded Qwen3.8 chat template formats them. If you write tool schemas by hand, run them through the JSON formatter first.

The recommended sampling is temperature 1.0, top_p 0.95, top_k 20 in thinking mode, and temperature 0.7, top_p 0.80, presence penalty 1.5 with thinking off. Pass --min-p 0 either way, because llama.cpp defaults to 0.05.

Catches the model card mentions in passing

  • Old stock llama.cpp produces garbage. Builds before b11556 load Q2_0 without any warning and generate nonsense, because they lack the Hadamard activation transform. Apps that bundle their own llama.cpp need an engine from b11556 or later. If the output looks like noise, check the engine version first.
  • The server takes 4 slots by default. In automatic mode llama-server can start four request slots sharing a unified KV cache. A user on an RTX 3080 10 GB saw total GPU use drop from about 9.5 GB to about 7.8 GB after adding -np 1. On an 8 GB card that 1.7 GB is more than the 1.08 GiB of headroom PTQ1_0 leaves for the cache.
  • Thinking is long and low doesn't exist. The template defaults to xhigh reasoning. Effort medium works; low is silently treated close to xhigh. Prism ML's examples set -n 16384 because a 256-token cap ends generation mid-thought with no answer, so give your agent a generous max_tokens.
  • Apple numbers are for PQ2_0. Prism ML benchmarked Metal with the 7.25 GB PQ2_0 file (30.2 tokens per second on an M5 Pro), not the smaller PTQ1_0. On a 16 GB Mac, plan from the PQ2_0 row.

FAQ

Can Ternary Bonsai 2.5 27B run on an 8 GB GPU?

Yes, with PTQ1_0 in the PrismML llama.cpp fork and -np 1. The file is 5.58 GiB, which leaves room for about 17K tokens with an FP16 cache or 33K with q8_0 after 15% headroom. Q2_0 doesn't fit on 8 GB.

Does it work in Ollama or LM Studio?

Only the Q2_0 files, and only if the app's bundled llama.cpp is b11556 or newer. PTQ1_0 and PQ2_0 need the PrismML fork. Check that tool calls come back as structured tool_calls and not plain text.

Is it free for commercial use?

It's Apache 2.0, the same licence as Qwen3.8-27B. Prism ML asks, without requiring it, for attribution such as "Created using Bonsai by Prism ML" when you deploy it publicly.

Sources

  • Hugging Face, prism-ml/Ternary-Bonsai-2.5-27B-GGUF model card (README.md, 24 November 2026): weight format, packings and runtimes, llama.cpp b11556 note, sampling settings, reasoning efforts, -np 1 known issue and the RTX 3080 report, all benchmark tables, decode and prefill speeds, upstream llama.cpp comparison.
  • Hugging Face, same repo, file list and NOTICE.txt: byte sizes of all eight GGUF files, Apache 2.0 licence, attribution request, MTP head provenance.
  • Hugging Face, same repo, presets/llama.cpp/mtp-cuda.json: MTP server command and draft settings.
  • Hugging Face, Qwen/Qwen3.8-27B config.json: 64 layers, full attention every 4th layer, 4 KV heads, head dim 256, linear-attention head sizes.
  • KV cache, DeltaNet state, GiB conversions and context limits are calculated by ToolMintX from those sources, with 15% of each card held back for buffers. Real limits vary with build and settings.

Tools In This Article

Browser-based, no sign-up. Try them while the topic is fresh.

More From ToolMintX

Other Blog Posts