How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF",
	filename="",
)
llm.create_chat_completion(
	messages = "No input example has been defined for this model task."
)

This is a decensored version of prism-ml/Ternary-Bonsai-27B-unpacked, made using Heretic v1.4.0 with the Arbitrary-Rank Ablation (ARA) method using a LoRA adapter and row-norm preservation

Abliteration parameters

Parameter Value
start_layer_index 10
end_layer_index 51
preserve_good_behavior_weight 0.6491
steer_bad_behavior_weight 0.0008
overcorrect_relative_weight 0.9874
neighbor_count 14

Performance

Metric This model Original model (prism-ml/Ternary-Bonsai-27B-unpacked)
Keywords 2/100 98/100
KL divergence 0.0243 0 (by definition)

Note: Performance testing, including the measurement of refusal rates, was conducted using Japanese datasets (harmless_alpaca_ja, harmful_behaviors_ja).


Ternary Bonsai 27B โ€” Unpacked FP16 Safetensors

FP16 safetensors (HuggingFace format) of the Ternary Bonsai 27B model. This repo exists for users who want to run Ternary Bonsai with stock HuggingFace tooling or frameworks that don't yet support the packed ternary format. The 2-bit hybrid-attention kernels are currently in our forks of MLX, mlx-swift, and llama.cpp โ€” once they land upstream, this unpacked version will no longer be needed.

We strongly recommend using the natively packed models instead. The packed format is where all the benefits of Bonsai come from โ€” a 7.2 GB deployed footprint (down from 54 GB), 95% of FP16 intelligence retained, and interactive decoding on everyday laptops (26 tok/s on an M5 Pro). This unpacked FP16 version is full-size and does not provide any of those advantages.

For the optimized ternary release models (recommended):

For the phone-class variant:

Downloads last month
1,300
GGUF
Model size
27B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support