Ternary weights: How 1.58-bit models shrink an LLM to three values
Ternary models store every weight as -1, 0 or +1, about 1.58 bits each. Here is how that works, where it came from, and what it costs in accuracy.

Ternary weights are a way of storing a language model’s parameters using only three values: -1, 0 and +1. A normal model keeps each weight as a 16-bit decimal number. A ternary model keeps a tiny code instead, so the same network takes a fraction of the memory.
Because three values carry log2(3), or about 1.58, bits of information, these models are often called 1.58-bit models.
Why three values can replace a long decimal number
Picture a mixing desk with millions of dials. Each dial says how strongly one signal feeds into the next. In a normal model, every dial can sit at thousands of fine positions. In a ternary model, each dial has only three settings: add the signal, ignore it, or subtract it.
That sounds crude, and a single dial is. But a model has billions of them, and the combined pattern still carries a lot of information.
A recent example is Ternary Bonsai 2.5 27B from Prism ML. According to its model card, the main file is 5.93 GB, down from 53.8 GB at 16-bit precision.
What happens inside the math

A language model spends most of its time multiplying numbers: activations (the values flowing through the network) times weights. With ternary weights, multiplication becomes simple. A weight of +1 means add the activation. A weight of -1 means subtract it. A weight of 0 means skip it.
Additions are cheaper than multiplications in hardware, which is one reason researchers like the idea. The other reason is memory. During text generation, a model is often limited by how fast it can read its weights from memory, so smaller weights can mean faster output.
Pure three-value weights would be too blunt. Real systems add a scale factor. In Ternary Bonsai, the card says each group of 128 weights shares one 16-bit scale. That brings the total to 1.76 bits per weight. The scale lets the model say how big the +1 steps are in each group.
From BitNet to 1.58 bits: Where the idea came from
The line of work comes mainly from Microsoft Research. In October 2023, Hongyu Wang, Shuming Ma, Furu Wei and colleagues published the first BitNet paper, a study of scaling Transformers with 1-bit weights. It introduced a layer called BitLinear, a drop-in replacement for the standard nn.Linear layer. It trained models with 1-bit weights (just +1 or -1) from scratch.
In February 2024, Shuming Ma, Hongyu Wang and co-authors followed with a second paper arguing that three values work better than two. Their variant, BitNet b1.58, added the value 0. The authors reported that it matched a full-precision Transformer of the same size and training data on perplexity (a measure of how well a model predicts text) and on end tasks. They also reported lower latency, memory use and energy.
The paper’s own tables show small gaps. At 700M parameters, the average zero-shot score was 44.3 for BitNet b1.58 against 45.5 for the LLaMA baseline.
Trained ternary versus squeezed ternary
There are two ways to get a ternary model, and the difference matters.
- Train it that way from the start. This is the BitNet approach. The model learns to work with three values from its first training step.
- Convert an existing model. A model trained at 16 bits is rounded down to ternary, usually with extra training to recover quality. This is a form of quantization, the broader practice of storing weights with fewer bits.
Ternary Bonsai 2.5 is described by Prism ML as built on Qwen3.8-27B, an existing model, so it belongs to the second group. The card also says the weights are stored in a Hadamard-rotated basis, a mathematical change of coordinates. It is meant to spread out extreme values so that rounding to three levels loses less. The runtime applies the matching transform to activations.
What the numbers say, and what they do not
On its card, Prism ML reports a five-benchmark tool-calling average of 77.2 for Bonsai 2.5, against 77.7 for the 16-bit original. It reports 75.6 on SWE-bench Verified against 80.6 for the original, and 60.1 on Terminal-Bench 2.1 against 70.8.
All of these figures were run by Prism ML on its own selection of comparison models, so they are vendor claims until others reproduce them. The card itself lists gaps: 3.6 points behind on BFCL v4, and 3.1 points on math.
The pattern is typical. Ternary models can stay close to full precision on some tasks, while others lose a few points. Tasks that need exact recall or precise arithmetic are a natural place to look for losses.
Practical limits and what to watch
Ternary models bring awkward engineering problems:
- Software support. Common tools expect standard formats. Prism ML says two of its three packings need its own fork of
llama.cpp. The third,Q2_0, runs on stockllama.cppfrom build b11556 onward. The card warns that older builds load that file without an error and then produce garbage. - Hardware. Current GPUs are built for 16-bit and 8-bit math. Much of the promised energy saving needs kernels, and possibly chips, designed for ternary arithmetic.
- Training cost. Training from scratch at ternary precision still requires high-precision bookkeeping during learning. The savings show up mostly when the model runs.
The most useful things to watch are independent benchmarks, since most ternary results come from the teams that built the models. Also worth tracking is whether mainstream runtimes add native ternary support. The Bonsai card suggests the size gain is large: a 27-billion-parameter model that fits in under 6 GB. Whether the accuracy holds up outside the vendor’s chosen tests is the open question.
Sign Up for the Daily AI Pulse
One email a day. All the stories that matter.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Daniel ReedAI Research, Safety & Ethics AnalystDaniel Reed currently works as an AI Research, Safety & Ethics Analyst at Aiholics, writing about how changes in artificial intelligence are affecting and will affect scholarship,…
You may also like

Inkling 2 Mini’s safety refusals removed by a 40 MB LoRA

LLM-as-a-judge: How AI models grade other AI models, and where the grading goes wrong

Speculative decoding: How a small draft model makes a big AI model answer faster
