Get a binary
The demo repo’ssetup.sh downloads a compatible build automatically into bin/. To grab one yourself, use the PrismML llama.cpp release, which covers 1-bit and ternary on macOS (Apple Silicon and Intel), Linux (CPU / CUDA 12.4 / CUDA 12.8 / Vulkan / ROCm), Windows (CPU / CUDA / Vulkan / HIP), and iOS (XCFramework). The full variant list is in Formats & runtime support.
Run a chat
-c 0auto-fits the context window to available memory; pass an explicit value (e.g.-c 32768) to pin it and bound memory use. Memory-per-context numbers are on each model card.- The sampling flags are Bonsai’s recommended defaults.
-ngl 99offloads all layers to the GPU (the wrapper script sets this automatically when a GPU is present).
Bonsai 27B needs two extra flags:
--mmproj <path>.gguf for image input, and --jinja for native OpenAI-style tool_calls (the demo scripts already pass both).Start a server
Build from source
If the pre-built binaries don’t cover your platform or you want a specific backend:| Target | CMake flag |
|---|---|
| CUDA | -DGGML_CUDA=ON |
| Metal | -DGGML_METAL=ON (default on macOS) |
| Vulkan | -DGGML_VULKAN=ON |
| ROCm / HIP | -DGGML_HIP=ON |
prism branch is required for ternary Q2_0. For 1-bit only, upstream llama.cpp works too. The demo repo also has ready-made build scripts: scripts/build_mac.sh, scripts/build_cpu_linux.sh, scripts/build_cuda_linux.sh, and scripts/build_cuda_windows.ps1.