BitNet b1.58 2B4T: a ternary model running on a CPU

2026-10-14  |  AI BitNet ternary CPU inference local LLM Mac mini

> TRANSMISSION: BITNET B1.58 2B4T

MODEL......... BitNet b1.58 2B4T (Microsoft Research)
SIZE.......... ~2 billion parameters, 4T training tokens
WEIGHTS....... native ternary, one of {-1, 0, +1}, 1.58 bits each
ENGINE........ llama-server, BitNet fork: ARM fixes + NEON i2_s kernel
HARDWARE...... Mac mini, CPU only, no GPU
THROUGHPUT.... 117 to 147 tokens per second, measured
HOSTING....... Mac mini, private tunnel, nginx on a VPS, static page
LATENCY....... ~0.4s to the first token (VPS + private tunnel)

Two things have been happening in the small-model world. One is the System-1 family: models that emit probabilities rather than prose. The other is ternary weights, and that one I can actually show you, so instead of adding to the hype I built a live demo: https://solvsteen.io/bitnet.

Why Ternary Weights Are Different

In BitNet b1.58 2B4T every weight is one of {-1, 0, +1}. The model is trained that way, not pruned from FP weights after the fact. Floating point multipli- cation disappears from the hot loop, and what is left is an add, a skip, or a subtraction. That is cheap enough to run on the CPU that ships with your computer.

The important part, and the one people get wrong: this is not a 2-bit quantisation of a full precision model. Q2 takes a finished model and rounds its weights, and you pay for it in quality. BitNet was trained with the ternary constraint in place from the first step, which is why it holds up at roughly 1.6 bits per weight. Microsoft’s model card puts the memory of the non-embedding weights at 0.4GB for this model, against 2GB for a comparable 1B model at full precision, and estimates the energy per token an order of magnitude lower.

What I Built

Three security hoops, and the public page knows about none of them:

  1. llama-server runs on the Mac mini, bound to its private tunnel address only. The weights are the 2B4T GGUF in llama.cpp’s i2_s format.
  2. nginx on a small VPS reverse-proxies one path to it over that tunnel. The API key is injected server side, so it never reaches a browser.
  3. A static Hugo page with a small client side widget that streams the answer token by token. The conversation history lives in the browser and nowhere else.

One request is served at a time, first come first served. You can type /help, /temp or /clear in the box if you want to poke at the sampling.

Getting It to Run at All

The CPU path needed work before it was stable. Six source patches for ARM (the three that changed behaviour: relu2 instead of SiLU for the FFN activation, which had corrupted every FFN layer; the packed-weight fix to the scalar i2_s kernel; and the corrected chat template), then three engine settings that are not optional: -ngl 0, because the Metal path asserts on the i2_s tensors; a physical batch below 32, because the fork’s BLAS backend segfaults at 32 and above; and a repeat penalty of 1.1, because the 2B falls into phrase loops without it. I checked the output against the reference implementation on Hugging Face before trusting any of it.

Then the speed work, and it was one file: neon-i2s-kernel.patch, a NEON (dotprod) port of the ternary dot product, ggml_vec_dot_i2_i8_s. That kernel had exactly two paths, AVX2 for x86 and a scalar byte-at-a-time loop for everything else, and every i2_s matmul in this model funnels through it, so on Apple Silicon the whole model ran unvectorized. Patching it took the mini from about 53 to 127 tokens per second at the same thread count, which is the same defect, and the same class of fix, as the iPhone app’s 0.4 to 40 tokens per second.

The Bug That Made the Model Look Broken

My first demo looked awful. It answered, then kept talking, invented the next user question, answered that one too, and leaked transcript fragments like “bot: … user: …”. It also produced a wall of emojis. I spent a while suspecting the model.

It was my chat template. I had hand written a prompt in a dialect the model had never seen (Human: and a made up assistant prefix) and never emitted the model’s end of turn token. llama-server reported finish_reason: length on every single reply, which was the clue: the turn never ended because nothing told the model how a turn ends. With the official format (User: and Assistant:, each turn closed by <|eot_id|>, generation prompt Assistant: ) the same weights answer plainly and stop cleanly. Nothing about the model changed; the wiring did.

The lesson is worth more than the demo: a wrong prompt dialect does not look like a wiring mistake, it looks like a broken model.

How Good Is It, Honestly

For its size, good. On the card’s own numbers it is in the same class as Qwen2.5-1.5B: MMLU 53.2 against 60.25, GSM8K 58.4 against 56.79, MT-bench 5.85 against 6.12. It is better at arithmetic, worse at breadth. On a Mac mini it answers at 117 to 147 tokens per second, which is fast enough to read as it streams.

What it does not have is world knowledge, and it does not know that. It invents a training cutoff (“as of my last update in October 2023”), it told me the UK prime minister is Boris Johnson, and when I asked for books on Danish history it produced a confident entry for “Denmark: The History of a Kingdom” by Hans Christian Andersen and credited Andersen with Peter Pan. Fluent, well formatted, invented, self-confident, and utterly unaware of its mistakes.

Why I Still Think It Matters

A model that runs on a CPU with no floating point multiply means the inference box can be the phone in your pocket, or the laptop you already have. Today that buys you a 2B model that is charming and unreliable. If the approach keeps improving at the rate it has, the interesting question stops being which datacenter you rent and starts being what fits on the device in your hand.

Try it: https://solvsteen.io/projects/bitnet-chat. It is free, it is stateless, and it will occasionally lie to you with total confidence.