llmvram.com
PrismML · 27B ternary QAT derivative of Qwen3.8-27B (PTQ1_0 + PQ2_0 packings) · GDN hybrid · Apache-2.0

Ternary Bonsai 2 27B VRAM requirements

8.2 GiB provisional
at PTQ1_0 · PrismML GGUF · 32K context · RTX 4090 24GB
fits any 12GB card, 2.3 GiB to spare (tight) · at 4K context it drops to ≈6.4 GiB — 8GB-class phone territory

Ternary-Bonsai-2-27B is PrismML's ternary QAT derivative of Qwen3.8-27B — a true 1.72-bits-per-weight quantization (values in {−1, 0, +1}, one FP16 scale per 128-weight group, stored in a Hadamard-rotated basis), not a conventional rounding quant: the PTQ1_0 GGUF measures 5.54 GiB (prism-ml/Ternary-Bonsai-2-27B-gguf, pinned) and the MLX 2-bit build 8.01 GiB (prism-ml/Ternary-Bonsai-2-27B-mlx-2bit). At 4K context the PTQ1_0 build totals ≈6.4 GiB — an 8GB-class phone runs a 27B model, tight, and any 12GB card runs the full 32K context with 2.3 GiB to spare (tight by this site's threshold; 24GB leaves 14.3). The trade is no longer quality — PrismML's own EvalScope runs put it at 98.2% of the FP16 base's thinking average, within half a point of UD-Q4_K_XL — it is runtime: the GGUF packs are custom ternary types that only PrismML's llama.cpp fork loads (stock llama.cpp, Ollama and LM Studio cannot; the F16 file loads in stock but generates garbled output), and PQ2_0 segfaults on AVX-512 CPUs (marked fixed in source in the pinned KNOWN_ISSUES, merged 2026-09-23).

TL;DR
Run it: there is no ollama library build — download the GGUF from prism-ml/Ternary-Bonsai-2-27B-gguf (this page pins the file) and run it with PrismML's llama.cpp fork (CUDA or Metal); the MLX build needs its bundled loader / their mlx fork. Any 12GB card handles the full 32K context.
Baseline: 32K context, 22.5 GiB usable on a 24GB card — the one config this page promises at full comfort. The quant table's main column prices the 4K load (the community runtime default: weights + overhead + the KV term at 4K); each row's Note prices the full 32K load this page promises (8.2 GiB at PTQ1_0). Data verified 2026-10-12; the low-bit field moves fast — re-check the pinned sources.

Ternary-Bonsai-2-27B is PrismML's ternary quantization-aware training derivative of Alibaba's Qwen3.8-27B: the same 64-layer GDN hybrid (48 Gated-DeltaNet linear-attention layers + 16 full-attention, config.json, architecture unchanged per the publisher), re-trained end-to-end at a true 1.72 bits per weight — ternary g128 with FP16 group scales in a rotated basis, covering embeddings, attention and MLP projections, and the LM head with no high-precision escape hatch. The card counts 27.36B parameters total (24.35B language backbone + 2.54B embedding/LM head + 0.46B vision tower; the vision tower ships as a separate mmproj pack and stays out of these text-inference sizes). Publisher-reported runs: 84.78 thinking-mode average vs the FP16 base's 86.32 on 14 benchmarks (EvalScope + vLLM, H100), 91.1 tok/s decode on an RTX 4090 for PTQ1_0 — links in the pinned sources.

Data verified · sources pinned in Where every number comes from

Chart: one column per VRAM platform from 12GB up to 48GB-class (usable VRAM, GiB), zoned green = comfortable, amber = tight, red = no fit; the accent staircase sits at 9.3–10.7 GiB — every card's 32K ceiling is a ternary build (PQ2_0 on the 12GB card, MLX-2BIT everywhere else); the 24GB × PTQ1_0 sweet spot is marked by a highlight bar at 14.3 GiB of headroom; only the FP16 reference misses every consumer column, topping out above the 48GB-class door
One column per GPU, colored by verdict zone; the staircase is each card's 32K ceiling quant with the classic KV bound counted — and the whole staircase lives inside a two-GiB band: the 12GB card tops out at PQ2_0 (9.3 GiB at the bound, tight), every bigger card at the MLX-2BIT build (10.7 GiB). The only red on the chart is the FP16 reference (52.8 GiB at the bound), which misses every consumer column — the 48GB-class door (46.5 GiB usable) stops there too. The highlighted level is the 24GB × PTQ1_0 sweet spot: 8.2 GiB against 22.5 GiB usable — and the 12GB card already runs that same build, tight. The 48GB-class platform is one column (2× RTX 3090 24GB / 6000 Ada) — two cards are not one card doubled.

How much VRAM at each quantization? (weights + overhead + 4K KV, batch 1)

Main column totals at 4K context (the community runtime default): weights + overhead + the classic stacked KV bound at 4K (config-derived for this GDN hybrid: 16 full-attention layers' linear growth ÷ 8 + 48 linear layers' constant state; actual ≤ value). The KV column carries the @32K bound per row for reference. The fit column judges each build's full 32K load (8.2 GiB at PTQ1_0) against usable VRAM. Weights are actual file sizes.
QuantizationVRAM needed @4KKV @32K provisional i · beyond the @4K columnSmallest tracked fitNote
PTQ1_06.4 GiB2.148 GiBRTX 3060 12GBmeasured · at 32K: 8.2 GiB
PQ2_07.6 GiB2.148 GiBRTX 3060 12GBmeasured · at 32K: 9.3 GiB
MLX_2BIT8.9 GiB2.148 GiBRTX 3060 12GB · ≤~28K ctxmeasured · at 32K: 10.7 GiB
F1651.0 GiB2.148 GiB—measured · at 32K: 52.8 GiB

GB vs GiB: card names are the manufacturer's nominal GB; totals here are GiB (230 bytes) — a "24GB" card holds 24 GiB, and a file quoted 5,946,648,928 B in decimal is the same 5.54 GiB (the publisher's "5.95 GB" is the same file in decimal). Caliber →

The 48GB-class doors, spelled out: a dual-GPU combo (2× 24GB; not one card doubled), a workstation card (RTX 6000 Ada, 48GB), or a Mac Studio (unified memory; runs, slower tok/s). For Ternary-Bonsai-2-27B they only matter for the FP16 reference build — the ternary builds fit anywhere.

How this page computes the numbers (reproduce any cell)
  • usable VRAM = nominal minus reserve, per card: 12GB → 10.5 GiB, 16GB → 14.5 GiB, 24GB → 22.5 GiB, 32GB → 30.0 GiB.
  • total@32K = weights + overhead + KV@32K; KV@32K = 2.148 GiB (config-derived — 70,386 B/token effective at 32K; hybrid models carry a constant state on top, composition in sources).
  • total@4K (main column) = total@32K − (KV@32K − 0.148) × 7/8 — the constant state (0.148 GiB on this hybrid) is not scaled down at shorter context; only the linear part divides by eight.
  • The "≤~XK ctx" note = 8K + 32K × (usable − total@8K) ÷ KV@32K — the context length that exactly fills the card (KV grows linearly with context on this model).
  • A build fits a card at 32K when total@32K ≤ usable; tight = under 2.5 GiB of headroom, one site-wide threshold.

Is your GPU enough? (find your card: one row tells you)

Ceilings at 32K context with the KV bound counted (the stricter case), usable VRAM = nominal minus 1.5 GiB on 24GB-class, minus 2.0 GiB at 32GB. Two stories only: the 12GB card tops out at PQ2_0 (9.3 GiB at the bound, 1.2 GiB spare — tight), because the bigger MLX-2BIT build (10.7 GiB) overshoots its 10.5 GiB usable; every other listed card tops out at MLX-2BIT. On NVIDIA silicon the practical pick is the PTQ1_0 GGUF — smaller (8.2 GiB at the bound) and faster on Ada-class cards (91.1 vs 81.2 tok/s decode on an RTX 4090, publisher-measured) — the MLX file is Apple's format. Rows are ceilings — the biggest build that fits, not the page's pick; the recommendation lives in the hero and the chart's highlighted band.
Your GPUVRAMBiggest quant that fits (ceiling)How it feels
RTX 3060 12GB12 GBPQ2_0 (2-bit) · 9.3 GiB1.2 GiB spare at 32K (incl KV bound)
RTX 4060 Ti 16GB16 GBMLX_2BIT (2-bit) · 10.7 GiB3.8 GiB spare at 32K (incl KV bound)
RTX 3090 24GB24 GBMLX_2BIT (2-bit) · 10.7 GiB11.8 GiB spare at 32K (incl KV bound)
RTX 4090 24GB24 GBMLX_2BIT (2-bit) · 10.7 GiB11.8 GiB spare at 32K (incl KV bound)
RTX 5090 32GB32 GBMLX_2BIT (2-bit) · 10.7 GiB19.4 GiB spare at 32K (incl KV bound)

Quants stack by size: each GPU has exactly one ceiling — a card that runs a bigger build runs every smaller one. Main-column totals price the 4K load (weights + overhead + the KV term at 4K — the community runtime default); each row's Note prices the full 32K load this page promises (PTQ1_0 at 32K = 8.2 GiB), and the CPU path trades tok/s for the same headroom on plain RAM.

What GPU should you buy for it? (the 24GB sweet spot logic)

The sweet spot
12 GB
Buys you
the full 32K ternary config — tight; 24GB buys zero-thought comfort
Representative hardware
a used RTX 3060 12GB — or an 8GB-class phone at 4K context
The logicTernary-Bonsai-2-27B narrows but doesn't break the site's usual advice. The whole 32K config is 8.2 GiB, so a used RTX 3060 12GB (10.5 GiB usable) already runs everything — with 2.3 GiB spare, which is "tight" by this site's 2.5 GiB threshold, so 24GB is the buy-once option if you don't want to think about context lengths. The value floors below that: an 8GB-class card or phone at 4K context (≈6.4 GiB) and a pure-CPU box — the ternary build exists precisely so 27B-class quality runs where 27B-class VRAM doesn't.
Why it fitsTernary weights are 5.54 GiB where the FP16 original is 50.1: the entire memory bill collapses to the size of a mid-size KV cache. At 32K the classic bound adds 2.1 GiB (16 full-attention layers' growth plus the 48 GDN layers' constant state) plus ≈0.5 GiB of runtime overhead — 8.2 GiB all-in at PTQ1_0.

⚠ Tight is a site-wide threshold: under 2.5 GiB of headroom — and on this page it actually bites. PTQ1_0 @32K leaves 2.3 GiB on a 12GB card (tight) and the 12GB ceiling build PQ2_0 leaves 1.1 GiB (tight); 24GB clears everything with 14.3 GiB spare. The only no-fit rows are the FP16 reference (52.8 GiB at the bound) — datacenter doors. All totals carry the classic KV bound, so these verdicts are stable, not flip-check rows.

Tracked builds (actual file sizes, not theory)

One row per build we track. verified = we read the file listing; reported = community or publisher numbers, linked, not re-measured by us.
BuildPublisherFile size24GB @32KSource
PTQ1_0prism-ml5.5 GiBOK · 8.2HF @b072e1d3 verified
PQ2_0prism-ml6.7 GiBOK · 9.3HF @b072e1d3 verified
MLX_2BITprism-ml8.0 GiBOK · 10.7HF @fcba37d2 verified
F16prism-ml50.1 GiBNO · 52.8HF @b072e1d3 verified

One publisher, four builds: prism-ml ships two custom ternary GGUF packings — PTQ1_0 (5.54 GiB, trits packed densely at 1.75 bits/weight, the build this page recommends) and PQ2_0 (6.71 GiB, each trit in a 2-bit slot at 2.13 bits/weight, faster prompt processing) — plus the FP16 reference (50.11 GiB) and an MLX 2-bit build for Apple silicon (8.01 GiB, consumed by its bundled loader). The vision tower is not in any of these files: it ships as separate mmproj packs (BF16/Q8_0) and is loaded only when an image actually arrives. All four builds need a PrismML runtime path — the GGUFs load only in PrismML's llama.cpp fork, the F16 file garbles in stock llama.cpp (it applies metadata only the fork reads), and the MLX build needs its bundled loader (LM Studio's MLX runtime can't load it yet) — see the pinned KNOWN_ISSUES before planning a deployment.

Self-host or API?

API $/1M (in/out)
live prices via OpenRouter
Self-host monthly
a 12GB card you already own ≈ power only
Breakeven
—

API prices are sourced from OpenRouter (linked, not re-verified). We have not pinned a price for Ternary-Bonsai-2-27B, so the breakeven cell stays empty rather than guessing. When a price is pinned, this block compares API cost per million tokens against self-hosting on your own card.

Where every number comes from (every figure carries its tag)

Weights: pinned file sizes at pinned revisions.
Totals: measured weights + KV as the classic stacked upper bound (GDN hybrid: full-attention growth + linear constant state, config-derived, actual ≤ value) + measured overhead. This page exists for one config: the ternary 27B × 32K context — near-FP16 quality in a footprint any recent GPU fits.
Caliber: all figures in GiB (230 bytes) — VRAM is binary-native. Baseline: 32K context, 22.5 GiB usable on 24GB cards — the one config this page promises at full comfort (12GB cards join, tight; the ladder above shows the 32K ceiling everywhere). KV @32K is the classic stacked bound for this GDN hybrid (2.0 GiB growth on 16 full-attention layers + 0.148 GiB constant state on 48 linear layers, config-derived, unmeasured): actual ≤ value. Verify before buying hardware. How we compute these numbers →
What each number slot is made of. These tags are the legend for every badge on this page: they say what kind of evidence a number is, and what a verdict built on it can claim.
TagSlotWhat it isWhat the verdict can claim
reportedmodelHugging Face config.json (hypothesis-parameter carrier; nested Qwen3.5-arch text_config, vision tower excluded from sizing)Tight, conditional — stands on the linked source, re-checkable by you.
reportedstaticHF model page (prism-ml/Ternary-Bonsai-2-27B-mlx-2bit)Tight, conditional — stands on the linked source, re-checkable by you.
provisionalkvKV cache @ 32K — no published measurement for Ternary-Bonsai-2-27B in our sources (ternary long-tail model); the page shows the classic stacked bound instead: 2.0 GiB growth (16 full-attention layers × 65,536 B/token) + 0.148 GiB GDN constant state (48 linear layers), config-derived, actual ≤ valueVery likely right, order of magnitude only — replaced the moment measured values land.
measuredoverheadDeployment overhead — llama.cpp FA-on compute buffer anchor (507 MiB; measured empirical; same constant as the other champion pages)Determinate — "it runs" means it runs.
measuredstaticHF repo tree (prism-ml/Ternary-Bonsai-2-27B-gguf) — PTQ1_0/PQ2_0/F16 single-file sizes (mmproj packs excluded as auxiliary); pinnedDeterminate — "it runs" means it runs.
reportedstaticPrismML quality/runtime claims (thinking avg 84.78 = 98.2% of FP16 on 14 benchmarks, EvalScope+vLLM H100; llama-bench RTX 4090 TG128 91.1/81.2 tok/s; M5 Pro 28.1) — prism-ml/Ternary-Bonsai-2-27B-gguf READMETight, conditional — stands on the linked source, re-checkable by you.
reportedstaticPrismML runtime constraints (stock llama.cpp/Ollama/LM Studio can't load PTQ1_0/PQ2_0; F16 garbles without prism metadata; PQ2_0 segfaults on AVX-512 CPUs; MLX build needs its bundled loader) — KNOWN_ISSUES.mdTight, conditional — stands on the linked source, re-checkable by you.
Pinned sources: every row clickable and dated; repo sources commit-pinned (living docs tracked as latest).
Hugging Face config.json (hypothesis-parameter carrier; nested Qwen3.5-arch text_config, vision tower excluded from sizing)@fcba37d2accessed 2026-10-11
HF model page (prism-ml/Ternary-Bonsai-2-27B-mlx-2bit)@fcba37d2accessed 2026-10-11
KV cache @ 32K — no published measurement for Ternary-Bonsai-2-27B in our sources (ternary long-tail model); the page shows the classic stacked bound instead: 2.0 GiB growth (16 full-attention layers × 65,536 B/token) + 0.148 GiB GDN constant state (48 linear layers), config-derived, actual ≤ valuelatest—
Deployment overhead — llama.cpp FA-on compute buffer anchor (507 MiB; measured empirical; same constant as the other champion pages)latestaccessed 2026-10-12
HF repo tree (prism-ml/Ternary-Bonsai-2-27B-gguf) — PTQ1_0/PQ2_0/F16 single-file sizes (mmproj packs excluded as auxiliary); pinned@b072e1d3accessed 2026-10-12
PrismML quality/runtime claims (thinking avg 84.78 = 98.2% of FP16 on 14 benchmarks, EvalScope+vLLM H100; llama-bench RTX 4090 TG128 91.1/81.2 tok/s; M5 Pro 28.1) — prism-ml/Ternary-Bonsai-2-27B-gguf READMElatestaccessed 2026-10-12
PrismML runtime constraints (stock llama.cpp/Ollama/LM Studio can't load PTQ1_0/PQ2_0; F16 garbles without prism metadata; PQ2_0 segfaults on AVX-512 CPUs; MLX build needs its bundled loader) — KNOWN_ISSUES.mdlatestaccessed 2026-10-12

FAQ

Can Ternary Bonsai 2 27B run on a consumer GPU?

On essentially any of them, at full 32K context. The PTQ1_0 build totals 8.2 GiB (5.54 GiB weights + ≈0.5 GiB runtime overhead + the 2.1 GiB classic KV bound) — an RTX 3060 12GB runs it with 2.3 GiB to spare, which this site calls tight (under 2.5 GiB of headroom), and a 24GB card runs it with 14.3 GiB spare. At 8K context the load drops to 6.7 GiB and the 12GB card is comfortable; at 4K it lands at ≈6.4 GiB — 8GB-class territory. The catch is not the GPU, it is the runtime: the GGUF files load only in PrismML's llama.cpp fork (see the fork question below).

How is Ternary Bonsai 2 27B only 5.54 GiB?

It is a true ternary quantization, not a rounding quant: every weight takes a value in {−1, 0, +1} with one shared FP16 scale factor per group of 128 weights — 1.585 bits of information per weight plus the amortized scale lands at a measured 1.72 bits per weight across the whole model, with no high-precision escape hatch (embeddings, attention and MLP projections, and the LM head are all ternary; only the 26.2M-parameter recurrent-state path and normalization weights stay higher, already counted in the 1.72). The weights are also stored in a Hadamard-rotated basis that the runtime must apply. PTQ1_0 packs the trits densely at 1.75 bits per weight — that is the 5.95 GB / 5.54 GiB file; PQ2_0 stores each trit in a 2-bit slot (2.13 bits per weight, 7.21 GB / 6.71 GiB), trading footprint for cheaper unpacking and faster prompt processing.

What does it run on — Ollama, LM Studio, stock llama.cpp?

None of them, as of 2026-10-12: per the publisher's KNOWN_ISSUES, stock llama.cpp, Ollama and LM Studio (GGUF) cannot load the PTQ1_0 or PQ2_0 files at all — they are custom ternary GGUF types — and the F16 file loads in stock llama.cpp but produces garbled output, because it depends on rotation metadata only PrismML's build applies. The working paths are: PrismML's llama.cpp fork (CUDA and Metal) with the GGUF packs, or the MLX build with its bundled loader (mlx-vlm 0.7.1+ for image input). One more CPU caveat: PQ2_0 segfaults while loading on AVX-512 CPUs (AMD Zen 4/5, some server chips) even with all layers offloaded to a GPU — pick PTQ1_0 for CPU-centric boxes.

How much VRAM does Ternary Bonsai 2 27B need at 32K context?

8.2 GiB all-in for PTQ1_0: 5.54 GiB weights + 0.5 GiB runtime overhead + 2.1 GiB KV bound. The KV figure is the classic stacked bound for the GDN hybrid architecture (16 full-attention layers grow linearly with context; the 48 Gated-DeltaNet linear layers hold a constant 0.148 GiB state) — config-derived, unmeasured, actual ≤ value. At 4K context the KV term drops to ≈0.4 GiB and the total lands at ≈6.4 GiB, which is why phones enter the picture.

Does Ternary Bonsai 2 27B run on a CPU or a phone?

That is its home turf, with the fork caveats above. Publisher-measured decode on Apple silicon runs 28.1 tok/s on an M5 Pro laptop at a 7.2 GB footprint (PQ2_0, Metal, quiet machine — the publisher notes a ±4% swing with background load), 47.0 tok/s on an M5 Max and 18.0 on an M4 Pro on an earlier pre-rotation build, reported pending re-measurement. For phones: the PTQ1_0 build at 4K context totals ≈6.4 GiB, so an 8GB-class phone runs it tight and a 12GB-class phone runs it with room — via the MLX path with its bundled loader. On x86 CPUs use PTQ1_0: PQ2_0 crashes on AVX-512 hardware during load (marked fixed in source in the pinned KNOWN_ISSUES, merged 2026-09-23).

How good is Ternary Bonsai 2 27B — what do the benchmarks say?

Publisher-reported, but unusually well-controlled: EvalScope + vLLM on H100, 14 benchmarks in thinking mode, against the Qwen3.8-27B FP16 reference and conventional quants of the same base. The ternary build scores an 84.78 thinking average — 98.2% of FP16 (86.32), within 0.4 points of UD-Q4_K_XL (85.18), and twelve points above IQ2_XXS (72.59) at about 82% of its size. The gap vs conventional 2-bit is not uniform: IQ2_XXS collapses exactly where reasoning chains matter (AIME26 57.5, LiveCodeBench 56.4) while Bonsai 2 holds those benchmarks (95.83, 90.07); math is 96.57 vs the base's 97.06 and coding is level (89.42 vs 89.07). Treat these as the publisher's numbers — we link them, we did not re-run them.

How does Ternary Bonsai 2 27B differ from the original Bonsai-27B?

Same publisher, different trade. The original Bonsai-27B is a binary (two-value) 1.125-bits-per-weight QAT of Qwen3.6-27B — a 3.5 GiB weights file whose quality lands between conventional Q2 and Q4_K_XL. Bonsai 2 moves to ternary values on the newer Qwen3.8-27B base: 1.72 bits per weight, a 5.54 GiB file, and a quality story that flips from 'smallest, with a quality cost' to 'within half a point of UD-Q4_K_XL at a third of its footprint'. The original stays the raw-size champion — nothing on this site beats a 3.5 GiB 27B-class model — while Bonsai 2 is the pick when the quality-per-GiB ratio matters more than the last two GiB.

How does this site compute these VRAM numbers?

Weights are measured file sizes at pinned revisions (sources below); totals add runtime overhead plus the KV cache at 32K context. Here KV@32K = 2.148 GiB: 65,536 B/token across the 16 full-attention layers plus the 0.148 GiB GDN constant state (config-derived). A build fits a card at 32K when the total clears usable VRAM (nominal minus reserve), and tight means under 2.5 GiB of headroom — the full formula lives in the method box under the quantization table.