Skip to main content
Bonsai 2 ships in two formats. Which you want depends on your hardware and the runtime you plan to use.

GGUF

For llama.cpp and the ecosystem built on it. Cross-platform: CPU, CUDA, Metal, Vulkan, ROCm, SYCL.

MLX

Apple’s array framework, tuned for Apple Silicon. The native path on M-series Macs, and what the iPhone and iPad apps build on.
On a Mac, both work: decode speed is comparable (the demo’s M4 Pro measurements put llama.cpp Metal slightly ahead), and GGUF is more portable across tools. Everywhere else, use GGUF.

The three GGUF packings

Every Bonsai 2 GGUF repo holds the same ternary weights in three layouts. They differ in file size, unpack cost, and which runtime reads them. PQ2_0 is what the demo downloads: cheaper to unpack than PTQ1_0, so prompt processing is faster everywhere, and it is the pack measured on Apple Silicon. PTQ1_0 is the smallest file and the faster decode on Ada-generation GPUs and the L4. Q2_0 is the one to use with a stock llama.cpp. The 27B’s Q2_0 lives in Ternary-Bonsai-2-27B-gguf-dev. Bonsai 2 needs more than format decoding: the weights sit in a rotated basis, so the runtime must apply the matching Hadamard transform to activations, along with the model’s sign flips. A runtime that knows the Q2_0 type but not Bonsai 2 loads the file and produces gibberish.

Runtime support

llama.cpp

Bonsai 2 model support, including the Hadamard activation runtime, is merged in upstream llama.cpp (ggml-org/llama.cpp#29600, October 2026). The PTQ1_0 type is under review upstream (#29672); PQ2_0 is PrismML’s own ggml type. The PrismML binaries are upstream llama.cpp plus the PQ2_0 and PTQ1_0 kernels and the drafters, built for every platform listed below; setup.sh pins a tested release. Backend coverage in those builds: CPU, Metal, CUDA, ROCm/HIP, Vulkan, and SYCL. On Vulkan and SYCL the PQ2_0 and PTQ1_0 kernels exist, but kernel selection depends on the device and driver. The demo repo’s backend support table has the audited matrix.
Older upstream builds load Q2_0 and output gibberish. Builds before b11555 know the Q2_0 type and the Qwen3.5 architecture but lack the Hadamard runtime, so nothing makes them refuse the file. If you see nonsense from Bonsai 2, check the build before anything else. PQ2_0 and PTQ1_0 fail safely on upstream: they are refused as unknown types.

MLX

Everything runs on stock MLX packages; no fork is needed. The demo’s setup.sh creates .venv-vlm with pinned, tested versions (mlx 0.32.3, mlx-vlm 0.7.8, mlx-lm 0.32.0). The earlier families’ MLX runtime is covered in Bonsai1_README.md.

Apps that bundle their own engine

LM Studio, Ollama, Locally AI, and similar apps ship their own llama.cpp or MLX runtime. Compatibility follows the version and model loader they bundle, not the file extension: a Bonsai 2 GGUF needs a llama.cpp from b11555 or newer and the Q2_0 file, and a Bonsai 2 MLX pack needs a loader with Bonsai 2 support. Until an app updates, run the model through the demo’s server and point the app at that endpoint instead.

Pre-built binaries

The latest PrismML llama.cpp release (prism-b10777-e3de715) ships archives for: setup.sh in the demo repo pins a tested release and picks the right archive automatically; a pinned release can list slightly fewer variants while builds finish. Build-from-source instructions are on the llama.cpp page.