Skip to main content
Back

PrismML Squeezes a 27B Coding Agent Into 5.9 GB With Bonsai 2.5

PrismML's ternary-compressed 27B model fits in 5.9 GB, scores 75.6 on SWE-Bench Verified, and runs agentic coding loops entirely on-device.

  • PrismML released Ternary Bonsai 2.5 27B, a 5.9 GB compressed Qwen3.8 27B for local agentic workloads.
  • Scores 75.6 on SWE-Bench Verified and 73.9 on τ³-Bench, up sharply from Bonsai 2.
  • AppWorld jumps from 51.2 to 90.5; DeepSWE from 0 to 27, showing restored long-horizon tool use.
  • Runs at 291 tokens/s on H100 and 204 tokens/s on a consumer RTX 4090 with MTP.
  • Available under Apache 2.0 on Hugging Face, via llama.cpp and MLX for Apple devices.
  • Demos show 180-tool-call pytest debugging and 47-call screenshot-to-HTML rebuild, fully offline.

PrismML has released Ternary Bonsai 2.5, a compressed version of Qwen3.8 27B designed for coding agents that run locally. Such agents inspect repositories, call tools, evaluate results, and continue across many steps. PrismML publishes the model under Apache 2.0.

At 5.9 GB, Bonsai 2.5 keeps the same weight footprint as the previous release while recovering much of the parent model’s benchmark performance. A 27-billion-parameter model stored at 16-bit precision requires roughly 54 GB for weights, making this release about nine times smaller by weight size.

Three-value weights shrink the model

Ternary quantization constrains each model weight to three values, typically -1, 0, and +1. That approach is more aggressive than the 4-bit and 8-bit quantization commonly used by local inference tools, and it can reduce storage and memory bandwidth substantially.

Storage savings usually come with lower accuracy, particularly when an agent must preserve context and make reliable decisions across dozens of tool calls. Bonsai 2.5 reduces that loss on most of PrismML’s reported agent and coding evaluations.

Reported scores recover lost ground

PrismML’s reported SWE-bench Verified score rises from 60.8 for Bonsai 2 to 75.6 for Bonsai 2.5. The full-precision Qwen3.8 parent scores 80.6, so the new release reduces the deficit from 19.8 points to 5 points.

PrismML-reported benchmark scores. Higher is better within each row.
Benchmark Qwen3.8 27B Bonsai 2 Bonsai 2.5 Change from Bonsai 2 Difference from parent
SWE-bench Verified 80.6 60.8 75.6 +14.8 -5.0
DeepSWE v1.1 30.1 0 27.0 +27.0 -3.1
Terminal-Bench 2.1 70.8 52.8 60.1 +7.3 -10.7
AppWorld 93.2 51.2 90.5 +39.3 -2.7
τ³-Bench 72.8 69.1 73.9 +4.8 +1.1
BigCodeBench 61.5 57.2 60.3 +3.1 -1.2
LiveCodeBench v6 87.6 83.8 83.0 -0.8 -4.6

The largest recoveries appear on AppWorld and DeepSWE, which exercise multi-step agent behavior. SWE-bench Verified measures repository-level issue resolution, while Terminal-Bench evaluates work performed through a command-line environment. BigCodeBench and LiveCodeBench focus more heavily on standalone code generation.

LiveCodeBench is the only listed benchmark on which Bonsai 2.5 trails its ternary predecessor, falling by 0.8 points. Terminal-Bench remains the largest deficit against the full-precision parent at 10.7 points. The τ³-Bench result exceeds the parent by 1.1 points, a small difference that may fall within evaluation variance.

Interactive speeds on one GPU

PrismML reports generation throughput of 291 tokens per second on one NVIDIA H100 and 204 tokens per second on an RTX 4090 when multi-token prediction is enabled. Prompt processing was measured with a 2,000-token input.

PrismML-reported throughput with multi-token prediction.
GPU Generation Prompt processing
NVIDIA H100 291 tokens/s 3,200 tokens/s
NVIDIA RTX 4090 204 tokens/s Approximately 3,060 tokens/s

Multi-token prediction allows the model to propose several future tokens during a forward pass and verify them together, increasing throughput when enough proposals are accepted. Actual speed depends on the backend, context length, batch size, sampling settings, and tool execution time.

Total application memory exceeds the 5.9 GB weight footprint because inference also requires the runtime, temporary buffers, and a key-value cache that grows with context length. Developers planning long agent sessions should measure peak memory with their intended context window and backend.

PrismML lists NVIDIA and Intel GPU support through llama.cpp, plus Apple device support through MLX. The weights are available in a model collection, while the demo repository contains a reference agent implementation. The release also includes a browser-based WebGPU demo.

Long tool chains in the demos

In PrismML’s first walkthrough, the model investigates a pytest regression that passes in isolation and fails within the full suite. It explores the repository, creates a minimal reproduction, traces the failure, implements a fix, and validates the patch against a held-out maintainer test. The run uses roughly 180 tool calls and executes offline.

A second walkthrough starts with a screenshot and a short instruction to reproduce the page in HTML. The model writes the page, renders it in a browser, compares the result with the source image, and revises the layout, colors, and typography over roughly 47 tool calls. These demonstrations show the intended workflow, although they provide less general evidence than repeatable benchmark runs.

Private workloads are the clearest fit

Local inference can keep prompts, source code, and documents on the user’s machine while removing the latency and cost of a hosted-model request. Likely applications include:

  • Coding assistants working inside repositories that cannot be uploaded to an external service
  • Document review and summarization systems processing confidential files
  • Desktop agents that run recurring analyses without a model API
  • Mobile agents on supported devices with enough memory for the weights and runtime

Privacy also depends on the surrounding application. Tool calls, telemetry, package managers, browser sessions, and external APIs can still transmit data even when model inference runs locally. Offline deployments need network controls and an audit of every tool available to the agent.

Limits worth testing

Bonsai 2.5 still trails the full-precision parent on six of the seven reported evaluations, with the largest gap appearing in terminal tasks. Product teams should reproduce representative workflows, track task completion rather than token throughput alone, and test failure recovery across long tool sequences.

The Apache 2.0 license permits use, modification, and distribution subject to its license and notice requirements. PrismML describes its training, compression, and evaluation methods in the technical paper.