Inference Optimisation advanced 7 min read 10 flashcards

Ternary and Extreme Low-Bit Models

Below about three bits, quantising a trained model stops working and you have to train in low precision from the start, which changes the arithmetic of inference from multiply-accumulate to add-subtract.

Post-training quantisation degrades gracefully from 16 bits to 8, and usually to 4. Push to 2 bits and it falls apart: the reconstruction error per layer exceeds what the next layer can absorb, and no amount of calibration data or clever rounding recovers it. The frontier below that point is not a better rounding scheme. It is training the model in low precision to begin with.

Quantisation-aware training

The mechanism is straightforward and the detail that makes it work is not. In the forward pass, weights are quantised before use, so the network experiences quantisation error during training and learns to route around it. In the backward pass, the quantisation function has zero gradient almost everywhere, so it is replaced by the identity: the straight-through estimator passes the gradient through the rounding operation unchanged.

That is a deliberately wrong gradient. It works because the quantisation error behaves like noise the optimiser can average over, and it breaks when the quantisation is coarse enough that the "noise" is systematic. Managing that boundary is most of the craft in low-bit training.

The ternary case

BitNet b1.58 constrains every weight to \(\{-1, 0, +1\}\). The name comes from the information content: \(\log_2 3 \approx 1.58\) bits per weight. The claim is that at matched model size and training tokens it matches a full-precision transformer in perplexity and end-task performance, with gains in latency, memory, throughput and energy (Ma et al., 2024, The Era of 1-bit LLMs, arXiv:2402.17764).

What makes ternary interesting is not the compression ratio but the arithmetic. With weights in \(\{-1, 0, +1\}\) the matmul contains no multiplications: each term is an add, a subtract, or a skip. Multiplication dominates the energy budget of a matmul unit, so removing it changes the hardware equation rather than just the memory equation. The zero also gives structured sparsity for free.

The catch, stated plainly: this is a pretraining recipe. You cannot convert an existing bf16 checkpoint to b1.58 and keep its quality. Adopting it means committing training compute up front, which is why uptake has been concentrated in labs training their own models rather than in deployment teams.

Where the boundary actually sits, as of 2026

  • 8-bit: routinely lossless post-training, weights and activations both.
  • 4-bit weight-only: standard practice on large models, small measurable loss.
  • 4-bit weights and activations: workable with rotation methods, near-lossless on large models; see activation outliers and rotation-based quantisation.
  • 2-bit and below post-training: not viable as a drop-in.
  • 1.58-bit trained from scratch: viable, with a claim of parity that has not been independently reproduced at frontier scale.

That last qualification matters. BitNet's parity result is reported by its authors on models well below frontier size. Treat it as a promising research direction rather than a settled deployment option.

When it breaks

The training cost is real and front-loaded. QAT requires a full or substantial training run. If the model already exists in bf16, post-training quantisation at 4 bits is available today for a few GPU hours; ternary is not available at any price without retraining.

Kernel support lags the papers. Ternary arithmetic needs kernels that actually exploit add-subtract-skip. Without them the weights are unpacked to bf16 and multiplied conventionally, delivering the memory saving and none of the compute or energy saving. This gap between a paper's arithmetic argument and a deployment's realised speedup is the single most common disappointment in low-bit work.

Straight-through gradients interact badly with large learning rates. The estimator's bias grows as quantisation coarsens, and low-bit runs are correspondingly more prone to loss spikes and divergence. Recipes that work at 8 bits often need different schedules at 1.58.

Parity claims are size-dependent. Redundancy absorbs quantisation error, so extreme quantisation looks better on larger models. A parity result at 3B says little about 700M, and less about what a 4-bit version of the same model would have achieved for a fraction of the training cost.

Check yourself

10 flashcards for this concept

Click a card to reveal the answer.

Drill the whole track