Run Ternary Bonsai 2.5 27B Locally with llama.cpp (Q2_0, PTQ1_0, MTP)
In this article
- What You're Setting Up
- Choose a Route
- Pick a File
- Size the Hardware
- KV cache and state, by arithmetic from the config
- Will it fit?
- Path 1: The Prism Fork
- Step 1: Get prism-b12220-41c86f7
- Step 2: Download the GGUF and check it
- Step 3: Start llama-server with MTP (NVIDIA)
- Step 4: Apple silicon
- Step 5: An 8 GB NVIDIA card
- Path 2: Stock llama.cpp
- Step 1: Get b12808
- Step 2: Download Q2_0
- Step 3: Start llama-server
- Path 3: Ollama (Unofficial)
- Path 4: MLX on Apple Silicon
- Smoke Test the Server
- Troubleshoot with the Known Issues
- What Performance to Expect
- Prism ML's measurements
- Third-party reports
- Benchmarks and the 4-bit Comparison
- Prism ML's benchmarks
- Against Qwen3.8-27B at ordinary 4-bit
- Practical Verdict
- What to Read Next
What You're Setting Up
Ternary Bonsai 2.5 27B is Prism ML's Apache 2.0 release of Qwen3.8-27B with its weight matrices stored as ternary values. Prism published it on Hugging Face on 24 November 2026, alongside a launch post that positions it as the agentic update to Bonsai 2: Prism says it worked on long sequences of tool calls and on the "excessive thinking and repetitive loops" of the previous model.
According to the model card, the model keeps the base model's hybrid-attention design: 64 blocks, about 75% linear attention and 25% full attention, SwiGLU MLPs, RoPE and RMSNorm. The card counts 24.35B language parameters, a 0.47B vision tower (27 blocks) and 2.54B embedding and LM-head parameters, 27.36B in total. Context runs to 262,144 tokens, which is also what the GGUF header (qwen35.context_length) and Qwen's config.json state.
How the weights are ternary. Every weight takes a value from {−1, 0, +1}, with one FP16 scale for each group of 128 weights, which the card counts as 1.76 bits per weight. Each matrix is first rotated blockwise by an orthogonal Walsh–Hadamard transform, and the runtime applies the matching transform to the activations at inference time. The rotation is folded into the stored weights, so it costs no extra bits. The Bonsai 2 report, whose format 2.5 keeps unchanged, gives the rotation block as 1,024 with fixed ±1 signs. It also keeps 26.2M parameters (0.0976% of the language model) above the low-bit format: norms and parts of the linear-attention state path. The GGUF header agrees: prism.hadamard.block_size = 1024, a normalized-sylvester-walsh-hadamard transform, and 401 rotated weight tensors. Neither the card nor the 2.5 whitepaper nor the Bonsai 2 report describes how the ternary weights were trained or converted. Prism documents the format, not the recipe.
Vision and MTP. Image input works through a separate projector file (mmproj). Its GGUF header declares a 27-block clip vision encoder with the qwen3vl_merger projector. The -mtp GGUF files add a multi-token-prediction draft head as one extra block: qwen35.block_count is 65 instead of 64, and qwen35.nextn_predict_layers is 1. Prism's NOTICE says this head (blk.64) was initialised from Qwen3.8-27B's MTP head, by way of Unsloth's UD-Q4_K_M conversion, and fine-tuned by Prism ML. The NOTICE also asks for, but does not require, the attribution "Created using Bonsai by Prism ML" if you redistribute the model.
This guide covers four routes: Prism ML's llama.cpp fork (all three packings plus MTP), stock llama.cpp (the Q2_0 files only), Ollama (unofficial) and Prism's MLX pack on Apple silicon.
December 2026 status: Stock llama.cpp runs only the
Q2_0files, from build b11556, the merge of PR #29600 on 11 October. Builds before that loadQ2_0without a warning and produce garbage.PQ2_0andPTQ1_0are Prism-only tensor types that stock llama.cpp rejects. The upstream pull requests forPTQ1_0(#29672, #29676) are still open; #29672 was last updated on 30 November and still needs a maintainer review. Prism also lists its fork as required for 2.5's built-in MTP drafting. The current stable release, v1.1.0 (26 November), includesQ2_0support but ships no binaries. The stock path here therefore pins b12808 (27 November). That build also refuses-sm tensorwith a clear error instead of crashing (#33080, first in b12779). The fork path pins prism-b12220-41c86f7 (25 November), the release that Prism's own Bonsai-demo pins. Ollama has no official entry, and itshf.coshortcut currently pulls the wrong file.
How this guide was checked: Model facts, file names, presets and licence terms come from the GGUF repo at commit
28a7093, the MLX repo ataa432fd, Qwen3.8-27B'sconfig.jsonat3756181, the Bonsai 2.5 and Bonsai 2 whitepapers and Bonsai-demo docs at0ae0e7f, and Prism ML's 24 November launch post. GGUF metadata was read from the first 512 KiB of theQ2_0,Q2_0-mtpandmmproj-Q8_0files with HTTP range requests. Every llama-server flag was checked againstcommon/arg.cppandcommon/common.hat b12808 (both identical to v1.1.0) and at prism-b12220-41c86f7. Tensor-type support was checked againstggml/include/ggml.h,gguf-py/gguf/constants.pyandggml/src/gguf.cpp. Ollama's bundled llama.cpp version was read fromLLAMA_CPP_VERSIONat each release tag. All 29 Hugging Face discussions and every GitHub issue in the troubleshooting tables were read on 1 December 2026, and their states are shown. Speed and quality figures come from Prism ML or from the named reporters.
Requirements:
- Fork path: NVIDIA (CUDA), Apple silicon (Metal), AMD (ROCm on Linux, HIP on Windows), Intel (SYCL), Vulkan or CPU. Budget 5.58 to 6.98 GiB for the weights plus context (see sizing).
- Stock llama.cpp path: any backend with
Q2_0kernels. Budget 7.15 GiB for the weights plus context. - MLX path: an Apple silicon Mac with Python 3.
- Python 3 for the Hugging Face
hfCLI, and 6 to 8 GB of free disk per model file, plus 0.63 GB for the vision projector.
Choose a Route
| Your setup | Runtime | File | Why |
|---|---|---|---|
| NVIDIA GPU, 8 GB or more | Prism fork, prism-b12220-41c86f7 | PTQ1_0-mtp | Smallest file, and the fastest decode on every NVIDIA GPU Prism measured. MTP adds 1.5–1.8× decode on NVIDIA per Prism. |
| Apple silicon | Prism fork | PQ2_0-mtp | The packing Prism benchmarked on Metal. MTP gains are small on Macs (1.13× on an M4 Pro). |
| Must use official llama.cpp: distro packages, company policy, an existing upstream install | llama.cpp b12808 | Q2_0 | Runs on upstream from b11556. On an H200, Prism measured 109 tok/s here against 150 tok/s for the same file on its fork. |
| AMD or Intel GPU | Prism fork, or llama.cpp b12808 | PQ2_0 or PTQ1_0 on the fork, Q2_0 on stock | The fork has ROCm, HIP, SYCL and Vulkan builds, but several open AMD reports exist (troubleshooting table). |
| LM Studio or another app that bundles llama.cpp | The app's engine | Q2_0 only | The card says the bundled engine must be built from b11556 or newer. Check the engine version in the app before loading. |
| Ollama | Ollama v0.40.19 | Community upload of Q2_0 | Not an official or Prism-listed route. See Path 3. |
| Mac, Python workflow | Prism's MLX pack | model.safetensors (8.60 GB) | Runs through Prism's bundled loader. Prism measured it slower than llama.cpp on the same Mac. |
Pick a File
Sizes are read from the Hugging Face API at commit 28a7093cc25bc151cc2b284c5570f12ce343fdcf (last modified 24 November 2026, 21:12 UTC). GPU memory is counted in binary units, so GiB is shown too.
| File | Bytes | GB | GiB | Tensor type | Runs on |
|---|---|---|---|---|---|
Ternary-Bonsai-2.5-27B-PTQ1_0.gguf | 5,993,834,848 | 5.99 | 5.58 | PTQ1_0 (Prism type 143) | Prism fork only |
Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf | 6,232,818,944 | 6.23 | 5.80 | PTQ1_0 + MTP head | Prism fork only |
Ternary-Bonsai-2.5-27B-PQ2_0.gguf | 7,253,354,848 | 7.25 | 6.76 | PQ2_0 (Prism type 142) | Prism fork only |
Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf | 7,492,338,944 | 7.49 | 6.98 | PQ2_0 + MTP head | Prism fork only |
Ternary-Bonsai-2.5-27B-Q2_0.gguf | 7,673,194,848 | 7.67 | 7.15 | Q2_0 (upstream type 42) | llama.cpp b11556+, Prism fork |
Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf | 7,912,178,944 | 7.91 | 7.37 | Q2_0 + MTP head | Prism fork for MTP drafting |
Ternary-Bonsai-2.5-27B-mmproj-Q8_0.gguf | 629,246,976 | 0.63 | 0.59 | Vision projector | Optional, images only |
Ternary-Bonsai-2.5-27B-mmproj-BF16.gguf | 931,145,856 | 0.93 | 0.87 | Vision projector | Optional, images only |
The MTP head adds exactly 238,984,096 bytes (0.22 GiB) to each packing. Per Prism's SPECULATIVE.md, the head is inert when drafting is off, so on the fork an -mtp file can replace the plain one. The card and whitepapers quote 5.93 GB for the PTQ1_0 language model; the PTQ1_0 file itself is 5.99 GB.
What the three packings are. All three hold the same ternary weights. They differ only in how the trits are packed:
Q2_0is llama.cpp's own 2-bit type: blocks of 64 weights in 18 bytes (2.25 bits per weight), pergguf-py/gguf/constants.py.PQ2_0puts each trit in a 2-bit slot with one FP16 scale per 128 weights. The Bonsai 2 report counts it at 2.16 bits per weight across the language model, and Prism's MODEL-FORMATS.md puts it about 6% smaller thanQ2_0.PTQ1_0packs trits densely: 28 bytes per 128 weights, 1.75 bits per weight, per its upstream PR #29672.
Stock llama.cpp's type enum stops at GGML_TYPE_F8_E4M3 = 43 (GGML_TYPE_COUNT = 44) at both v1.1.0 and b12867, so a type-142 or type-143 tensor fails the range check in gguf.cpp.
Size the Hardware
KV cache and state, by arithmetic from the config
Every figure in this section is arithmetic from config.json and the GGUF header, not a measurement. llama-server prints the real buffer sizes at load time; trust those over this estimate.
- Full-attention KV cache. Only every fourth layer uses full attention (
full_attention_interval: 4), so 16 of the 64 layers keep a KV cache. Each stores 4 KV heads of 256 dimensions for both K and V. In f16 that is 16 × 2 × 4 × 256 × 2 bytes = 64 KiB per token, the same figure Prism's Bonsai-demo quotes. - Linear-attention state. The 48 linear-attention layers keep a fixed-size state per sequence instead of a growing cache. The GGUF sets
ssm.inner_size6144,ssm.state_size128,ssm.group_count16 andssm.conv_kernel4. Fed into llama.cpp's formulas (n_embd_randn_embd_sinsrc/llama-hparams.cpp, stored as F32), that comes to 48 × (30,720 + 786,432) floats × 4 bytes ≈ 150 MiB per server slot, at any context length. - MTP draft cache. When drafting is on, the head's single full-attention layer gets its own cache: 4 KiB per token in f16.
- Quantized caches. q8_0 stores 32 values in 34 bytes and q4_0 stores them in 18 bytes (per
gguf-py), so those caches cost 53% and 28% of f16.
| Context (tokens) | KV cache, f16 | KV cache, q8_0 | KV cache, q4_0 | MTP draft cache, f16 |
|---|---|---|---|---|
| 8,192 | 0.50 GiB | 0.27 GiB | 0.14 GiB | 32 MiB |
| 32,768 | 2.00 GiB | 1.06 GiB | 0.56 GiB | 128 MiB |
| 49,152 | 3.00 GiB | 1.59 GiB | 0.84 GiB | 192 MiB |
| 65,536 | 4.00 GiB | 2.13 GiB | 1.13 GiB | 256 MiB |
| 131,072 | 8.00 GiB | 4.25 GiB | 2.25 GiB | 512 MiB |
| 262,144 | 16.00 GiB | 8.50 GiB | 4.50 GiB | 1,024 MiB |
Two public logs line up with this. A 64K q4_0 cache was logged as CUDA0 KV buffer size = 1152.00 MiB in HF discussion #20. A 96K draft cache was described as 384 MiB in f16 in #17.
Set -np 1 for a single user. In llama-server at b12808, the default -np -1 means auto, which the server turns into 4 slots sharing a unified KV cache. That means four copies of the 150 MiB linear-attention state, plus larger buffers. On an RTX 3080 10 GB, one user measured total GPU memory falling from about 9.5 GB to 7.8 GB after adding -np 1 (HF #1). Prism added the same advice to the card's Known issues section.
Will it fit?
"Left over" is what remains after the weights for KV cache, linear-attention state, compute buffers, the vision projector, and on a Mac, macOS and your apps. --fit, which is on by default in both builds, also keeps 1,024 MiB free per device unless you lower --fit-target. The first five columns are arithmetic, not measurements.
| Hardware | Runtime and file | Weights | Left over | Context that fits by arithmetic | Public report |
|---|---|---|---|---|---|
| 8 GB NVIDIA | Fork, PTQ1_0-mtp | 5.80 GiB | 2.20 GiB | 48K with q4_0 KV (0.84 GiB) plus state and draft cache | RTX 5060 Laptop 8 GB at 49,152 tokens with q4_0 KV, 7,728 MiB after load. Decode fell by more than half between 53K and 61K (Bonsai-demo #296). |
| 8 GB NVIDIA | Stock, Q2_0 | 7.15 GiB | 0.85 GiB | Not fully on the GPU at a useful context. 0.85 GiB is below --fit's 1 GiB margin. | RX 6600M 8 GB: Q2_0-mtp with q8_0/q4_0 KV and a 256 MiB fit margin left 425 MB in system RAM, 12.82 tok/s (HF #15). Partial offload costs more: 26 of 64 blocks on a shared 16 GB card gave 9.8 tok/s (HF #22). |
| 10 GB NVIDIA | Fork, PTQ1_0-mtp | 5.80 GiB | 4.20 GiB | 32K f16 (2 GiB), or 96K q4_0 (1.69 GiB) | RTX 3080 at 96K q4_0, q4_0 draft cache, projector on CPU: 9.48 GB used (HF #17). |
| 12 GB NVIDIA | Stock, Q2_0 | 7.15 GiB | 4.85 GiB | 32K f16 (2 GiB), or 64K q8_0 (2.13 GiB) | None found. |
| 16 GB GPU | Stock, Q2_0 + mmproj-Q8_0 | 7.73 GiB | 8.27 GiB | 64K f16 (4 GiB), or 128K q8_0 (4.25 GiB) | RTX 5070 Ti: all 64 blocks in 8.1 GB at 8K context on b12808 (HF #22). |
| 24 GB GPU | Fork, PTQ1_0 | 5.58 GiB | 18.42 GiB | Full 262,144 in f16 (16 GiB), tight. Full context in q8_0 (8.5 GiB) leaves room. | RTX 3090 at -c 262144, q8_0 KV, one slot: correct output on a 250K prompt (fork #462). |
| Mac, 16 GB unified | Fork, PQ2_0-mtp | 6.98 GiB | 9.02 GiB, shared with macOS | 16K f16 (1 GiB) | M2 Pro 16 GB at -c 16384 (HF #26). |
| Mac, 32 GB or more | Fork, PQ2_0-mtp | 6.98 GiB | 25.02 GiB, shared with macOS | Full 262,144 in f16 (16 GiB) | Prism's own Metal numbers are on an M4 Pro and an M5 Pro. |
The 8 GB row shows the main point: on that card the PTQ1_0 file is the difference between running entirely on the GPU and spilling to system RAM. To budget other models the same way, use the VRAM calculator.
Path 1: The Prism Fork
Step 1: Get prism-b12220-41c86f7
Prism's Bonsai-demo pins this release. A newer one, prism-b12232-f702476 (26 November), lists no changes. One open report (#502) measured it using about 550 MiB more VRAM at the first request than b12220, enough to run out of memory on an 8 GB card. Fork build numbers are the fork's own; they do not match upstream builds of the same number.
| Platform | Archive | CUDA runtime archive |
|---|---|---|
| Windows x64, CUDA 12.4 | llama-prism-b12220-41c86f7-bin-win-cuda-12.4-x64.zip (345.0 MB) | cudart-llama-bin-win-cuda-12.4-x64.zip (391.4 MB) |
| Windows x64, CUDA 13.3 | llama-prism-b12220-41c86f7-bin-win-cuda-13.3-x64.zip (218.6 MB) | cudart-llama-bin-win-cuda-13.3-x64.zip (391.0 MB) |
| Windows x64, AMD HIP | llama-prism-b12220-41c86f7-bin-win-hip-radeon-x64.zip (387.9 MB) | Not needed |
| Windows x64, Vulkan | llama-prism-b12220-41c86f7-bin-win-vulkan-x64.zip (28.9 MB) | Not needed |
| Linux x64, CUDA 12.4 | llama-prism-b12220-41c86f7-bin-linux-cuda-12.4-x64.tar.gz (361.4 MB) | No separate archive is published |
| Linux x64, CUDA 12.8 | llama-prism-b12220-41c86f7-bin-linux-cuda-12.8-x64.tar.gz (228.1 MB) | No separate archive is published |
| Linux x64, ROCm 7.2 | llama-prism-b12220-41c86f7-bin-ubuntu-rocm-7.2-x64.tar.gz (206.4 MB) | Not needed |
| macOS, Apple silicon | llama-prism-b12220-41c86f7-bin-macos-arm64.tar.gz (13.2 MB) | Not needed |
Prism's CUDA preset says Blackwell GPUs (B200, RTX PRO 6000, RTX 5090) need the release built with CUDA 12.8. The Linux tarballs extract into a llama-prism-b12220-41c86f7/ folder:
TAG=prism-b12220-41c86f7
mkdir -p ~/bonsai && cd ~/bonsai
curl -LO "https://github.com/PrismML-Eng/llama.cpp/releases/download/$TAG/llama-$TAG-bin-linux-cuda-12.4-x64.tar.gz"
tar -xzf "llama-$TAG-bin-linux-cuda-12.4-x64.tar.gz"
"./llama-$TAG/llama-server" --version
On a Mac, use llama-$TAG-bin-macos-arm64.tar.gz in both places. The Windows zips are flat, so extract the build and its CUDA runtime into the same folder:
$tag = "prism-b12220-41c86f7"
New-Item -ItemType Directory -Force "$env:USERPROFILE\bonsai\prism" | Out-Null
Set-Location "$env:USERPROFILE\bonsai\prism"
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest "https://github.com/PrismML-Eng/llama.cpp/releases/download/$tag/llama-$tag-bin-win-cuda-12.4-x64.zip" -OutFile llama.zip
Invoke-WebRequest "https://github.com/PrismML-Eng/llama.cpp/releases/download/$tag/cudart-llama-bin-win-cuda-12.4-x64.zip" -OutFile cudart.zip
Expand-Archive llama.zip -DestinationPath . -Force
Expand-Archive cudart.zip -DestinationPath . -Force
.\llama-server.exe --version
To build from source instead, clone the tag:
git clone --branch prism-b12220-41c86f7 --depth 1 https://github.com/PrismML-Eng/llama.cpp.git llama.cpp-prism
cd llama.cpp-prism
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j --target llama-server
Leave out -DGGML_CUDA=ON on macOS, where Metal is the default. On Windows the binary lands in build\bin\Release\. Prism's CUDA preset pins -DGGML_CUDA_CCCL_VERSION=v3.4.3 for its testing build and warns that without it "no draft is ever accepted". The option exists at this tag, so add it if a source build never accepts MTP drafts.
Step 2: Download the GGUF and check it
Download from the pinned revision. On NVIDIA, use the PTQ1_0 MTP file:
pip install -U huggingface_hub
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF \
Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf \
--revision 28a7093cc25bc151cc2b284c5570f12ce343fdcf \
--local-dir ~/models/bonsai-2.5
On a Mac, swap in Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf. For image input, add Ternary-Bonsai-2.5-27B-mmproj-Q8_0.gguf as a second filename. On Windows, run the same command with backticks in place of the backslashes and $env:USERPROFILE\models\bonsai-2.5 as the folder.
Check the download against the SHA-256 values Hugging Face lists for this revision:
e0fc5f3d47b9c926d52677d303b19df356a2376614b3e1cb9973865fc04ca431 Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf
929560ec9d37cf3cadd4b00cc87b51c570082a628dd830b4692dc0b2ed18dbbe Ternary-Bonsai-2.5-27B-PTQ1_0.gguf
ededc9fc0a8a6a8dd30914d107b2d2ce7674d789f1d05a1a481f240609aa6c23 Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf
103a11c94324029d8bae3f8152f30bba414730064cfb77438f8589db72e1aa85 Ternary-Bonsai-2.5-27B-PQ2_0.gguf
b0f83de8481c3200c529aef5fb495dbfedf2a4a3f017f7a3ea0a69c67be1d306 Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf
84496171ca79d4d33fb45612a2afd8303ec494baf916281023b7dc9cb3b3b9fa Ternary-Bonsai-2.5-27B-Q2_0.gguf
6807ede61d570bb86ba34b756a0fa109edc33668604de867c6ea6d8f1d631903 Ternary-Bonsai-2.5-27B-mmproj-Q8_0.gguf
e287342d92332fa3577ed1d42e921dac9370c08da58ba9337fa450f6cc76cfd7 Ternary-Bonsai-2.5-27B-mmproj-BF16.gguf
Use sha256sum <file> on Linux, shasum -a 256 <file> on macOS, or Get-FileHash <file> -Algorithm SHA256 in PowerShell.
Step 3: Start llama-server with MTP (NVIDIA)
This is the cuda-datacenter-and-blackwell profile from Prism's CUDA preset, with the card's sampling settings and a local address added:
"./llama-prism-b12220-41c86f7/llama-server" \
-m ~/models/bonsai-2.5/Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf \
--alias bonsai-2.5 \
--host 127.0.0.1 \
--port 8080 \
-ngl 99 -fa on -c 16384 -np 1 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 \
--spec-type draft-mtp \
--spec-draft-n-min 0 --spec-draft-n-max 3 --spec-draft-p-min 0.1
For an RTX 4090 and similar consumer cards, Prism's cuda-consumer-rtx4090 profile is the same except for --spec-draft-p-min 0. In PowerShell:
.\llama-server.exe `
-m "$env:USERPROFILE\models\bonsai-2.5\Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf" `
--alias bonsai-2.5 --host 127.0.0.1 --port 8080 `
-ngl 99 -fa on -c 16384 -np 1 `
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 `
--spec-type draft-mtp --spec-draft-n-min 0 --spec-draft-n-max 3 --spec-draft-p-min 0.1
What each flag does at prism-b12220-41c86f7:
| Flag | Why it is here |
|---|---|
-ngl 99 | Puts every layer on the GPU (99 is more than the 65 blocks in an -mtp file). The default is auto, which lets --fit decide. Drop this flag on cards too small to hold the file. |
-fa on | Flash attention, as in every Prism preset. The default is auto. A quantized KV cache needs it. |
-c 16384 | The default, 0, loads the trained context of 262,144 tokens, which is 16 GiB of f16 KV cache by the arithmetic above. Prism's Bonsai-demo FAQ links this default to machines running out of memory or freezing at start-up. |
-np 1 | One server slot. Auto mode opens 4 slots on a unified KV cache. |
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 | The card's thinking-mode settings. Both the GGUF's embedded sampling block and llama.cpp's own default set min-p to 0.05, so --min-p 0 must be explicit. For non-thinking use, the card gives temperature 0.7, top-p 0.80, top-k 20, min-p 0 and presence penalty 1.5. |
--spec-type draft-mtp | Turns on drafting with the built-in head. Without it, the -mtp file behaves like the plain one. |
--spec-draft-n-max 3 | Tokens drafted per step. If you omit it, the fork uses 2 for draft-mtp on CUDA and 3 elsewhere. |
--spec-draft-n-min 0, --spec-draft-p-min 0.1 | The preset's values. The help text describes p-min as the "minimum speculative decoding probability (greedy)"; its default is 0.00. Prism's tables call it the minimum draft probability. |
--host 127.0.0.1 --port 8080 | The host is already the default and keeps the server local. The default port is 9931. If you bind to 0.0.0.0, add --api-key. |
For images, add --mmproj ~/models/bonsai-2.5/Ternary-Bonsai-2.5-27B-mmproj-Q8_0.gguf. On a tight card, also add --no-mmproj-offload to keep the projector in system RAM. Prism's VISION.md says image prompts are then slower, but text requests are unaffected.
Measure with and without drafting. Prism's presets advise turning MTP off for long prompts with short answers, because drafting makes its own pass over the prompt and prefill is slower with it on in released builds. Every response's timings object includes draft_n and draft_n_accepted. If draft_n is 0 or missing, drafting is not running.
Step 4: Apple silicon
Prism's Metal preset uses the PQ2_0 file and one draft token with a high cut-off:
"./llama-prism-b12220-41c86f7/llama-server" \
-m ~/models/bonsai-2.5/Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf \
--alias bonsai-2.5 --host 127.0.0.1 --port 8080 \
-ngl 99 -fa on -c 16384 -np 1 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 \
--spec-type draft-mtp \
--spec-draft-n-min 0 --spec-draft-n-max 1 --spec-draft-p-min 0.6
Prism measured this on an M4 Pro at 22.19 tok/s without MTP and 25.17 tok/s with it. On M1 and M2 Macs, start without the four --spec-* flags. On an M2 Pro 16 GB, one user measured 14.5 tok/s plain against 13.3 tok/s with the preset (HF #26). They traced the loss to a missing PQ2_0 kernel for few-row verification on GPUs without Apple's tensor units, posted a three-line fork patch, and reported 15.3–15.8 tok/s with it. A related M2 Pro report (fork #490) is open.
Step 5: An 8 GB NVIDIA card
Two changes make room on 8 GB: a q4_0 KV cache, and smaller batches. This configuration comes from Bonsai-demo #296, measured on an RTX 5060 Laptop 8 GB with fork build b12178. The reporter's thread-count flags are left out, and so is --jinja, which is already the default.
"./llama-prism-b12220-41c86f7/llama-server" \
-m ~/models/bonsai-2.5/Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf \
--alias bonsai-2.5 --host 127.0.0.1 --port 8080 \
-ngl 99 -fa on -np 1 -c 49152 -b 512 -ub 256 \
-ctk q4_0 -ctv q4_0 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 \
--spec-type draft-mtp \
--spec-draft-n-min 0 --spec-draft-n-max 2 --spec-draft-p-min 0.1
The same reporter found two drafts faster than three on that GPU (88.4 against 71.7 tok/s on a short prompt). They also found a cliff: at 53,248 tokens of context, decode was 60–71 tok/s; at 61,440 it was 27.7 tok/s; and from 98,304 up, prefill fell to about 18 tok/s. VRAM after load stayed between 7.4 and 7.8 GiB, so the slowdown was not an out-of-memory error. Stay at or below 48K on 8 GB unless your own runs show otherwise.
Keep K and V the same type. The fork's CUDA builds compile flash-attention kernels only for the pairs q4_0-q4_0, q8_0-q8_0, f16-f16 and bf16-bf16 by default (GGML_CUDA_FA_QUANTS). Mixed pairs fall back to f16 with the warning "converting K and V to f16 instead (slow)". Bonsai-demo's KV-CACHE.md notes that a 4-bit K cache "loses a little accuracy" and decodes slightly slower than f16. q8_0 is the middle ground; one user reported "close to no measurable impact" from q8_0 for both caches (HF #9).
On SYCL, keep the KV cache in f16 while MTP is on. Prism's SYCL preset says "A 4-bit KV cache breaks drafting on SYCL", and fork #474 traces the cause. Its fix, PR #485, was open on 1 December.
Path 2: Stock llama.cpp
Step 1: Get b12808
b12808 is v1.1.0 plus 34 commits, and its common/arg.cpp and common/common.h are identical to v1.1.0's. It contains #33080, which makes -sm tensor fail with "use -sm layer" on Hadamard-folded models. Without it, v1.1.0 aborts with GGML_ASSERT(split_state.ne[j] % div == 0) (#33008). It is also the build used for the RTX 5070 Ti and DGX Spark runs in HF #22.
| Platform | Archive | CUDA runtime archive |
|---|---|---|
| Windows x64, CUDA 12.4 | llama-b12808-bin-win-cuda-12.4-x64.zip (370.2 MB) | cudart-llama-bin-win-cuda-12.4-x64.zip (391.4 MB) |
| Windows x64, CUDA 13.5 | llama-b12808-bin-win-cuda-13.5-x64.zip (232.7 MB) | cudart-llama-bin-win-cuda-13.5-x64.zip (426.3 MB) |
| Windows x64, Vulkan | llama-b12808-bin-win-vulkan-x64.zip (39.2 MB) | Not needed |
| Ubuntu x64, CUDA 12.8 | llama-b12808-bin-ubuntu-cuda-12.8-x64.tar.gz (227.3 MB) | cudart-llama-b12808-bin-ubuntu-cuda-12.8-x64.tar.gz (594.4 MB) |
| Ubuntu x64, Vulkan | llama-b12808-bin-ubuntu-vulkan-x64.tar.gz (37.2 MB) | Not needed |
| macOS, Apple silicon | llama-b12808-bin-macos-arm64.tar.gz (16.9 MB) | Not needed |
On Windows, both zips are flat. Extract them into one folder:
$b = "b12808"
New-Item -ItemType Directory -Force "$env:USERPROFILE\bonsai\stock" | Out-Null
Set-Location "$env:USERPROFILE\bonsai\stock"
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest "https://github.com/ggml-org/llama.cpp/releases/download/$b/llama-$b-bin-win-cuda-12.4-x64.zip" -OutFile llama.zip
Invoke-WebRequest "https://github.com/ggml-org/llama.cpp/releases/download/$b/cudart-llama-bin-win-cuda-12.4-x64.zip" -OutFile cudart.zip
Expand-Archive llama.zip -DestinationPath . -Force
Expand-Archive cudart.zip -DestinationPath . -Force
.\llama-server.exe --version
On Linux and macOS, building from the tag avoids separate runtime archives:
git clone --branch b12808 --depth 1 https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j --target llama-server
./build/bin/llama-server --version
Leave out -DGGML_CUDA=ON on macOS or for CPU only. Prebuilt binaries print their build number. A source build can print build 0, as in the log in #33008, so check the commit hash instead: b12808 is ed2153e. Any build older than b11556 loads the Q2_0 file silently and produces garbage. In PR #29600's own measurement, the master branch before the change gave a perplexity of 1,258,507 on the Bonsai 2 Q2_0 file, against 10.23 with the change.
Step 2: Download Q2_0
hf download prism-ml/Ternary-Bonsai-2.5-27B-GGUF \
Ternary-Bonsai-2.5-27B-Q2_0.gguf \
--revision 28a7093cc25bc151cc2b284c5570f12ce343fdcf \
--local-dir ~/models/bonsai-2.5
Take the plain Q2_0 file. Prism lists its fork as required for 2.5's MTP drafting, so on stock llama.cpp the -mtp file's extra 0.24 GB has no documented use. Stock v1.1.0 does define a draft-mtp type and a Qwen3.5 MTP graph, and two users report starting it on the Q2_0-mtp file (#33008, HF #15). Neither posted draft acceptance figures.
Step 3: Start llama-server
./build/bin/llama-server \
-m ~/models/bonsai-2.5/Ternary-Bonsai-2.5-27B-Q2_0.gguf \
--alias bonsai-2.5 \
--host 127.0.0.1 \
--port 8080 \
-ngl 99 -fa on -c 32768 -np 1 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0
The flags mean the same as in the fork table above. Drop -ngl 99 on cards under 12 GB so that --fit can place the layers. For two GPUs, add -sm layer. On Windows, run .\llama-server.exe with the same flags, using backticks for line continuation.
Path 3: Ollama (Unofficial)
No Ollama release note mentions Bonsai, and there is no official library model. Avoid the Hugging Face shortcut for now: ollama pull hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 resolves the tag by substring and downloads the PQ2_0 file. It then fails with unsupported tensor "output.weight" size overflows (ollama #19976, open; HF #23).
In that thread, rick-github, a collaborator on the Ollama repository, pointed to a copy they uploaded to Ollama's user library:
ollama run frob/ternary-bonsai-2.5
Its registry manifest lists a model layer with digest sha256:84496171… from Ternary-Bonsai-2.5-27B-Q2_0.gguf, and a projector layer sha256:6807ede6… from mmproj-Q8_0. Those are the same SHA-256 values as Prism's files in Step 2. The manifest declares Ollama's llamacpp runner, Ollama's qwen3.5 renderer and parser, and the card's thinking-mode sampling (min_p 0, temperature 1, top_k 20, top_p 0.95). Ollama v0.40.19 pins llama.cpp b12734 in LLAMA_CPP_VERSION, which is past b11556. Prism ML does not list Ollama as a supported runtime, and no public report checks this upload's output quality. A commenter on #19976 recommends verifying any third-party copy against Prism's checksums.
Path 4: MLX on Apple Silicon
Prism's MLX pack is one 8,595,477,990-byte model.safetensors, which its README describes as the 2-bit, group-128 language model and an FP16 vision tower, plus an optional 265,528,088-byte MTP head. It is not a stock mlx-lm checkpoint. Its quickstart.py explains that "the weights need transforms that stock MLX loaders do not apply", which is why mlx_lm.load() reports an unsupported model type. The pack ships its own loader in runtime/, which pins mlx==0.32.0, mlx-lm==0.31.3, mlx-vlm==0.6.3 and transformers==5.5.0. These commands follow its README, with the revision pinned:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install huggingface_hub
hf download prism-ml/Ternary-Bonsai-2.5-27B-mlx-2bit \
--revision aa432fd0e17612f6684e728d4d3c42b6656bcabb \
--local-dir ./bonsai-25-mlx
cd ./bonsai-25-mlx
python -m pip install -r runtime/requirements.txt
python quickstart.py "What is 2 plus 2?"
This runs Python code from the model repo, which is a good reason to keep the revision pinned. quickstart.py turns thinking off and stops at 256 tokens. The README at aa432fd says the pack accepts text and images, while the GGUF card and Bonsai-demo README still describe it as text-only. On an M5 Pro, Prism measured the MLX build at 348 tok/s prefill (pp512) and 21.7 tok/s decode, against 416 and 30.2 for llama.cpp on the same machine. On a Mac, the fork route in Step 4 is faster.
LM Studio's MLX engine is separate. Prism's Bonsai-demo notes that its own MLX setup "does not update LM Studio's separately bundled MLX runtime".
Smoke Test the Server
Send a prompt whose answer you can check, with a large token budget:
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "bonsai-2.5",
"messages": [{"role": "user", "content": "Solve 5x + 12 = 47. Show your work."}],
"reasoning_effort": "medium",
"max_tokens": 16384
}'
PowerShell users can avoid JSON quoting problems with Invoke-RestMethod:
$body = @{
model = "bonsai-2.5"
messages = @(@{ role = "user"; content = "Solve 5x + 12 = 47. Show your work." })
reasoning_effort = "medium"
max_tokens = 16384
} | ConvertTo-Json -Depth 5
$r = Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/chat/completions" -Method Post -ContentType "application/json" -Body $body
$r.choices[0].message.content
$r.timings
The answer is x = 7. On the fork with MTP on, timings.draft_n should be above zero. Prism's Bonsai-demo uses the fork's built-in chat UI at the same address, http://127.0.0.1:8080.
Reasoning effort. The template embedded in the GGUF accepts only xhigh (the default), medium and low. Any other value makes it raise "Unexpected reasoning effort", so a client that sends high gets an error rather than a fallback. The card says low "is not supported and when selected the model will behave close to xhigh", which leaves medium as the practical setting for interactive use. To set it for the whole server, use --reasoning-effort medium, which both builds pass straight to the template. At b12808, a request with "reasoning_effort": "none" turns thinking off; --reasoning off does the same for every request.
Tool calls. The template declares tools in a <tools> block and asks the model to reply with <tool_call><function=…><parameter=…> XML. Prism's TOOLS.md says the fork's llama-server, run with --jinja, accepts the standard OpenAI tools array on /v1/chat/completions and returns structured tool_calls. In HF #20, a user reports working tool calls through Hermes Desktop on fork b12178 at 55,000+ tokens of context. To connect a coding agent to the endpoint, see Run Claude Code Locally with Ollama for the client side.
Troubleshoot with the Known Issues
States were checked on 1 December 2026. Hugging Face discussions have no "fixed" state, so for those the workaround column says whether anyone posted one.
Loading and formats
| Symptom | Where it was reported | Fix or workaround |
|---|---|---|
Stock llama.cpp: tensor '…' has invalid ggml type 142. should be in [0, 44) (143 for PTQ1_0) | ggml/src/gguf.cpp range check; feature request #29058 (open) | Use the Q2_0 file, or the Prism fork. |
Q2_0 loads but produces nonsense | PR #29600 (merged 11 October) | Use b11556 or newer. This also applies to apps that bundle llama.cpp. |
Ollama: unsupported tensor "output.weight" size overflows after pulling hf.co/…:Q2_0 | ollama #19976 (open), HF #23 (open) | The tag resolved to the PQ2_0 file. See Path 3. |
Two GPUs with -sm tensor: abort with GGML_ASSERT(split_state.ne[j] % div == 0) | #33008 (closed by #33080) | Use -sm layer. From b12779, the server refuses -sm tensor with that advice. |
M5 Mac on macOS 26.1: the Metal mul_mm library fails to compile and every model fails to load | fork #505 (open) | GGML_METAL_TENSOR_DISABLE=1. A commenter reports the unmodified fork works after updating to macOS 26.7.3. |
Segfault in hipStreamCreateWithFlags on RX 9070 XT (gfx1201) | fork #506 (open) | A commenter found the release binary runs when given ROCm 7.2 runtime libraries instead of the system's 7.16. |
| RX 6600 (RDNA2): Prism's prebuilt binaries aborted, and Vulkan waited 10+ minutes before the first generation, then ran at 5.55 tok/s | HF #21 (open) | The reporter built the fork from source with HIP for gfx1032 and reports 20–22 tok/s at 32K context, using a derivative PTQ1_0 file. |
Memory and speed
| Symptom | Where it was reported | Fix or workaround |
|---|---|---|
Far more VRAM than expected; the log shows n_slots = 4 and kv_unified = 'true' | HF #1 (open; now in the card's Known issues) | -np 1. Commenters add --no-mmproj-offload. |
| Out of memory at the first request on 8 GB after upgrading the fork to b12232 | fork #502 (open) | Stay on prism-b12220-41c86f7. |
Decode collapses about 5× at -c 262144 with -np 4 or more | #30276 (open; Bonsai 2 PQ2_0 on RTX 5060 Ti) | Use -np 1 or 2 at full context. |
| Decode halves between 53K and 61K context on an 8 GB laptop GPU | Bonsai-demo #296 (open) | Stay at or below about 48K on 8 GB. |
| MTP slower than plain decoding on M1 and M2 Macs | HF #26 (open), fork #490 (open) | Drop the --spec-* flags, or apply the patch posted in HF #26. |
| SYCL with q4_0 KV: MTP about 2.3× slower per step | fork #474 (open; fix PR #485 open) | Use an f16 KV cache with MTP on SYCL. |
| "no FlashAttention vector kernel compiled for K/V types … converting K and V to f16 instead (slow)" | fork #478 (closed) | Use matching K and V types, or rebuild with -DGGML_CUDA_FA_QUANTS listing your pair, as in HF #27. |
Output and serving
| Symptom | Where it was reported | Fix or workaround |
|---|---|---|
| Thinks for a very long time, or loops in agents | HF #6 (open), HF #12 (open) | Use reasoning_effort medium and keep temperature at 1.0, as the card recommends; one user saw infinite loops at 0.2 (HF #14). A commenter suggests --repeat-penalty 1.05 and fewer drafts; Prism has not endorsed that. |
| Template error "Unexpected reasoning effort …" | Chat template in the GGUF | Send only xhigh, medium or low. |
Two slots with 125K–140K prompts each produce only !!!!, and MTP acceptance drops to 0 | fork #462 (open) | The reporter's single-slot 250K run was correct. Use -np 1 for very long prompts. |
MTP plus image requests: intermittent CUDA error: an illegal memory access | fork #463 (open) | None posted. Run without drafting if you send images. |
| Server stops serving a slot: 100–150% CPU, GPU idle, no error (ROCm gfx1100, MTP) | fork #465 (open) | None posted. The reporter needed SIGKILL to stop it. |
Generation stops at 21,391 tokens despite -c 65536 | HF #7 (open) | No replies yet. |
What Performance to Expect
Prism ML's measurements
These are Prism ML's numbers, from its model card and presets. They have not been independently reproduced. Plain decoding is llama-bench tg128, and prefill is pp2048, at batch 1 on one GPU with flash attention on, on the current fork runtime:
| Device | PTQ1_0 decode | PQ2_0 decode | PTQ1_0 prefill | PQ2_0 prefill |
|---|---|---|---|---|
| RTX 5090 | 163 | 143 | 4,198 | 4,163 |
| RTX 4090 | 112 | 98 | 3,452 | 3,444 |
| RTX PRO 6000 | 158 | 137 | 4,283 | 4,223 |
| NVIDIA L40S | 95 | 82 | 3,018 | 3,057 |
| NVIDIA H100 | 186 | 177 | 2,987 | 3,401 |
| Apple M5 Pro (Metal) | Not given | 30.2 | Not given | 416 (pp512) |
The next table shows MTP drafting on the released builds named in the presets, measured on 24 November: prism-b12128-d7b2896 for CUDA and Metal, and a community build for SYCL. It uses llama-server on 36 internal prompts (18 on the Mac), greedy decoding, one request at a time, with prefill on an 8,192-token prompt. The setting is tokens drafted and minimum draft probability.
| Device and file | Setting | Decode, MTP off | Decode, MTP on | Prefill 8K, off → on |
|---|---|---|---|---|
| RTX 5090, PTQ1_0-mtp | 3, 0.1 | 174.2 | 305.1 (1.75×) | 4,220 → 3,673 |
| RTX 4090, PTQ1_0-mtp | 3, 0 | 113.3 | 214.6 (1.89×) | 3,370 → 2,947 |
| H100 SXM, PTQ1_0-mtp | 3, 0.1 | 186.1 | 284.7 (1.53×) | 2,946 → 2,583 |
| A100, PTQ1_0-mtp | 3, 0.1 | 105.3 | 171.9 (1.63×) | 1,375 → 1,278 |
| M4 Pro (Metal), PQ2_0-mtp | 1, 0.6 | 22.19 | 25.17 (1.13×) | 122.6 → 118.9 |
| Core Ultra laptop iGPU (SYCL, community build), PTQ1_0-mtp | 8, 0.6 | 11.02 | 21.26 (1.93×) | 210.1 → 199.7 |
The launch post quotes 291 tok/s on an H100 and 204 tok/s on an RTX 4090. Those match the card's MTP table, whose values the CUDA preset records as measured on a testing build (base d12ca13bb) rather than a release. The H100 figure is the card's "+kernels" column, which adds kernels the preset marks "not released". Prism also measured the Q2_0 file on stock llama.cpp on an H200 at 109 tok/s decode, against 150 on its own runtime, with the same top token at 99.3% of positions.
Third-party reports
Each figure below comes from the named user, on their own hardware and build:
| Reported by | Hardware | Runtime, file and settings | Prompt processing | Generation |
|---|---|---|---|---|
| Markproto (HF #22) | RTX 5070 Ti 16 GB | Stock llama.cpp b12808 (official CUDA image), Q2_0, no MTP, thinking off, 8K context, 8.1 GB used | About 2,060 tok/s (4,348-token prompt) | 73.6 tok/s |
| Markproto (same thread) | DGX Spark (GB10) | Stock b12808, Q2_0, 8.7 GB used | About 890 tok/s | 25.7 tok/s |
| FreddyKrugger (HF #17) | RTX 3080 10 GB, Windows 11 | Fork b12178, PTQ1_0-mtp with MTP on, 65K context, no vision | 1,141–1,176 tok/s (2K prompt) | 137–147 tok/s |
| majmichu1 (HF #14) | RTX 5060 Laptop 8 GB | Fork b12178, PTQ1_0-mtp, MTP, 54,016 context, q4_0 KV | Not given | 70.3 tok/s; 75 of 78 coding-agent tries passed on the reporter's benchmark |
| RatherBeAnonymous (HF #20) | RTX 3070 8 GB, Windows 10 | Fork b12178, PTQ1_0-mtp with drafting off, 64K context, q4_0 KV, --fit-target 300 | 543 tok/s (13,345-token prompt) | 42.7 tok/s short prompts; 18–37 tok/s deeper into long agent runs |
| mktnhr (HF #27) | RTX 2060 SUPER 8 GB | Fork b12232 built for SM75, PTQ1_0-mtp, 1 draft, K q5_1 / V pq2_0m, 57K context | 137.8 tok/s (62-token prompt) | 57.3 tok/s, 70.9% of drafts accepted |
| capistran (HF #26) | M2 Pro 16 GB | Fork b12178, PQ2_0-mtp, 16K context | 81 tok/s (2.4K prompt) | 14.5 tok/s plain; 13.3 with the Metal preset |
| nerun (HF #15) | RX 6600M 8 GB | Stock llama.cpp (build not stated), Q2_0-mtp, draft-mtp 1 draft, q8_0/q4_0 KV, 425 MB in system RAM | Not given | 12.82 tok/s |
The fastest consumer results here all run PTQ1_0 on the fork with every layer on the GPU. The RTX 3070 numbers show what spilling costs: with 61 of 66 layers on the GPU at 64K, the same reporter measured 16.63 tok/s, against 42.71 with all 66.
Benchmarks and the 4-bit Comparison
Prism ML's benchmarks
All numbers are Prism ML's own, from the card, with every model run in thinking mode at reasoning effort xhigh. Sizes are the published GGUF files. The baselines are other low-bit builds of the same base model.
| Benchmark | Qwen3.8 FP16 (53.8 GB) | GSQ-RCO IQ3_XXS (10.1 GB) | Unsloth UD-IQ2_XS (7.6 GB) | Bonsai 2 27B (5.93 GB) | Bonsai 2.5 27B (5.93 GB) |
|---|---|---|---|---|---|
| τ²-Bench | 80.6 | 77.7 | 82.0 | 80.2 | 82.0 |
| τ³-Bench | 72.8 | 70.7 | 67.2 | 69.1 | 73.9 |
| BFCL v3 (native) | 71.2 | 71.6 | 71.5 | 70.3 | 72.6 |
| BFCL v4 | 70.8 | 70.6 | 66.2 | 64.4 | 67.2 |
| AppWorld | 93.2 | 86.1 | 89.6 | 51.2 | 90.5 |
| Tool-calling average (5) | 77.7 | 75.3 | 75.3 | 67.0 | 77.2 |
| Terminal-Bench 2.1 | 70.8 | 66.3 | 53.9 | 52.8 | 60.1 |
| SWE-bench Verified | 80.6 | 73.2 | 71.8 | 60.8 | 75.6 |
| DeepSWE | 30.1 | 27.0 | 17.7 | 0.0 | 27.0 |
| Agentic coding average (3) | 60.5 | 55.5 | 47.8 | 37.9 | 54.2 |
| General capability, 5-category average | 84.32 | 81.72 | 77.45 | 81.55 | 82.12 |
The general-capability average covers knowledge, math, coding, instruction following and vision. The whitepaper's prose gives 82.3 against 84.4 for the same comparison, while its own table matches the card's 82.12 and 84.32. Prism names Terminal-Bench 2.1 as the agentic benchmark where it remains furthest from FP16. It also says it has not measured workloads that run for hours across many context windows.
Against Qwen3.8-27B at ordinary 4-bit
Prism's tables include no 4-bit build. The largest conventional build it compares against is GSQ-RCO IQ3_XXS, at 3.00 bits per weight and 10.1 GB. For scale, Unsloth's Qwen3.8-27B-UD-Q4_K_M.gguf is 16,564,259,744 bytes (16.56 GB) at commit 4af51b3 of unsloth/Qwen3.8-27B-GGUF. That is 2.16 times the Q2_0 file and 2.76 times the PTQ1_0 file.
The only public side-by-side found comes from Markproto in HF #22. They ran Bonsai Q2_0 against their own Q4_K_M of Qwen3.8-27B (17.0 GB, made from the official weights with llama.cpp's quantize). Both ran on llama.cpp b12808 on a DGX Spark, at temperature 0 with thinking off unless noted. The reporter calls these "small samples, our own tasks, one quant each".
| Test (count) | Bonsai 2.5 Q2_0 | Qwen3.8-27B Q4_K_M |
|---|---|---|
| Decode speed, 400 tokens after a 4,348-token prompt | 25.7 tok/s in 8.7 GB | 12.0 tok/s in 17.3 GB |
| Rule-following prompts, IFEval style (30) | 28 | 27 |
| Plain arithmetic (60) | 51 | 58 |
| GSM8K (250) | 231 | 234 |
| GSM-Plus pairs, both versions right (100) | 85 | 81 |
| CRUXEval-O (250) | 222 (no answer line on 22) | 239 |
| GSM8K with thinking on, 4,096-token cap (30) | 28 (2 ran out of room) | 30 |
| Needles at 4K, 8K and 16K (18) | 18 | 18 |
| Money transactions: direction correct (35) | 23 | 35 |
| Seven-field records fully right (40) | 38 | 38 |
| Says "the passage doesn't say" when the answer was removed (400) | 395 | 378 |
| Fill-in questions answered from passages (400) | 303 | 344 |
| Replies carrying a planted-instruction marker (50, lower is better) | 17 | 19 |
Prompt reading was about 890 tok/s for both models and for BF16. The reporter's summary: at half the memory and twice the plain decoding speed, Q2_0 "holds up well against its full-size base on most of this", with the gap on arithmetic, code-output prediction and one consistent labelling error. Treat it as one data point, not a benchmark.
Practical Verdict
- NVIDIA, 8 to 12 GB: use the fork and
PTQ1_0-mtp. On 8 GB, add a q4_0 KV cache, keep context near 48K and always set-np 1. The PTQ1_0 file is what lets a 27B model fit entirely on these cards, and the public reports show large drops in speed whenever layers or buffers spill out of VRAM. - NVIDIA, 16 GB or more: both routes work. The fork with MTP is the faster route in Prism's numbers. Stock b12808 with
Q2_0is the simpler route, at 73.6 tok/s plain decoding on an RTX 5070 Ti in one report. - Apple silicon: use the fork with
PQ2_0-mtp. Try with and without the draft flags, because MTP gains on Macs are small and negative on M1 and M2 in one report. - Any runtime: set reasoning effort to
mediumfor interactive work, and givemax_tokensroom for thinking.
Record the build, the file's SHA-256 and the revision with your results. Both the fork and upstream are changing quickly: the fork published three releases between 24 and 26 November, and the PTQ1_0 upstream review is still open.
What to Read Next
- Run LLMs Locally: 6 Practical Methods: Ollama, LM Studio, vLLM, llama.cpp and others compared
- Run Inkling 2 Mini Locally with llama.cpp, Ollama and MLX: the same sizing method on another current 27B-class open model
- Host and Run Qwen3.8-Flash Locally: Unsloth GGUFs on llama.cpp for a sibling of Bonsai's base model
- Benchmark vLLM Speculative Decoding with EAGLE, n-gram, and MTP: how draft-and-verify decoding is measured, including MTP heads
- Run Claude Code Locally with Ollama: connect a coding agent to a local model
- VRAM calculator: budget memory for other models before you download them
Frequently asked questions
Can stock llama.cpp run Ternary Bonsai 2.5 27B?
Only the Q2_0 files. Support for the Bonsai 27B family, including the Hadamard activation transform its weights need, was merged in llama.cpp PR #29600 on 11 October 2026 and first shipped in build b11556. Older builds load Q2_0 without a warning and produce garbage: the PR shows a perplexity of about 1.26 million on the old master against 10.23 with the change. PQ2_0 and PTQ1_0 use Prism-only tensor types 142 and 143, which stock llama.cpp rejects as an invalid ggml type, so they need Prism ML's llama.cpp fork.
Which Ternary Bonsai 2.5 GGUF file should I download?
On an NVIDIA GPU with Prism ML's fork, use Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf (6.23 GB); Prism measured PTQ1_0 as the faster decoder on every NVIDIA GPU it tested. On Apple silicon with the fork, use PQ2_0-mtp (7.49 GB), the packing Prism benchmarked on Metal. On stock llama.cpp, apps with a bundled llama.cpp, or Ollama, use Q2_0 (7.67 GB). All three hold the same ternary weights, and each -mtp file adds a 0.24 GB draft head.
How much VRAM does Ternary Bonsai 2.5 27B need?
The weights take 5.58 GiB (PTQ1_0) to 7.15 GiB (Q2_0). By arithmetic from the config, only the 16 full-attention layers keep a KV cache, at 64 KiB per token in f16: 2 GiB at 32K tokens and 16 GiB at the full 262,144. The 48 linear-attention layers add about 150 MiB of fixed state per server slot. Users report running PTQ1_0 with a q4_0 KV cache at 48K to 64K tokens of context on 8 GB NVIDIA cards with the Prism fork.
Does MTP speculative decoding work on stock llama.cpp?
Prism ML lists its fork as required for Bonsai 2.5's built-in MTP drafting, and all of its MTP presets target the fork. There, Prism reports 1.5x to 1.8x faster decode on NVIDIA GPUs with --spec-type draft-mtp. Stock llama.cpp v1.1.0 also has a draft-mtp type and a Qwen3.5 MTP graph, but Prism does not document that route for this model, so use the plain Q2_0 file there.
Does Ollama support Ternary Bonsai 2.5 27B?
There is no official Ollama library model or release note for it. Pulling hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 fetches the PQ2_0 file instead and fails with 'unsupported tensor output.weight size overflows' (Ollama issue #19976, open). An Ollama collaborator published frob/ternary-bonsai-2.5, whose model and projector layers are byte-identical to Prism's Q2_0 and mmproj-Q8_0 files. Ollama v0.40.19 bundles llama.cpp b12734, newer than the b11556 that Q2_0 needs, but Prism ML does not list Ollama as a supported runtime.
Why does Ternary Bonsai 2.5 think for so long?
Its chat template defaults to xhigh reasoning effort. Set medium per request with reasoning_effort, or for the whole server with --reasoning-effort medium. The model card says low is not supported and behaves close to xhigh, and the template raises an error for any value other than xhigh, medium or low. Leave a large output budget: the card's own commands use -n 16384, because a small cap ends generation mid-thought.
Related Guides
Run GigaChat 4 37B-A4B Locally with llama.cpp (PR #32767 Build)
Run GigaChat 4 37B-A4B on an 8 GB GPU with the llama.cpp PR build: real GGUF sizes, MoE expert offload, MTP, tool calls and the noncommercial license.
Run Tencent Hy-MT3 Locally: 30B-A3B Translation on llama.cpp v1.1.0
Run Tencent's Hy-MT3-30B-A3B translation model on llama.cpp v1.1.0: the exact prompt template, real GGUF sizes, memory math and a batch file translator.
Run Inkling 2 Mini Locally with llama.cpp, Ollama and MLX (v1.1.0)
Run Inkling 2 Mini locally with llama.cpp v1.1.0, Ollama or MLX: real file sizes, pinned commands, and what the op-offload fix changes on small GPUs.