Skip to content
Machines & local modelsmedium signalverified

llama.cpp now runs PrismML's ternary Bonsai 2 27B without the company's fork

Build b11556 adds the weight rotation step that Bonsai 2 27B was missing in stock llama.cpp. The 7.63 GB Q2_0 file now gives correct output there, while PrismML's smaller PQ2_0 and PTQ1_0 packs still require the company's own build.

By Redakcija WebAiRadarPublished 2 min readwritten by a model

Source

llama.cpp b11556

llama.cpp · Original published October 11, 2026

Stock llama.cpp can now run Bonsai 2 27B, a model from PrismML whose weights take only three values: −1, 0, and +1. Build b11556, published on October 11, 2026, adds the runtime step those weights depend on. Until then the model needed PrismML's own fork of llama.cpp, and the standard build loaded the file without a warning and produced gibberish.

What changed in llama.cpp

PrismML stores the Bonsai 2 weights in a rotated form. Before the weights are reduced to three values, each matrix goes through a Hadamard rotation, a fixed mathematical mixing of values that makes them easier to compress. The rotation is baked into the stored weights. The runtime therefore has to apply the same transform to the activations, the intermediate values the model computes while it runs. Skip that step, and weights and activations no longer match, so the output is meaningless.

The change reads the rotation from the metadata in the GGUF model file and applies it during inference. The conversion script writes that metadata when a checkpoint comes with PrismML's description of the rotation. It refuses model architectures where the runtime would not apply the transform, so a converted file either runs correctly or fails to convert.

In the pull request, the author reports a perplexity ratio of 1.0001 on Apple's Metal and 0.9995 on CUDA, measured on the same file against PrismML's fork. Perplexity measures how well a model predicts a test text, so a ratio close to 1 means the two runtimes behave almost identically. Without the change, the same test gave a perplexity above 1.2 million.

Which file works, and which still does not

The change covers the Q2_0 packing, a 7.63 GB file that PrismML keeps in a separate testing repository on Hugging Face. The file name still says the fork is required, because it was published before upstream support existed.

PrismML's main repository offers two smaller packings, PQ2_0 at 7.21 GB and PTQ1_0 at 5.95 GB. They use quantization types that mainline llama.cpp does not know, and this change does not add them, so those files still need the fork. For comparison, the same model at 16-bit precision (FP16) takes about 54 GB.

Bonsai 2 rotates its weights in blocks of 1,024 values. CUDA kernels, the routines that run on the graphics processor, for block widths above 512 were merged into llama.cpp on October 7, 2026. The matching kernels for Vulkan are still in review.

What Bonsai 2 27B is

Bonsai 2 27B is derived from Qwen3.8-27B and has 27.36 billion parameters. Each weight is −1, 0, or +1, and every group of 128 weights shares one scale factor. PrismML puts the whole model at 1.72 bits per weight. The weights are released under the Apache 2.0 license.

PrismML says the model keeps 98.2% of the full-precision model's score across 14 benchmarks run in thinking mode. That is the vendor's own measurement, and it has not been confirmed independently.

Sources

Related

LLAMA.CPP0.6.0GLM-5.3-Flash and a server API for decision mo
Machines & local modelsmedium signal

llama.cpp 0.6.0 adds GLM-5.3-Flash support and a server API for decision models

The llama.cpp project released version 0.6.0 on October 5, 2026. It adds support for GLM-5.3-Flash, a model for text and images with 320 billion parameters, and a new server endpoint for decision models. Two changes to speculative decoding come with measurements from their authors, one on Nvidia's DGX Spark and one on Apple GPUs. The release also changes the C API and raises the version of the saved session format, so programs built on the library need a check before you upgrade.

llama.cppverified

LLAMA.CPP0.5.0a new architecture and a multi-address server
Machines & local modelsmedium signal

llama.cpp 0.5.0 adds the HRM-Text architecture and lets its server listen on several addresses

The llama.cpp project released version 0.5.0 on September 23, 2026. It adds support for HRM-Text, the architecture behind DFM Mimir 1B, and conversion for MiMo-V2.6. The server can now listen on several addresses at once, and router mode no longer passes the API key file to the model processes it starts.

llama.cppverified