Skip to main content
株式会社オブライト
株式会社オブライト

Ternary Bonsai 2.5 27B Requirements

5.9GB Ternary Qwen3.8-27B for Agentic Coding, 204 tok/s on RTX 4090 with MTP

Published 2026/11/2511 min read

Ternary Bonsai 2.5 27B requirements: PrismML's ternary Qwen3.8-27B is 5.9GB and reaches 204 tok/s on an RTX 4090 with MTP. Apache 2.0. Updated Nov 2026.

Ternary Bonsai 2.5 27B is a ternary-quantized model derived from Qwen3.8-27B, announced by PrismML on November 24, 2026. Its model size is 5.9GB, unchanged from the previous generation (the language-model GGUF in PTQ1_0 is 5.93GB at 1.76 bits per weight). It runs through llama.cpp on NVIDIA and Intel GPUs and through MLX on Mac, iPhone and iPad, with weights released under Apache 2.0. PrismML reports 204 tokens/s on an RTX 4090 with MTP (speculative decoding).

This article gives a requirements cheat sheet, the differences from the previous Ternary Bonsai 2 27B, and how the model relates to its base, Qwen3.8-27B. Only figures confirmed on PrismML's announcement, the Hugging Face model cards, the Bonsai-demo GitHub repository and the official docs are listed; anything we could not confirm is marked as not published.

Requirements cheat sheet

ItemDetail
AnnouncedNovember 24, 2026 (PrismML)
LicenseApache 2.0
Base modelQwen3.8-27B (hybrid attention: about 75% linear, 25% full attention)
Parameters27.36B (24.35B language model + 2.54B embedding/LM head + about 0.47B vision tower)
Context lengthUp to 262,144 tokens
QuantizationTernary weights (-1, 0, +1), group size 128, rotated Hadamard basis
Effective bits1.76 bits/weight (PTQ1_0)
Model size (official headline)5.9GB
GGUF PTQ1_05.93GB (needs PrismML's llama.cpp fork)
FP16 equivalentAbout 53.8GB
Runtimesllama.cpp on NVIDIA/Intel GPUs, MLX on Apple; CPU also works
Minimum RAM/VRAM (official)Not published (the 5.93GB of weights plus KV cache and runtime memory)

What Ternary Bonsai 2.5 27B is: a version tuned for agents

On September 17, 2026, PrismML released Ternary Bonsai 2 27B, a ternary quantization of Qwen3.8-27B. Version 2.5 is its successor: the size stays at 5.9GB, while agentic coding, multi-turn tool use and multi-step tasks are strengthened. PrismML says it finishes tasks in fewer turns and tokens and reduces excessive thinking and repetitive loops.

The intended use is an on-device agent that works with private files and tools. Running locally without sending data to the cloud is what the 5.9GB size makes practical. PrismML also offers custom post-training and inference optimization, which is outside the scope of this article.

Files and sizes (GGUF / MLX)

PackageDescriptionSize
GGUF PTQ1_0Dense trit packing (1.76 bpw); needs PrismML's llama.cpp5.93GB
GGUF PQ2_0Each trit in a 2-bit slot; needs the fork; source of the MLX exportAbout 7.2GB (per the docs; the model card gives no individual size)
GGUF Q2_0Works on stock llama.cpp (b11556 or newer)7.91GB (as listed on the model card)
GGUF Q2_0 MTPIncludes the MTP draft layer7.67GB (as listed on the model card)
MLX 2-bitFor Apple Silicon; 2-bit language weights (group 128) plus an FP16 vision tower8.86GB download
Vision projector (mmproj)For image input; separate and optionalSize for the 27B not confirmed (the docs say 0.36 to 0.63GB across the lineup)

The setup script in Bonsai-demo says it downloads about 7.6GB (the PQ2_0 MTP build) on most backends and about 6.4GB (PTQ1_0) on CUDA-class GPUs. In practice, then, the disk and memory you need is a little more than the 5.9GB headline. The file list on the model card also has some garbled rows, so check the official repository for the final pairing of Q2_0 and TQ1_0 files.

On the MLX package, the GitHub README says it is text-only and to use llama.cpp for images, while the Hugging Face model card describes an image-text package. The sources disagree, so check the official description directly if you need image input.

Differences from Ternary Bonsai 2 27B: what changed

ItemTernary Bonsai 2 27BTernary Bonsai 2.5 27B
ReleaseSeptember 17, 2026November 24, 2026
BaseQwen3.8-27BQwen3.8-27B
Model size5.9GB5.9GB (unchanged)
FocusGeneral accuracy retention (98.2% of FP16)Agentic coding and tool use
MTP (speculative decoding)Not mentioned officiallyEvery GGUF includes an MTP draft head
SWE-bench Verified60.875.6
AppWorld51.290.5
LiveCodeBench v683.883.0

The size and the base model are the same; what changed is the later training and the agentic ability. For coding agents and tool calling the gain is large: about 15 points on SWE-bench Verified and about 39 points on AppWorld. LiveCodeBench v6, which measures one-shot code generation, slipped slightly from 83.8 to 83.0, so 2.5 is not better on every metric.

Whether to switch depends on the workload. If you use tool calling, coding agents or long multi-step tasks locally, there is little reason not to move to 2.5 since the size is identical. If you mostly chat, summarize or do one-off code completion, the gap from version 2 is small and swapping is not pressing. The earlier family stays available: set BONSAI_FAMILY=bonsai2 when running Bonsai-demo's setup.

Benchmarks: Qwen3.8-27B and the previous generation

BenchmarkQwen3.8 27BBonsai 2 27BBonsai 2.5 27B
SWE-bench Verified80.660.875.6
DeepSWE v1.1 (mini-swe-agent)30.1027
Terminal-Bench 2.170.852.860.1
AppWorld93.251.290.5
τ³-Bench72.869.173.9
BigCodeBench61.557.260.3
LiveCodeBench v687.683.883.0

All values are from the table on the announcement page. Version 2.5 recovers about 94% of the FP16 Qwen3.8 27B score on SWE-bench Verified (75.6 vs 80.6) and about 97% on AppWorld, and it exceeds Qwen3.8 27B on τ³-Bench (73.9 vs 72.8). Gaps remain on Terminal-Bench 2.1 (60.1 vs 70.8) and LiveCodeBench v6 (83.0 vs 87.6).

In the model card's aggregates, agentic tool calling (average of five benchmarks) is 77.2 vs 77.7 for FP16, agentic coding (average of three) is 54.2 vs 60.5, about nine-tenths, and general capability (five categories, 16 benchmarks) is 82.1 vs 84.3. The official repository says agentic coding improved from about 63% to about 90% of FP16 compared with the previous generation.

Speed: 291 tok/s on H100 and 204 tok/s on RTX 4090 with MTP

HardwareConditionGeneration speed
NVIDIA H100With MTP (announcement)291 tok/s
NVIDIA RTX 4090With MTP (announcement)204 tok/s
NVIDIA RTX 5090No MTP, PTQ1_0 (model card)163 tok/s
NVIDIA H200No MTP, PTQ1_0 (model card)189 tok/s
NVIDIA B200No MTP, PTQ1_0 (model card)192 tok/s
Apple M5 ProPQ2_0, Metal (model card)30.2 tok/s

For prompt processing, the announcement lists 3,200 tokens/s on an H100 with a 2,000-token prompt and about 3,060 tokens/s on an RTX 4090. MTP is speculative decoding using a draft layer built into the GGUF; per the model card it gives 1.5 to 1.8x on NVIDIA GPUs and 1.1 to 2.1x on other devices. The card also notes that prefill slows by 9 to 23% on NVIDIA GPUs without the new kernels. The Bonsai-demo README says the output matches plain decoding.

Note that the conditions differ between figures. The 204 tok/s on an RTX 4090 (announcement, with MTP) and the 163 tok/s on an RTX 5090 (model card, without MTP) are not directly comparable across GPUs. Measure on your own hardware.

Memory estimate: 5.9GB of weights plus KV cache

Even with small weights, a long context makes the KV cache take real memory. According to the Bonsai-demo README, the FP16 KV cache is about 64 KiB per token (about 6.3 GiB at 100K tokens), and setting BONSAI_KV4=1 to quantize KV to 4 bits cuts it to about 18 KiB (about 1.8 GiB at 100K). The default context length depends on RAM and reaches 131K on machines with more than 71GB of RAM.

ContextKV (FP16, about 64 KiB/token)KV (KV4, about 18 KiB/token)
32,768About 2.0 GiBAbout 0.6 GiB
131,072About 8.0 GiBAbout 2.3 GiB
262,144About 16 GiBAbout 4.5 GiB

This table is our own estimate from the per-token figures above, not an official value. Adding the 5.93GB of weights, a 32K context lands at about 8GB and the full 262K context with FP16 KV reaches the low 20GB range. Compute buffers and the OS come on top, so the maximum context on a 24GB-class GPU leaves little headroom. When VRAM is tight, the official guidance is to add -np 1 to llama-server to use a single request slot; one RTX 3080 10GB user reported GPU use falling from about 9.5GB to about 7.8GB.

PrismML does not state whether it runs on a 16GB RAM machine. From the weight size, short contexts should be feasible, but that is our estimate, not an official guarantee.

Guide by GPU and Mac

EnvironmentHow to runWhat the official sources confirm
NVIDIA GPU (RTX 4090 etc.)llama.cpp (PrismML fork), PTQ1_0 or PQ2_0204 tok/s with MTP on RTX 4090
NVIDIA H100 / H200 / B200Same291 tok/s with MTP on H100
Intel GPUllama.cpp (Vulkan etc.)Speed not published
AMD GPUllama.cpp (ROCm / Vulkan)Listed in the README; speed not published
Apple Silicon (Mac)MLX, or llama.cpp with Metal30.2 tok/s on M5 Pro (PQ2_0)
iPhone / iPadMLXSupport stated in the announcement; speed not published
CPU onlyllama.cppBONSAI_NGL=0 forces CPU; speed not published

How to run: setup and llama.cpp requirements

The easiest route is the official Bonsai-demo. Its scripts detect the GPU automatically and offload all layers.

git clone https://github.com/PrismML-Eng/Bonsai-demo.git
cd Bonsai-demo
./setup.sh
./scripts/start_llama_server.sh   # chat UI at http://localhost:8080
./scripts/run_llama.sh -p "your prompt"   # one-off run, no server

# On Apple Silicon with MLX
./scripts/run_mlx.sh -p "your prompt"

If you handle GGUF files directly, only Q2_0 runs on stock llama.cpp (build b11556 or newer). PTQ1_0, PQ2_0 and the MTP draft need PrismML's llama.cpp fork (github.com/PrismML-Eng/llama.cpp, branch prism); upstream support for PTQ1_0 is said to be under review. The model card warns that older builds produce garbled output with no warning.

hf download prism-ml/Ternary-Bonsai-2.5-27B-gguf Ternary-Bonsai-2.5-27B-PTQ1_0.gguf --local-dir .
./bin/llama-cli -m Ternary-Bonsai-2.5-27B-PTQ1_0.gguf -ngl 99 -fa on -c 32768 \
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 -n 16384

For thinking mode, the recommended sampling is temperature 1.0, top_p 0.95, top_k 20 and min_p 0. llama.cpp defaults min_p to 0.05, so pass --min-p 0 explicitly. Reasoning effort defaults to xhigh; medium gives shorter output, and low is stated as unsupported. To avoid cutting thinking short, use an output limit of -n 16384 or more.

Choosing among options at this size class

Quantizing the base Qwen3.8-27B in the usual way needs about 17GB at Q4_K_M. Ternary Bonsai 2.5 27B fits in roughly a third of that, in exchange for depending on dedicated kernels and a fork. With ample memory and a wish to avoid operational friction, standard quantization is simpler; for running a 27B-class agent on a small GPU or laptop, this model is the candidate. Whether the ternary predecessor is enough comes down to whether you use agents, as described above.

FAQ

How much memory does Ternary Bonsai 2.5 27B need?

The official headline size is 5.9GB (the GGUF PTQ1_0 is 5.93GB). At runtime the KV cache and working buffers are added; the FP16 KV is about 64 KiB per token. An official minimum RAM/VRAM figure is not published.

Is it worth upgrading from Ternary Bonsai 2 27B?

For agentic coding and tool calling, yes. The size is the same 5.9GB, while SWE-bench Verified rises from 60.8 to 75.6 and AppWorld from 51.2 to 90.5. For chat and one-off code generation the difference is small, and LiveCodeBench v6 dips slightly.

Does it run on stock llama.cpp?

The Q2_0 file (about 7.9GB) runs on stock llama.cpp build b11556 or newer. The 5.9GB-class PTQ1_0, PQ2_0 and the MTP draft need PrismML's fork. Older builds produce garbled output without warning, so check the build number.

What is MTP and how much does it help?

A draft layer built into the GGUF that predicts candidate tokens ahead of time (speculative decoding). The model card reports 1.5 to 1.8x on NVIDIA GPUs, and the announcement reports 204 tok/s on an RTX 4090 and 291 tok/s on an H100. The README says output matches decoding without MTP.

Does it run on a Mac or iPhone?

Apple devices use MLX. The MLX 2-bit package is an 8.86GB download, and llama.cpp (PQ2_0, Metal) on an M5 Pro is reported at 30.2 tok/s. Sources disagree on image input for the MLX package, so check the official description.

Can I use it commercially?

The weights are released under Apache 2.0, which is permissive for commercial use. The MLX package, however, bundles a loader under a separate license and carries upstream attribution (NOTICE), so check the bundled files before embedding it.

株式会社オブライト

Oflight Inc. is a Tokyo-based IT company providing software development, digital signage, web development, network systems, and IoT/AR/VR technology services.

Feel free to contact us

Contact Us