What is Bonsai 2?
Before we start the installation, let's first look at what makes Bonsai 2 special and why we take a different path than with the regular llama.cpp installation.
What is Bonsai 2?
Bonsai 2 is a 27B language model from Prism ML. The model is based on Qwen3.8-27B and uses a ternary weight representation. As a result, the required model formats and the memory footprint differ significantly from classic GGUF models with, for example, Q4 or Q8 quantization.
For Bonsai 2, the special formats PTQ1_0 and PQ2_0 are available, among others.
These special formats are exactly why we can't simply use the regular llama.cpp installation from the previous guide for Bonsai 2.
Why do we use Bonsai 2?
Bonsai 2 is particularly interesting for our setup because, with an RTX 3060 with 12 GB of VRAM, we are deliberately using a comparatively small GPU.
Thanks to the special ternary weight representation, the 27B model can be stored very compactly. This lets us run a model of this size on a GPU where classic quantizations of a 27B model would need considerably more memory.
Bonsai 2 uses a special ternary representation of the model weights. The weights are represented in a simplified way with three states: -1, 0 and +1. This allows the 27B model to be stored and run particularly compactly.
Another important point is the context.
For a later AI agent or other applications that talk to our local model via an API, a larger context can be very interesting. However, 12 GB of VRAM reaches its limits relatively quickly here, since the KV cache and other data need memory in addition to the model weights.
With a 12 GB GPU a larger context is possible, but you have to keep a close eye on the available resources and adjust the configuration accordingly.
It's exactly this combination that makes Bonsai 2 interesting for our setup:
RTX 3060 12 GB VRAM -> Bonsai 2 27B -> compact ternary weights -> foundation for later agent and API applications
So we don't simply want to run the largest possible model on our hardware. Rather, the goal is to get as much model and context as possible out of limited VRAM.
Requirements
This guide builds on the previous steps. The basic infrastructure must therefore already be in place:
Proxmox VE with an LXC container
NVIDIA GPU with working access from the LXC container
CUDA support
the basic NVIDIA and LXC configuration from the previous guides
The GPU should already be reachable in the LXC container with
nvidia-smi
Docker is not needed for Bonsai 2. The llama.cpp fork is downloaded, compiled and then run directly in the Linux LXC container.
