Ternary Bonsai 2.5 27B fits 8 GB GPUs at 5.93 GB. Here is the catch
Choose between PTQ1_0, PQ2_0, and Q2_0 for PrismML's 5.93 GB Ternary Bonsai 2.5 27B, enable MTP speculative decoding, and avoid llama.cpp pitfalls.
6 minutes read Czytaj po polsku

On this page (8)
- Key takeaways
- Why a 5.93 GB ternary 27B changes the 8-12 GB VRAM math
- Choosing a GGUF packing: PTQ1_0, PQ2_0, or stock Q2_0
- Agentic coding and tool calling vs FP16 and low-bit rivals
- MTP draft heads and speculative decoding speedups
- Running Bonsai 2.5 in llama.cpp on NVIDIA GPUs and Apple Silicon
- Sampling flags, reasoning effort, and agent workflow gotchas
- FAQ
Key takeaways
- Ternary Bonsai 2.5 27B shrinks Qwen3.8-27B to 5.93 GB in PTQ1_0 while keeping 77.2 average tool-calling accuracy.
- Use PTQ1_0 on NVIDIA or PQ2_0 on Metal with PrismML's fork, and Q2_0 on stock llama.cpp b11556 or newer.
- MTP GGUF variants bundle a draft head that speeds up NVIDIA token decode by 1.5-1.8x in PrismML benchmarks.
- Pass --min-p 0, -np 1 on tight VRAM, and -n 16384 so xhigh reasoning traces do not truncate.
Standard post-training 27B GGUFs force an ugly compromise on 8-12 GB GPUs: either spill layers to system RAM or drop below the 2.5-bit quality floor. PrismML's Ternary Bonsai 2.5 27B (prism-ml/Ternary-Bonsai-2.5-27B-GGUF, Apache 2.0) cuts the footprint to 5.93 GB at 1.76 bits per weight in PTQ1_0. This guide helps you weigh it against NariQ and standard Qwen3.8-27B builds, choose between PTQ1_0, PQ2_0, and Q2_0, enable MTP speculative decoding, and run llama.cpp without hitting silent output corruption or mid-thought truncation.
Why a 5.93 GB ternary 27B changes the 8-12 GB VRAM math
At 53.8 GB in FP16, Qwen/Qwen3.8-27B is far too large for single consumer cards. Even post-training Qwen3.8-27B GGUF builds spill past 16 GB GPUs once you allocate real context, while compressing further runs straight into NariQ's 2.5-bit floor.
Bonsai 2.5 drops weight storage roughly 9x to 5.93 GB in PTQ1_0 (1.76 bpw). On a 12 GB card, that leaves nearly half of VRAM free for KV cache and display buffers instead of forcing partial CPU offload. On 8 GB cards and 16 GB+ Apple Silicon Macs, the weights still fit completely in fast memory for text-only work.
The model uses a ternary g128 format: weights sit strictly in {-1, 0, +1} (~1.585 bits of information per trit) with one shared FP16 scale factor per 128 weights. PrismML stores those weights in a blockwise orthogonal Hadamard rotated basis folded offline into the weights, adding zero extra weight traffic while applying a matching rotation to activations at runtime.
Its 27.36B total parameters split cleanly for local GGUF VRAM planning: 24.35B language parameters across 64 blocks (SwiGLU MLP, RoPE, RMSNorm, 262K max context or 262144 for -c), 2.54B in embeddings and lm-head, and an optional 0.47B vision tower across 27 blocks shipped separately as mmproj so text-only runs spend zero VRAM on vision. Combined with ~75% linear / ~25% full hybrid attention, KV cache pressure stays manageable on 8-12 GB GPUs and 16 GB+ Macs.
Choosing a GGUF packing: PTQ1_0, PQ2_0, or stock Q2_0
The base repository offers three packings of the exact same ternary model, differing in disk layout and runtime support.
| Packing | Layout | Runtime | Best use |
|---|---|---|---|
PTQ1_0 | Dense trits (5.93 GB, 1.76 bpw) | PrismML-Eng/llama.cpp (upstream review) | Fastest NVIDIA decode; runs on Metal, CUDA, CPU, SYCL |
PQ2_0 | 2-bit slot per trit | PrismML-Eng/llama.cpp | Benchmarked on Apple Metal; MLX export source |
Q2_0 | Standard 2-bit GGUF container | Stock llama.cpp b11556+ | Environments locked to upstream llama.cpp |
PTQ1_0 delivers the fastest decode on every NVIDIA GPU PrismML tested and also runs on Apple Metal, CPU, and SYCL inside PrismML-Eng/llama.cpp. PQ2_0 places each trit in a 2-bit slot, serves as PrismML's benchmarked Apple Metal format, and feeds MLX conversion. Upstream stock llama.cpp rejects both PTQ1_0 and PQ2_0 as unknown types, supporting only Q2_0 from release b11556 onward.
Agentic coding and tool calling vs FP16 and low-bit rivals
Across five tool-calling benchmarks (tau2-Bench, tau3-Bench, BFCL v3, BFCL v4, and AppWorld), PrismML reports an average score of 77.2 for Bonsai 2.5 against 77.7 for FP16 Qwen3.8-27B and 75.3 for GSQ-RCO IQ3_XXS, even though GSQ-RCO IQ3_XXS is 1.7x larger than PTQ1_0.
Agentic coding jumps from 63% of FP16 in Bonsai 2 to 90% of FP16 in Bonsai 2.5:
| Benchmark | Bonsai 2 | Bonsai 2.5 | GSQ-RCO IQ3_XXS | FP16 |
|---|---|---|---|---|
DeepSWE | 0 | 27.0 | - | - |
SWE-bench Verified | 60.8 | 75.6 | - | - |
Terminal-Bench 2.1 | 52.8 | 60.1 | - | - |
| Agentic coding overall | 63% of FP16 | 54.2 (90% of FP16) | 55.5 | - |
| General capability (16 benchmarks) | - | 82.1 | - | 84.3 |
On general capability across five categories (16 benchmarks), Bonsai 2.5 scores 82.1 versus 84.3 for FP16. Qualitatively, when VRAM stops at 8-12 GB, ternary-trained Bonsai 2.5 avoids the collapse you hit pushing post-training NariQ or standard Qwen3.8-27B quants below 2.5 bits. On a 16 GB GPU such as an RTX 5060 Ti 16 GB, GSQ-RCO IQ3_XXS edges ahead on agentic coding (55.5 vs 54.2) while trailing on tool calling (75.3 vs 77.2) and consuming 1.7x more VRAM for weights, leaving Bonsai 2.5 with much deeper context headroom.
Agentic tool-calling score vs. weight precision
PrismML-reported averages across tau2-Bench, tau3-Bench, BFCL v3/v4, and AppWorld.
Source: PrismML Ternary-Bonsai-2.5-27B-GGUF
Show data
| Bonsai 2.5 PTQ1_0 | 77.2 pts |
| GSQ-RCO IQ3_XXS | 75.3 pts |
| Qwen3.8-27B FP16 | 77.7 pts |
MTP draft heads and speculative decoding speedups
Base GGUF files contain only the model weights, whereas MTP variants bundle a Multi-Token Prediction (MTP) draft head inside the same package for speculative decoding.
In PrismML's testing (with MTP, updated kernels, and Qwen3.8 default sampling), MTP draft heads speed up decode by 1.5-1.8x on NVIDIA GPUs. Combined with kernel work since Bonsai 2's launch day, overall decode runs 2.3-3.0x faster on 6 of 7 NVIDIA GPUs measured, reaching roughly 300 tok/s on H200 and B200. Consumer cards with narrower memory buses run slower in absolute tok/s, though the relative MTP speedup remains valuable for interactive coding loops.
For large prompts, prefill flips slightly by GPU class: PQ2_0 leads prefill on H200, H100, B200, and L40S, while PTQ1_0 leads slightly on the other GPUs tested. Use the pinned speculative decoding scripts in PrismML-Eng/Bonsai-demo rather than guessing draft flags.
Running Bonsai 2.5 in llama.cpp on NVIDIA GPUs and Apple Silicon
Grab prebuilt binaries from PrismML-Eng/llama.cpp or build the fork from source. Enable CUDA on NVIDIA systems:
git clone https://github.com/PrismML-Eng/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build -jOn macOS, omit -DGGML_CUDA=ON so Metal builds by default:
git clone https://github.com/PrismML-Eng/llama.cpp.git
cd llama.cpp
cmake -B build && cmake --build build -jOn Apple Silicon, PrismML also provides MLX and mlx-swift forks built from PQ2_0 exports. On a 24 GB machine like the Mac mini M5 Pro, the ternary weights fit comfortably alongside 32K context and local development tools.
Download your target packing with hf download and launch llama-cli with -ngl 99 -fa on -c 32768 -n 16384 (and --min-p 0).
NVIDIA (PTQ1_0 with the PrismML fork):
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF --include "*PTQ1_0*" --local-dir ./bonsai-2.5
./build/bin/llama-cli -m ./bonsai-2.5/<ptq1_0-file>.gguf -ngl 99 -fa on -c 32768 -n 16384 --min-p 0Apple Metal (PQ2_0 with the PrismML fork):
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF --include "*PQ2_0*" --local-dir ./bonsai-2.5
./build/bin/llama-cli -m ./bonsai-2.5/<pq2_0-file>.gguf -ngl 99 -fa on -c 32768 -n 16384 --min-p 0Stock llama.cpp b11556 or newer (Q2_0):
llama-cli --version
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF --include "*Q2_0*" --local-dir ./bonsai-2.5
llama-cli -m ./bonsai-2.5/<q2_0-file>.gguf -ngl 99 -fa on -c 32768 -n 16384 --min-p 0When running llama-server on an 8-12 GB GPU for single-user work, pass -np 1. Without -np 1, llama-server allocates extra parallel KV cache slots that can exhaust tight VRAM, and keeping -n 16384 gives long thinking traces room to finish.
Sampling flags, reasoning effort, and agent workflow gotchas
Match your sampling parameters to the active mode instead of trusting server defaults:
| Parameter | Thinking mode | Instruct mode (non-thinking) |
|---|---|---|
temperature | 1.0 | 0.7 |
top_p | 0.95 | 0.80 |
top_k | 20 | 20 |
min_p | 0.0 | 0.0 |
presence_penalty | 0.0 | 1.5 |
repetition_penalty | 1.0 | 1.0 |
Because llama.cpp defaults to min_p=0.05, always pass --min-p 0 explicitly so the sampler does not prune valid reasoning tokens.
Reasoning effort defaults to xhigh for maximum accuracy. medium trims length for a speed/accuracy balance, whereas low is unsupported and behaves close to xhigh. Setting a small cap like -n 256 with xhigh (or fallback low) causes the model to truncate mid-thought before emitting a final answer.
Use PrismML-Eng/Bonsai-demo for pinned tool-calling server flags, MTP speculative decoding scripts, and optional mmproj vision loading. For choosing between llama-server and other persistent homelab backends, read the inference servers guide.
FAQ
Can Ternary Bonsai 2.5 27B run in stock upstream llama.cpp without a fork?
Yes, if you download the Q2_0 packing and run stock llama.cpp release b11556 or newer. Older stock builds load Q2_0 without an error and output garbage because they lack the Hadamard activation transform, while PTQ1_0 (currently under upstream review) and PQ2_0 require the PrismML-Eng/llama.cpp fork.
Why does Bonsai 2.5 output cut off early when you set a low token limit or low reasoning effort?
Reasoning effort defaults to xhigh, and the unsupported low setting falls back close to xhigh rather than producing short replies. Small limits such as -n 256 exhaust the budget inside the thinking trace before any final answer appears, so use -n 16384 or switch to medium reasoning effort or Instruct mode.
Should I load the mmproj file for coding or tool-calling workloads?
No, skip mmproj unless your prompts include images. The 0.47B vision tower ships separately so text-only serving keeps that VRAM free for context and KV cache.

