How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
# Run inference directly in the terminal:
llama cli -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
# Run inference directly in the terminal:
llama cli -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
# Run inference directly in the terminal:
./llama-cli -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
# Run inference directly in the terminal:
./build/bin/llama-cli -hf OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
Use Docker
docker model run hf.co/OS-Software/Ternary-Bonsai-27B-heretic-ja-GGUF:BF16
Quick Links

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