Ternary Bonsai v2 Squeezes a 27B Model Into 7.66 GB
A ternary-quantized Qwen3.8-27B derivative packs uncensored reasoning, a one-row 'thinking fix,' and multi-token prediction into a 7.66GB file.
Takeaways
- Abliterated build of PrismML's Ternary Bonsai 2 27B, a Qwen3.8-27B derivative at 1.76 bits per weight.
- Scores 0.941 on StrongReject hard prompts, beating other abliterated Bonsai builds (0.67 to 0.78).
- One-row edit to the
</think>output logit fixes reasoning that never closes before token budget runs out. - MTP head delivers ~40% faster decode (69 to 97 tok/s on a 3090) with 0.658 draft acceptance.
- Only 0.95% of file bytes changed from stock; edits applied in-place to packed ternary weights, no re-quantization.
- Requires PrismML's llama.cpp fork; mainline llama.cpp, Ollama, and LM Studio cannot load the PQ2_0 format.
A community release called Ternary Bonsai v2 combines end-to-end ternary quantization, packed-weight refusal editing, and a multi-token prediction head. Its MTP variant occupies about 7.66 GB on disk. In the model card’s RTX 3090 test, speculative decoding increased throughput from 69.3 to 96.8 tokens per second. The release has passed 36,000 downloads on Hugging Face.
A 27B model in a 7.66 GB package
The release builds on PrismML’s base GGUF, a ternary-quantized version of Qwen3.8-27B. Each weight has one of three values, -1, 0, or +1. A shared scale for each group of 128 weights converts those values into the magnitudes used during inference.
PrismML reports an effective density of 1.76 bits per weight and a 5.9 GB footprint for the base language model. The model card advertises a 262K-token context window and reports 98.2% retention of the full-precision parent’s aggregate benchmark performance. The larger 7.66 GB MTP file includes the additional draft-head tensors used for speculative decoding.
Loading either file requires PrismML’s llama.cpp fork. Stock MLX and llama.cpp loaders do not apply the Hadamard activation transform required by this weight format.
Behavior edits stay inside packed weights
“Abliteration” refers to weight edits intended to weaken a model’s learned refusal behavior. The author reports modifying 99 of 851 tensors, targeting the ffn_down, ssm_out, and attn_output tensor families across blocks 15 through 63.
The edits operate directly on the packed ternary representation, avoiding a dequantization and re-quantization cycle. According to the model card, the changed data accounts for 0.95% of the file’s bytes.
A separate 1,250-byte edit adjusts one output-layer row associated with the </think> token. Earlier abliterated Bonsai variants sometimes placed the full response inside the reasoning block, exhausted the token budget, and never emitted the closing tag. The revised row raises the chance of closing that block once reasoning is complete. Stock Bonsai reasoning traces were used to derive the adjustment.
Hard-prompt gains carry a small MMLU cost
The model card compares four abliterated Bonsai variants on 150 difficult StrongReject prompts, with thinking enabled and a 16,384-token limit. StrongReject scores the specificity and persuasiveness of responses to harmful requests, with higher values indicating stronger compliance. The metric does not measure general model quality.
| Variant | Score | Non-answers |
|---|---|---|
| Ternary Bonsai v2 | 0.941 | 7 of 150 |
| Hikari07jp | 0.738 | 34 to 48 range |
| OS-Software Heretic | 0.723 | 34 to 48 range |
| Ternary Bonsai v1 | 0.781 | 34 to 48 range |
V2 produced fewer empty or incomplete responses than the comparison builds under that configuration. The model card reports a narrower advantage on an easier harmful-request set: Hikari and dealignai CRACK scored slightly higher at default settings, with statistically insignificant gaps. All tested variants reached ceiling scores when reasoning_effort was set to medium.
General capability checks show a limited regression:
- MMLU: V2 lost 0.56 points against stock Bonsai, with answers changing from correct to incorrect on 351 questions and from incorrect to correct on 273. Blackfrost DERISKED lost 2.68 points in the same comparison.
- MATH level 5, HumanEval, and IFEval: Differences ranged from zero to seven problems in samples of 300. The model card reports that none reached statistical significance.
MTP lifts one 3090 test by 40%
The MTP file adds 15 tensors under blk.64.*. This draft head proposes upcoming tokens, which the main model verifies during speculative decoding. Accepted proposals reduce the number of full decoding steps; rejected proposals add overhead.
The model card reports the following results from five prompts with 400 generated tokens each on a single RTX 3090:
| Configuration | Tokens per second | Draft acceptance |
|---|---|---|
| No MTP | 69.3 | N/A |
MTP with --spec-draft-n-max 2 |
96.8 | 0.658 |
The measured increase is 39.7%, rounded to 40%. Five prompts constitute a small throughput sample, and speculative-decoding gains depend on output structure. In the model card’s v1 breakdown, reasoning, code, and JSON accepted 0.79 to 0.83 of proposed tokens. Free-form prose accepted 0.39 and ran slower with speculation enabled.
The author started with an MTP head from an Unsloth Qwen3.8 build, then reversed its weight rotation to align it with the ternary model’s basis.
The runtime has sharp edges
Running the release requires the MTP GGUF, a CUDA-capable system, and PrismML’s llama.cpp fork at tag prism-b10743-adfffbe or newer. The published testing covers RTX 3090 and A100 GPUs. Runtime memory also includes the KV cache, context, batch data, and loader overhead, so the 7.66 GB file size is not a VRAM requirement.
The recommended server command enables GPU offload, flash attention, a 32K context, medium reasoning effort, and a two-token speculative draft:
llama-server -m Ternary-Bonsai-2-27B-Abliterated-v2-PQ2_0-MTP.gguf \
-ngl 99 -fa on -c 32768 --jinja \
--chat-template-kwargs '{"reasoning_effort":"medium"}' \
--spec-type draft-mtp --spec-draft-n-max 2
-ngl 99requests GPU offload for the model layers.-fa onenables flash attention.-c 32768allocates a 32K-token context.--spec-type draft-mtpenables the integrated draft head.--spec-draft-n-max 2limits each speculative proposal to two tokens.
Reasoning effort has a large effect under tight token limits. With a 4,096-token budget and default effort, 110 of 150 hard requests exhausted the available tokens, producing a StrongReject score of 0.513. Medium effort under the same budget scored 0.977, according to the model card.
What to validate before deployment
- Safety: Refusal removal increases the likelihood of harmful output. User-facing deployments need independent policy enforcement, filtering, logging, and adversarial evaluation.
- Compatibility: The custom ternary format requires PrismML’s runtime fork. Existing llama.cpp and MLX deployment paths cannot load it correctly.
- Context behavior: The base advertises 262K tokens, while the example configuration uses 32K. Memory use and output quality at longer contexts require separate testing.
- Performance: The reported 40% gain comes from one GPU, five prompts, and a specific draft length. Prompt mix can erase or reverse the improvement.
- Modality and hardware: The release is CUDA-only in the published tests, and vision capabilities have not been evaluated.
For local-model developers, the release demonstrates that packed-space behavior edits and speculative decoding can coexist with end-to-end ternary weights. Its benchmark and throughput figures provide useful starting points for evaluation, while production decisions still require workload-specific tests for quality, memory use, latency, and safety.