500xEngineer.

All postsLONG-FORM7 min read

Bonsai 2.5: Can a Local AI Model Fix Bugs? I Tested It on My Mac

I tested Bonsai's 7.67 GB Q2_0 file on six toy coding tasks: 23 of 24 runs passed. Here are the failure, runtime checks, timing and memory on my 128 GB Mac.

Can a local model fix bugs? In Episode 28 of 500x Engineer, I ran Bonsai's 7.67 GB Q2_0 file: 23 of 24 toy-task runs passed. The one failure added a test that broke the repository's own suite, even though my hidden tests passed.

PrismML released Ternary Bonsai 2.5 27B on November 24, 2026. I tested November 25, 2026, on an Apple M5 Max with 128 GB of memory, using six toy Python tasks and my own minimal tool loop, with no comparison model.

Video not loading? Watch the video on YouTube

How 27 billion parameters fit in a small file

Parameters are learned numbers. Quantization stores them with fewer bits. Per PrismML's model card, Bonsai keeps the Qwen3.8-27B architecture and uses ternary weights: minus 1, 0 or plus 1, with a shared FP16 multiplier for every group of 128 weights.

The card describes blockwise weight rotation and a matching runtime transform, requiring correct software support.

PrismML reports 1.76 bits per weight for its dense packing, including overhead. Its card lists a 53.8 GB full-precision file and advertises a 5.93 GB PTQ1_0 file. The download listing differs, as detailed below. The model is available as open weights, Apache 2.0.

What PrismML claims

In PrismML's own tests, Bonsai scored 75.6 on SWE-bench Verified against 80.6 for full-precision Qwen3.8-27B. SWE-bench uses real GitHub issues; my toy tasks are a separate experiment.

PrismML's 90% coding headline divides Bonsai's average across three coding benchmarks by the full model's average across those same benchmarks. PrismML reports rounded averages of 54.2 and 60.5. Individual benchmarks retain different fractions of the full model's score; the headline describes a ratio of averages.

In PrismML's own tool-calling tests, its mean was 77.2 against full precision's 77.7 across five benchmarks. These are vendor evaluations. PrismML used a shared harness and H100/vLLM serving path, with xhigh thinking and random sampling, rather than my Mac setup.

PrismML says Terminal-Bench 2.1 remains its agentic benchmark furthest from FP16, and even its longest evaluations are bounded, single-task episodes. It has not yet measured workloads running for hours across many context windows, such as machine-learning engineering (MLE-bench), long-running autonomous operation (Vending-Bench), and harder multi-language repository work (SWE-bench Pro). It identifies steady progress over those horizons as the focus of its next release.

What I ran

I chose Q2_0 because it works with standard llama.cpp, the open-source runtime. The card describes three packings of the same ternary model. These plain files exclude the separate MTP draft head.

File suffix Bytes in the Hugging Face listing Runtime required per PrismML's card
PTQ1_0.gguf 5,993,834,848 PrismML llama.cpp fork; upstream review
PQ2_0.gguf 7,253,354,848 PrismML llama.cpp fork
Q2_0.gguf 7,673,194,848 Standard llama.cpp b11556 or newer; also fork

PrismML advertises the PTQ1_0 file as 5.93 GB; the saved listing's bytes round to 5.99 decimal GB. I describe that download as about 6 GB. I tested the 7.67 GB Q2_0 file.

The card warns that older standard builds load Q2_0 without warning and produce garbage. An app bundling llama.cpp needs its engine build checked too.

I made three checks: my installed build 12110 exceeded the card's required b11556; the file's SHA-256 matched Hugging Face's listing; and known-answer questions returned 6 of 6 correct across default and medium effort before measurement.

These are the server launch lines copied from lab/03_run.sh; its variables identify the model, port and repetition suffix:

/opt/homebrew/bin/llama-server -m "$M" -ngl 99 -fa on -c 32768 --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 -np 1 --jinja \
  --host 127.0.0.1 --port $PORT > results/server$SUF.log 2>&1 &

I used PrismML's recommended thinking-mode sampling, a 32,768-token context and one request slot.

The test

I wrote the tasks and hidden checks before running the model. Every untouched task failed acceptance; every handwritten reference fix passed my self-check. Each task began with a fresh copy of a throwaway Python repository containing fake shop data.

ID What it asks What the model is given
t1-paging Fix pagination in one file Repository rules and a visible failing test
t2-tax-order Fix rounding and discount-before-tax across two files Rules and visible failing tests; instruction to preserve tests
t3-csv-export Add CSV export with quoting, totals and newlines Detailed feature specification and existing repo tests; no export tests
t4-rename Rename fmt to format_cents across files Rename request, source and tests to update
t5-discount-guard Reject invalid discounts and prevent negative totals Bug report and requirements; no failing test supplied
t6-cli Add a JSON-cart command-line tool Inputs, output and error rules; request to add tests

Hidden tests stayed outside the model's repository. Passing required nonempty passing hidden tests, the repository's own suite, and the extra rename check. That check searched Python files under shopkit and tests for the old name.

My four tools were list_files, read_file, write_file and run_tests. There was no shell or network tool. Running tests still executes model-written Python: the path boundary alone provides no sandbox.

The three relevant constant lines from lab/agent.py are:

MAX_TURNS = 16          # model responses per task
WALL_CAP_S = 480        # checked between turns
MAX_TOKENS = 12288      # per response, thinking included

The clock check happens between responses, allowing an overrun. I ran default effort, called xhigh, and medium, with two repetitions each. Random sampling allows repeats to differ.

The results

My run totals follow. Tool errors means malformed or failed calls.

Run Passed Seconds Tokens generated Tool calls Tool errors
xhigh 6 of 6 709 21,011 66 0
medium 5 of 6 808 21,221 61 0
xhigh-r2 6 of 6 1186 31,328 82 0
medium-r2 6 of 6 517 11,787 67 1

That is 23 of 24 task runs across the same six tasks, with 276 tool calls and one error.

The failed medium CLI run spent over 6 minutes on one response, including thinking, then wrote the CLI. It also added a test helper named run, colliding with the test framework's own method. The loop hit its time cap after that write. Hidden checks passed; the repo suite failed. An earlier successful suite run preceded the broken test addition.

In default repetition two, the CLI task hit the same collision and repaired it. It then fixed another test error involving a temporary-directory object treated as a path. Both final suites passed when the cap stopped it, before it said DONE. My predefined rule grades the files, so that run passed.

In medium repetition two, the loop refused a write to /tmp/cart.json outside the task folder. The model switched to relative cart.json and passed.

Time and memory

Individual task runs took 19 seconds to 8 minutes 35 seconds. All 24 took about 54 minutes of task time, excluding downloading, loading and sanity checks.

Plain generation measured 33.7 tokens per second at default and 33.6 at medium. The four task-run generation averages ranged from 24.9 to 31.0 tokens per second, including thinking. These rates measure generation rather than end-to-end task completion.

Across repetitions, default took about 32 minutes and medium about 22. Medium was slower in the first repetition and had the only failure. Two repetitions leave the choice unsettled.

I recorded a 15 GB peak physical footprint and an 18.6 GB resident size for the server process, both the highest values at my sample points with the 7.67 GB file and a 32,768-token context. Footprint and ps report different process-memory measures. Running it required more memory than storing the file. I established neither total system use nor minimum RAM. My Mac had 128 GB.

PrismML's Apple speed figure uses PQ2_0 on its own Metal runtime and an M5 Pro benchmark protocol. My Q2_0, standard-runtime, M5 Max prompt measurement supplies no direct speed comparison.

How I'd use this

My opinion: start with a small explicit bug fix, rename, exporter or command-line feature. Supply acceptance criteria and relevant files, then inspect the change and the tests it adds.

I'd check the runtime and download fingerprint, ask known-answer questions, use a disposable repository with fake data, isolate test execution and set a time cap. I'd keep independent acceptance checks alongside the complete repository suite before broadening the work.

What I did not test

NOT tested: any other machine or a Mac with less memory; the PTQ1_0 and PQ2_0 files or PrismML's llama.cpp fork; the MTP draft head; a named coding agent; long jobs; contexts beyond 32,768 tokens; images; any hosted model on the same tasks.

How to reproduce

lab/make_tasks.py defines the repository, tasks and hidden checks. lab/selfcheck.py validates untouched tasks and reference fixes. lab/agent.py implements tools, caps and final grading. lab/03_run.sh launches the server, runs sanity checks and executes both effort settings; the repetition uses its suffix argument.

The files are described here and are not published as a repo. PrismML's Bonsai-demo provides its own setup path, which differs from my measured run.

Disclosure: this channel's pipeline runs on Claude and Codex subscriptions.

Daily email

Get each breakdown in your inbox.

One email each evening, right after the Short goes live: the AI tool it covers, the full write-up with sources, and how to get paid for it. Free, and you can unsubscribe anytime.

Read past emails on Substack

Sources

All postsWatch on YouTube