Local & Offline
~9 min readUpdated: December 2026

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

Ternary Bonsai 2.5 27B GGUF 1.76-bit local agent inference architecture in Smoke Monkey

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.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

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.

Key Architectural Takeaways
Quick Implementation Examplebonsai-2-5-local-agent.ts
bonsai-2-5-local-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Local 5.93 GB agentic runtime backed by Ternary Bonsai 2.5 27B in llama.cpp
const 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);
Video Guides

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 SuiteQwen3.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 weight16.03.002.271.761.76
tau2-Bench80.677.782.080.282.0
tau3-Bench72.870.767.269.173.9
BFCL v3 (native)71.271.671.570.372.6
AppWorld93.286.189.651.290.5
SWE-bench Verified80.673.271.860.875.6
Terminal-Bench 2.170.866.353.952.860.1
DeepSWE30.127.017.70.027.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.

  1. Stock `llama.cpp` Compatibility: Pick Ternary-Bonsai-2.5-27B-Q2_0.gguf when running upstream llama.cpp, Ollama, or Docker Model Runner without custom kernels.
  2. Forked Kernels + MTP Acceleration: On Prism ML's CUDA/Metal llama.cpp fork, -mtp files 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.
  3. Avoid Automatic Parallelism OOM: Disable automatic multi-slot KV preallocation on 8–12 GB GPUs by pinning -np 1 or --parallel 1 when serving llama-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:

bash
# 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
  }'
Google Search Questions & Answers

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 guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness