git, curl, and enough disk for the model you pick (see the lineup). Everything else, including Python tooling and the inference engine, is installed by the setup script.
If you skip step 2, setup uses its default,
BONSAI_MODEL=27B: Ternary Bonsai 2 27B, a 7.8 GB download (the PQ2_0 packing plus the vision projector), and the MLX pack as well on Apple Silicon. The smaller sizes are 9B (about 3 GB), 4B (about 1.5 GB), and 2B (under 1 GB).Install and run
1
Clone the repo
2
Choose your model (optional)
3
Run setup
BONSAI_MODEL and run ./scripts/download_models.sh (or re-run setup).4
Chat
BONSAI_MODEL on these commands too if you chose a size other than 27B. The model thinks before it answers. For a short direct reply, add --no-think to run_mlx.sh; on the 9B, 4B, and 2B, BONSAI_THINKING=0 does the same for every launcher.Start a server instead
Prefer a browser UI or an API endpoint? The repo ships an OpenAI-compatible server:./scripts/start_openwebui.sh starts the server and Open WebUI together. See Run the server for flags, sampling defaults, and API examples.
What setup actually does
Even on a fresh machine,setup.sh / setup.ps1:
- Installs system build tools (Xcode Command Line Tools on macOS,
build-essentialon Linux) - Installs uv and creates a Python virtualenv in
.venv/ - Downloads the selected model from Hugging Face into
models/: thePQ2_0GGUF, its vision projector, and on Apple Silicon the MLX pack - Downloads pre-built llama.cpp binaries for your platform into
bin/, pinned to a tested release; if no archive matches your platform, setup stops and points you at the build scripts - On Apple Silicon, creates a second virtualenv,
.venv-vlm/, with the pinned mlx-vlm runtime that loads Bonsai 2 natively - Installs Open WebUI and the code-interpreter venv (
.venv-jupyter) for the agentic demo, a few GB more and most of the wait; skip withBONSAI_OPENWEBUI=0andBONSAI_CODE_INTERPRETER=0
uv goes into ~/.local/bin, and everything else lives inside the Bonsai-demo directory, so deleting it removes the rest.
Next steps
Run the server
The OpenAI-compatible endpoint, its defaults, and API examples.
Connect your tools
Hermes, LM Studio, and anything OpenAI-compatible.
Pick the right model
Size and format trade-offs with real numbers.
Troubleshooting
Port conflicts, slow generation, models that won’t load.