If you are sizing a GPU for PrismML’s new Ternary Bonsai 2.5 27B, ignore the file size. The model’s 6.2 GB file stores each of its 27 billion weights in just 1.76 bits, occupying only 5.5 GiB of VRAM. This makes it look like a perfect fit for an 8 GB card. However, when running at its full 262,144-token context on an H200 NVL, llama.cpp consumed 26.2 GiB of memory. The bottleneck isn’t the model weights; it is the KV cache required to maintain that massive context window.
The Memory Math: Cache vs. Weights
The disparity comes from how llama.cpp handles attention layers. Of Bonsai’s 64 layers, 16 use full attention, which requires a dynamic cache that grows with every token. Our measurements show this cache costs 70 KiB per token at the default 16-bit precision. At the maximum 262K context, this alone eats up 17.5 GiB. The remaining 48 layers use linear attention with fixed states, but the total footprint for weights, buffers, and cache still hits 26.2 GiB for four concurrent requests. To fit this on a 24 GB card, you must quantize the cache to 8 bits (18.7 GiB total) or 4 bits (14.7 GiB total).
Build Flags and Multi-Token Prediction
Serving this model requires PrismML’s specific fork of llama.cpp, pinned to a specific CCCL library version. If you build from source without the correct CCCL version, the Multi-Token Prediction (MTP) layer fails to accept any drafts, rendering it useless. When correctly configured, MTP speeds up single-user inference from 175 to 204 tokens per second. However, do not enable MTP for multi-user setups. Our tests showed that with four concurrent requests, MTP actually slowed performance down to 260 tokens per second total, compared to 281 tokens per second without it.
Benchmarking Against Qwen3.8-27B FP8
We compared Bonsai against Qwen3.8-27B FP8, the model it was quantized from, on the AppWorld agent benchmark. Bonsai finished 57 of 72 tasks, slightly outperforming Qwen’s 52. The cost per task was also lower for Bonsai at $0.049 versus Qwen’s $0.075. However, speed is a major trade-off. Bonsai took a median of 195 seconds per task, while Qwen completed them in just 28 seconds. This slowdown is largely due to Bonsai’s server lacking prompt caching for our API setup, forcing it to re-read 20,000+ token prompts on every request.
Key Takeaways
- Size your GPU for context length, not file size; a 24 GB card cannot hold the 16-bit cache for the full 262K context.
- Use 8-bit cache quantization (-ctk q8_0 -ctv q8_0) to fit the full context on 24 GB cards, reducing usage to 18.7 GiB.
- Enable MTP only for single-user inference; it degrades throughput when handling concurrent requests.
- Build with the pinned CCCL version, or the MTP layer will silently fail to predict tokens.
The Bottom Line
Ternary quantization solves the weight storage problem but exposes the context memory bottleneck. Do not buy a 24 GB card expecting to run full 262K context without quantizing the KV cache to 8 or 4 bits.