#8080th of 109 in Model serving
bonsai-demo
Launcher scripts for running Bonsai 2 ternary-quantized LLMs locally via llama.cpp or MLX
- Stars
- 3.6k
- License
- Apache-2.0
- Last commit
- Nov 2026
- Language
- Shell
780 on 2 May 20263,573 on 21 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Shell scripts that download Bonsai 2 models (2B, 4B, 9B, 27B; ternary, about 1.75 bits per weight) and run them through a PrismML llama.cpp fork or MLX on Apple Silicon. They start llama-server with a built-in chat UI on port 8080, with vision, tool calling and MCP. An optional Open WebUI demo runs on port 9090.
Who it is for: Self-hosters trying PrismML's Bonsai low-bit models on Mac, Linux or Windows
Strengths
- 27B default download is 7.8 GB in PQ2_0 packing, plus a vision projector
- Auto-detects Metal, CUDA, ROCm or Vulkan; BONSAI_NGL=0 forces CPU-only
- Context up to 262,144 tokens; optional 4-bit KV cache cuts KV memory roughly 3.5x
- Native OpenAI-style tool calls, MCP client and image input in the chat UI
Weaknesses
- PQ2_0 and PTQ1_0 formats need the PrismML llama.cpp fork, not upstream
- Only Bonsai models are supported; this is not a general model server
- Default setup also installs Open WebUI and a Jupyter venv, adding several GB
- MLX path for 2B/4B/9B uses standalone launchers; Open WebUI MLX integration is 27B only
What it needs
- GPU optional
- Needs llama.cpp (PrismML fork), uv, Hugging Face, Open WebUI (optional), mlx-vlm (Apple Silicon)
- Models: Bonsai 2 2B, Bonsai 2 4B, Bonsai 2 9B, Bonsai 2 27B, GGUF (PQ2_0, PTQ1_0, Q2_0)
- port 8080
Known problems
Reported, then fixed by a linked change
- start_llama_server.ps1 fails on Windows due to JSON quoting in --chat-template-kwargs ↗ (opens in a new tab)2 reactions · closed 18 Apr 2026Fixed by Fix Windows llama-server startup by preserving chat-template kwargs with PowerShell-safe JSON escaping ↗ (opens in a new tab)
- Context should not be specified with `-c 0` otherwise fitting fails. ↗ (opens in a new tab)0 reactions · closed 22 Jul 2026Fixed by scripts: make BONSAI_CTX=0 a safe default instead of -c 0 (full context) ↗ (opens in a new tab)
- Pre-built llama.cpp binaries: Metal fails to compile on macOS 26 Tahoe (M5) ↗ (opens in a new tab)0 reactions · closed 20 Jul 2026Fixed by readme/agents: document M5 Metal tensor-API failure on macOS 26 and its workaround (#93) ↗ (opens in a new tab)
- bug(deps): open-webui 0.10.2 routers/audio requires Python *strictly* <3.13 (or traceback) ↗ (opens in a new tab)0 reactions · closed 20 Jul 2026Fixed by deps: cap requires-python below 3.13 ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Model serving
See all 109| Rank | Project | Score |
|---|---|---|
| #78 | kvcachedElastic KV cache for vLLM and SGLang using GPU virtual memory | 61 out of 100 |
| #79 | Text Generation Web UILocal LLM chat UI and API with five switchable loader backends | 60 out of 100 |
| #81 | production-stackHelm-deployed vLLM cluster with request router and Grafana monitoring | 59 out of 100 |
| #82 | exllamav3Inference library with EXL3 quantization for LLMs on consumer GPUs | 59 out of 100 |
| #83 | zmlZig and MLIR inference stack compiling models for GPUs, TPUs and Trainium | 58 out of 100 |