Ternary Bonsai 2 27B: a 27B model in 5.95 GB on a laptop

Fitting a 27B into 5.95 GB means storing weights as three values; custom kernels and version requirements come with it.

Ternary Bonsai 2 27B stores a Qwen3.8-27B derivative as ternary weights (-1, 0, +1). It cuts 54 GB of FP161 to 5.95 GB while averaging 84.78 across 14 benchmarks. On stock llama.cpp only the Q2_0 packing runs; the others need a fork.

Requirements and key details
  • Weights are ternary -1, 0, +1 at a true 1.72 bits per weight.
  • PTQ1_0 is 5.95 GB, PQ2_0 is 7.21 GB, and only Q2_0 runs on stock llama.cpp.
  • It averages 84.78 across 14 benchmarks, retaining 98.2% of FP16.

What ternary weights mean

Ordinary quantization2 rounds each weight to one of many levels. Ternary keeps only -1, 0 and +1, multiplying each group by a single FP16 scale to restore magnitude.

The card states 1.72 bits per weight: embeddings, attention3, MLP and the LM head are all ternary with no hidden high-precision islands, so there is no gap between the claimed and actual footprint.

A small computer running a search system beside document stacks
Ternary weights store three values and cut 54 GB to 5.95 GB.

Which of the three packings to download

PTQ1_0 packs the trits densely at 5.95 GB, the smallest. PQ2_0 stores each in a 2-bit slot at 7.21 GB with simpler kernels that may change speed. Both need the fork the card provides.

To stay on stock llama.cpp choose Q2_0 at 7.63 GB; the card names release b11556 as the first that runs it. When a fork is impractical, that is the only path.

Scroll sideways to compare all columns.

Size and requirements per packing
PackingSizeBitsRuntime
PTQ1_05.95GB1.75llama.cpp fork
PQ2_07.21GB2.13llama.cpp fork
Q2_07.63GB2.25Stock b11556+

What 98.2% retention means

The card reports an 84.78 average across 14 thinking-mode benchmarks, 98.2% of FP16. The comparison build IQ2_XXS sits at 72.59, a wide gap.

Math stays within half a point at 96.57, coding matches baseline at 89.42 and tool calling is 74.92. The spread differs by domain, so check where your work falls.

Colour-coded blocks leave a compartmented crate wired to an Apple compact desktop and split into document, image and audio work
On stock llama.cpp only the Q2_0 packing runs directly.

Before the first run

With the fork, match the binary version to the card: kernels change per release, so following the demo repository's pinned combination is safer.

Context reaches 262K, but measure memory and speed in practice. With about 75% linear attention the long context is lighter, yet KV cache4 on a 5.95 GB model still eats headroom.

Two metal devices sit on a desk and shelf beside a laptop, with cables connected to a switch box in front
Retention differs by domain, so verify on your own first task.

Terminology notes

  1. FP16 — A 16-bit floating-point format. It uses the same bit width as BF16 but allocates bits differently between exponent and significand.

    Back to the text
  2. Quantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.

    Back to the text
  3. Attention — A neural-network operation that calculates relationships between input tokens and combines information from each position into the current representation.

    Back to the text
  4. KV cache — Memory that stores attention keys and values from earlier tokens for reuse during later token generation. Its size depends on context length and batch size.

    Back to the text

Frequently asked questions

What should you check first in this article?
Ternary Bonsai 2 27B stores a Qwen3.8-27B derivative as ternary weights (-1, 0, +1). It cuts 54 GB of FP16 to 5.95 GB while averaging 84.78 across 14 benchmarks. On stock llama.cpp only the Q2_0 packing runs; the others need a fork.
How much memory does it need?
Context reaches 262K, but measure memory and speed in practice. With about 75% linear attention the long context is lighter, yet KV cache on a 5.95 GB model still eats headroom.