Ternary Bonsai 2.5 27B GGUF: 1.76-Bit Local Agent Inference

Ternary Bonsai 2.5 27B GGUF is Prism ML's 1.76-bit-per-weight agentic release built on Qwen3.8-27B hybrid attention. Fitting into 5.93 GB versus 53.8 GB in FP16, it preserves FP16-level tool calling (77.2 vs. 77.7 average across five benchmarks) and 90% of FP16 agentic coding scores while reaching ~300 tokens/s with Multi-Token Prediction (MTP) on H200 and B200.
Ternary Bonsai 2.5 27B GGUF: 1.76-Bit Local Agent Inference: Ternary Bonsai 2.5 27B GGUF is Prism ML's 1.76-bit-per-weight agentic release built on Qwen3.8-27B hybrid attention. Fitting into 5.93 GB versus 53.8 GB in FP16, it preserves FP16-level tool calling (77.2 vs. 77.7 average across five benchmarks) and 90% of FP16 agentic coding scores while reaching ~300 tokens/s with Multi-Token Prediction (MTP) on H200 and B200. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 9x Smaller Than FP16: Compresses 27.36B total parameters (24.35B language + 0.47B vision + 2.54B embeddings) from 53.8 GB to 5.93 GB at 1.76 bits per weight.
- FP16-Parity Tool Calling: Averages 77.2 across tau2-Bench, tau3-Bench, BFCL v3/v4, and AppWorld (90.5 on AppWorld), matching FP16 (77.7).
- 90% FP16 Agentic Coding: Hits 75.6 on SWE-bench Verified, 60.1 on Terminal-Bench 2.1, and 27.0 on DeepSWE (up from 0.0 in Bonsai 2).
- Upstream llama.cpp & MTP Heads: Q2_0 packings run on stock llama.cpp while -mtp variants add a Multi-Token Prediction draft head for 1.5-1.8x faster decode.
import { createAgent } from '@smoke-monkey/harness';// Local 5.93 GB agentic runtime backed by Ternary Bonsai 2.5 27B in llama.cppconst agent = createAgent({agentId: 'bonsai-25-local-engineer',provider: 'openai-compatible',baseUrl: 'http://127.0.0.1:9931/v1',model: 'prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Inspect the local TypeScript config, identify strictness gaps, and generate a minimal patch plan.');console.log('Bonsai 2.5 agent summary:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
Ternary Bonsai 2.5: Run Qwen 3.8 27B in Just 5.9GB Local Setup!
Bonsai 2.5 27B tested - 16GB Local LLM setup
What Is Ternary Bonsai 2.5 27B GGUF?
Ternary Bonsai 2.5 27B GGUF is a 1.76-bit-per-weight open-weights language model released by Prism ML under Apache 2.0, built on the Qwen3.8-27B hybrid-attention backbone (~75% linear attention, ~25% full attention, 262K context). Each linear weight takes a value in {-1, 0, +1} with one shared FP16 scale per 128 weights, shrinking the 53.8 GB FP16 footprint to 5.93 GB.
Unlike Bonsai 2, which lost accuracy on long-horizon code tasks, Bonsai 2.5 introduces agentic post-training that preserves full-precision tool calling while fitting comfortably inside an 8 GB or 16 GB consumer GPU or Apple Silicon unified memory machine.
| Benchmark Suite | Qwen3.8 FP16 (53.8 GB) | GSQ-RCO IQ3_XXS (10.1 GB) | Unsloth UD-IQ2_XS (7.6 GB) | Bonsai 2 27B (5.93 GB) | Bonsai 2.5 27B (5.93 GB) |
|---|---|---|---|---|---|
| Bits per weight | 16.0 | 3.00 | 2.27 | 1.76 | 1.76 |
| tau2-Bench | 80.6 | 77.7 | 82.0 | 80.2 | 82.0 |
| tau3-Bench | 72.8 | 70.7 | 67.2 | 69.1 | 73.9 |
| BFCL v3 (native) | 71.2 | 71.6 | 71.5 | 70.3 | 72.6 |
| AppWorld | 93.2 | 86.1 | 89.6 | 51.2 | 90.5 |
| SWE-bench Verified | 80.6 | 73.2 | 71.8 | 60.8 | 75.6 |
| Terminal-Bench 2.1 | 70.8 | 66.3 | 53.9 | 52.8 | 60.1 |
| DeepSWE | 30.1 | 27.0 | 17.7 | 0.0 | 27.0 |
GGUF Packings, MTP Speculative Heads, and Memory Math
Prism ML ships three weight packings—Q2_0, PTQ1_0, and PQ2_0—plus -mtp variants that bundle the Multi-Token Prediction draft head. Total model parameters break down into 24.35B language parameters (64 blocks), 0.47B vision tower parameters (27 blocks, served via mmproj-BF16.gguf or mmproj-Q8_0.gguf), and 2.54B embedding/LM-head parameters.
- Stock `llama.cpp` Compatibility: Pick
Ternary-Bonsai-2.5-27B-Q2_0.ggufwhen running upstreamllama.cpp, Ollama, or Docker Model Runner without custom kernels. - Forked Kernels + MTP Acceleration: On Prism ML's CUDA/Metal
llama.cppfork,-mtpfiles add a speculative draft head that lifts decode speed by 1.5–1.8x on NVIDIA GPUs, reaching ~300 tokens/s on H200 and B200. - Avoid Automatic Parallelism OOM: Disable automatic multi-slot KV preallocation on 8–12 GB GPUs by pinning
-np 1or--parallel 1when servingllama-server, keeping KV cache bounded for single-agent loops.
Pin Single-Slot Concurrency on 8 GB GPUs
llama-server automatic parallelism allocates multiple 262K KV buffers by default, which can push VRAM past 8 GB. Pass --parallel 1 -c 32768 for local Smoke Monkey Harness sessions.
Reproducible llama.cpp, Ollama, and Tool-Calling Setup
Pull and serve Ternary Bonsai 2.5 27B locally with native XML <tool_call> support and xhigh reasoning effort enabled in its Jinja chat template:
# 1. Serve with stock llama.cpp (OpenAI-compatible endpoint + Jinja tool template)
llama serve -hf prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 \
--port 9931 --parallel 1 -c 32768 --jinja
# 2. Or run directly via Ollama
ollama run hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
# 3. Verify tool-calling completions endpoint
curl -s http://127.0.0.1:9931/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0",
"messages": [{"role": "user", "content": "Explain ternary g128 scaling in 2 lines."}],
"temperature": 0.6
}'Frequently Asked Questions
Q:Which Ternary Bonsai 2.5 GGUF file should I run on stock llama.cpp?
Use Ternary-Bonsai-2.5-27B-Q2_0.gguf for upstream llama.cpp, Ollama, and Docker Model Runner. PTQ1_0 and PQ2_0 packings require Prism ML's low-bit CUDA/Metal llama.cpp fork.
Q:How much VRAM does Ternary Bonsai 2.5 27B require?
The 1.76-bit weights occupy 5.93 GB on disk and in VRAM. Adding a 32K KV cache with --parallel 1 fits comfortably inside an 8 GB to 12 GB GPU or 16 GB Apple Silicon Mac.
Q:Does Ternary Bonsai 2.5 support vision and multimodal inputs?
Yes. The Qwen3.8-27B base includes a 0.47B vision tower, and the Hugging Face repository provides Ternary-Bonsai-2.5-27B-mmproj-BF16.gguf and mmproj-Q8_0.gguf projectors.
Q:How fast is MTP speculative decoding on Bonsai 2.5?
The -mtp GGUF variants attach a Multi-Token Prediction draft head that speeds up decoding by 1.5x to 1.8x on NVIDIA GPUs, achieving roughly 300 tokens/s on H200 and B200 hardware.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.