Article

Why 1.76 Bits Per Weight Still Runs Agents: The Mechanics and Limits of Ternary Quantization

Using Ternary Bonsai 2.5 27B as evidence, this article unpacks what makes ternary quantization viable: weights squeezed to 1.76 bits each and a 5.93GB model file that still scores 75.6 on SWE-bench Verified. It covers three things: what three values can still express, why blockwise Hadamard rotation is mandatory, and where this approach fails, plus a checklist for reading quantized-model benchmarks.

One-line takeaway

Ternary quantization is not just shrinking a model. It swaps the representation entirely: one shared scale per 128 weights plus a rotation to suppress outliers. That is why it can run agentic tasks and why long chains accumulate error.

One question, three answers ​

If every weight in a model can only take three values, minus one, zero or plus one, can it still write code and call tools?

The intuition says no. But in November 2026, PrismML's Ternary Bonsai 2.5 hit 75.6 on SWE-bench Verified from a 5.93GB weight file, against 80.6 for its full-precision Qwen3.8-27B base.

A five-point gap, about 94% retained. That number deserves unpacking: why it holds, and where the cost lands.

Three values, still enough ​

Start with information. Three symbols carry log₂3 ≈ 1.585 bits. With group scaling, Bonsai's weight format lands at 1.76 bits per weight.

Against FP16 at 16 bits, that is roughly 9× compression: 53.8GB becomes 5.93GB.

Why does a network drop from 16-bit precision to 1.76 bits without collapsing? Three effects stack.

First, over-parameterization. A 27B model is deeply redundant for its task distribution. Parameter count far exceeds the minimum needed to express those functions, so when per-weight information is cut, many redundant paths can compensate.

Second, group scaling. Every 128 weights share one FP16 scale. Relative magnitudes inside a group survive; absolute precision does not. Granularity matters: groups too large flatten within-group dynamic range, groups too small let scale overhead eat the savings.

Third, a rotated basis. Weights are not stored in the original coordinate system but in a blockwise Hadamard-rotated one, with the rotation folded offline into the weights.

What Hadamard rotation solves ​

Quantization's hardest problem is not the average, it is the outlier.

Transformer activations contain a few channels with very large magnitudes, often tied to important functions such as attention sinks. Quantizing with a single scale lets those outliers dominate the scale, crushing the precision of everything else.

Hadamard rotation spreads that distribution, evening out energy across channels. It is an orthogonal and invertible transform: the function the model computes does not change, only the coordinate system in which it is stored. Quantize in the rotated space, use it as is.

The idea traces to QuaRot. Bonsai's variant folds the rotation into the weights, so inference needs no extra rotation op, at the cost of weights being usable only in that basis and not directly elementwise-combinable with other models.

Where the gain lands ​

Large-model decoding is memory-bandwidth-bound: each generated token requires moving the weights it touches from memory to compute units.

So the gain is less traffic, not more math.

Bonsai 2.5 reports 291 tokens per second on an H100 and 204 on an RTX 4090, using the multi-token-prediction variant.

DimensionChange from quantizationMechanism
Memory footprintAbout 1/916 bits to 1.76 bits per weight
Decode bandwidthFalls roughly in proportionFewer bytes per token
Largest single-device modelMoves up clearly27B fits consumer GPUs and 16GB-class devices
ComputeRoughly unchanged or slightly lowerTernary multiply-add simplifies to add/subtract/select
AccuracyLossyLimited expressiveness, error accumulation on long chains

Three shapes of cost ​

Compression is not free.

First, absolute precision. SWE-bench drops from 80.6 to 75.6, Terminal-Bench 2.1 from 70.8 to 60.1, DeepSWE v1.1 from 30.1 to 27. Tasks needing exact code edits and long-range dependencies lose the most.

Second, error accumulation on long tasks. Single-step errors are independent; multi-step errors inherit. An agent running a dozen tool calls drifts once and struggles to return. PrismML's stated focus for 2.5 is exactly here: better use of tool feedback, better recovery after failure, less redundant self-reasoning.

Third, uneven damage. Some abilities tolerate low precision (classification, retrieval-style QA), others do not (numeric computation, exact format output). Averages hide this.

Training-time versus post-hoc ​

There are two ways to build a ternary model, and results differ sharply.

Post-training quantization takes a trained full-precision model and compresses it. Cheap, and lossy: Bonsai 2's 60.8 on SWE-bench is that path.

Quantization-aware training or distillation lets the model know during training or fine-tuning that it will run on ternary weights, so gradients adapt under the constraint. Bonsai 2.5's recovery from 60.8 to 75.6 came this way; the company says 2.5 specifically improved tool-feedback use and failure recovery.

This clarifies a common misunderstanding: the score is not the achievement of a compression algorithm but of compression plus retraining. The same g128 ternary format applied to a different model can lose very different amounts.

PrecisionTheoretical 27B weight sizeExtra work requiredTypical loss
FP16About 53.8GBNoneNone
8 bitAbout 27GBCalibration or QATVery small
4 bitAbout 13.7GBGroup quantization plus calibrationSmall to moderate
Ternary (1.76 bit)About 5.9GBQAT or distillation plus rotationModerate, task dependent

Sizes use parameter count times bit width over eight, ignoring grouping and metadata, as order-of-magnitude estimates.

The practical takeaway: a model not trained for ternary will land near the 60.8 end, not 75.6. Ternary is not a format you can apply to anything.

How to read these benchmarks ​

Three common misreadings.

Baseline choice. Comparing to full precision (80.6 to 75.6) answers "how much was lost"; comparing to the previous quantized version (60.8 to 75.6) answers "how much improved". Both are true; mixing them is not.

Self-reported versus reproduced. All scores come from the publisher, with no third-party replication of prompts, decoding parameters or tool environment. Cross-vendor quantized comparisons are especially unreliable because formats, group size and whether QAT was used all differ.

Size is not memory. 5.9GB is the weight file. Runtime also needs KV cache, activations and context headroom. A million-token session can need a cache larger than the weights. Reading "5.9GB runs a 27B" as "6GB of RAM is enough" is the most common error in these releases.

Where it fits and where it does not ​

It fits workloads with visible bandwidth pressure and moderate precision tolerance: local code assistants, on-device document processing, offline agents, and internal deployments with privacy constraints.

It does not fit three classes: tasks needing high-precision numeric output (financial or scientific computation), long chains with no tolerance for error (unattended batch operations), and models that must be frequently merged with other weights (the quantized basis is incompatible with the original coordinate system).

The more general judgment: quantization lowers the bar for running locally, but does not change the fact that small local models are weaker than large ones. It expands the set of usable scenarios, not the capability ceiling.

Boundaries ​

  • The ternary format (values in {−1, 0, +1}, g128 grouping, 1.76 bits per weight, 5.93GB versus 53.8GB), Hadamard rotation basis, all benchmark scores (SWE-bench Verified 80.6/60.8/75.6, AppWorld 93.2/51.2/90.5, Terminal-Bench 2.1 70.8/52.8/60.1, DeepSWE v1.1 30.1/0/27, τ³-Bench 72.8/69.1/73.9, BigCodeBench 61.5/57.2/60.3, LiveCodeBench v6 87.6/83.8/83.0) and speed figures (H100 291 tokens/s, RTX 4090 204 tokens/s) come from the PrismML model card and release, all vendor-reported;
  • The log₂3 ≈ 1.585 and 1.76-bit conversions are standard information theory; compression ratios are direct division;
  • The relation between Hadamard rotation and QuaRot is technical analysis; Bonsai's exact implementation follows the model card and related papers;
  • "About 94% retained" is computed as 75.6/80.6, while the company states about 93.7%; the difference is rounding;
  • This is a mechanics analysis, not a deployment recommendation.

Sources ​