← back to vectors · latest commit 2026-10-18

Ternary-Bonsai-2-27B-Steered

Secondchancee ·V1 ·1 file ·apache-2.0
Author's description Source: Hugging Face · Secondchancee/Ternary-Bonsai-2-27B-Steered ↗

Ternary-Bonsai-2-27B (Uncensored / Steered Edition)

This repository provides Ternary-Bonsai-2-27B-PQ2_0 coupled with a dedicated Refusal Cancellation Control Vector (refusal_vector_27b.gguf) to bypass alignment refusals, preachy lecturing, and refusal barriers at inference time.


⚡ Key Highlights

  • Architecture: Qwen 3.x 27B derivative (64 layers, 4 KV heads).
  • Quantization: 1.58-bit Ternary (PQ2_0), weighing only 7.21 GB on disk.
  • Full Context: Up to 131,072 tokens (128k context) supported in <10 GB VRAM.
  • Max Generation Output: Up to 16,384 tokens.
  • Refusal Steering: PCA control vector across all 64 decoder layers that subtracts the refusal subspace at runtime ($\alpha = -1.0$).

❓ How Refusal Removal Works on This Model

Unlike traditional FP16 models where weights are directly projected and re-quantized, ternary models use discrete ${-1, 0, 1}$ bitplanes that cannot be permanently altered without destroying the integer quantization kernels.

Instead, this repository uses native llama.cpp Control Vector Steering (--control-vector-scaled refusal_vector_27b.gguf:-1.0). At every generation step, the refusal direction is dynamically subtracted from the residual stream at full float precision.

What this achieves:

  • No moralizing lectures: The model ceases outputting preambles like "I cannot assist with...", "As an AI...", or ethical lectures.
  • Direct technical analysis: Explains vulnerabilities, reverse engineering, security mechanics, and sensitive topics objectively.
  • Zero weight degradation: Preserves the original 1.58-bit ternary precision and reasoning capabilities without perplexity collapse.

🚀 Quickstart: Run with llama.cpp

1. Download Files

huggingface-cli download Secondchancee/Ternary-Bonsai-2-27B-Steered --local-dir ./bonsai-27b
cd ./bonsai-27b

2. Run API Server (OpenAI & Anthropic Compatible)

llama-server   -m Ternary-Bonsai-2-27B-PQ2_0.gguf   --control-vector-scaled refusal_vector_27b.gguf:-1.0   -ngl 99   --flash-attn on   --cont-batching   --cache-type-k q4_0   --cache-type-v q4_0   -c 131072   -n 16384   --port 8000   --host 0.0.0.0

3. Run in Terminal (CLI Mode)

llama-cli   -m Ternary-Bonsai-2-27B-PQ2_0.gguf   --control-vector-scaled refusal_vector_27b.gguf:-1.0   -ngl 99   -c 8192   -p "<|im_start|>user\nExplain the low-level mechanics of buffer overflows.<|im_end|>\n<|im_start|>assistant\n"

⚙️ Recommended Settings

  • Steering Strength (α): -1.0 (optimal balance). Values between -0.8 and -1.2 maintain high reasoning quality while suppressing refusals.
  • Reasoning Effort: If using client tools like Cursor, Roo Code, or Cline, set reasoning_effort to medium or high (xhigh).
  • Temperature: 0.6 – 0.7.

📜 Citation & Credits

  • Base Quantized Model by Prism ML
  • Steering methodology based on Arditi et al. (2024), "Refusal in Language Models Is Mediated by a Single Direction"
README history (1 version)
  1. 2026-10-17Upload README.md with huggingface_hub4d7ab233.2 KB
    Loading...
Abliteration catalog analysis
Vector classifier · v1 (classified 2026-10-30)
Method
V1: PCA on contrastive pairsZou et al. 2023, Representation Engineering; Vogel 2024, repeng
Also resembles
V3, V4
Confidence
60%
Types
refusal 1
File count
1 vector, grouped into 1 set below
How we classify →

Vectors in this repo

Commit history

  1. 2026-10-18Upload launch_stack.sh with huggingface_hub8dcee31
  2. 2026-10-18Upload setup_stack.py with huggingface_hub2ffe788
  3. 2026-10-17Upload lfm_gateway.py with huggingface_hubf8af9c3
  4. 2026-10-17Upload lfm_gateway.py with huggingface_hub3c03340
  5. 2026-10-17Upload lfm_gateway.py with huggingface_hubef6023c
  6. 2026-10-17Upload lfm_gateway.py with huggingface_hube51a3b3
  7. 2026-10-17Upload lfm_gateway.py with huggingface_hub74cd457
  8. 2026-10-17Upload lfm_gateway.py with huggingface_hub9170935
  9. 2026-10-17Upload lfm_gateway.py with huggingface_hub7f74201
  10. 2026-10-17Upload lfm_gateway.py with huggingface_hub2bc7203
  11. 2026-10-17Enable full native and parsed tool calls in Anthropic gateway2bd29c3
  12. 2026-10-17Deploy universal tool call extractor for all model formats20d78cc
  13. 2026-10-17Add full bidirectional tool calling and parameter extraction for ZCodebf6cec9
  14. 2026-10-17Upload flawless A100 gateway with native Anthropic reasoning and streaming support12482d3
  15. 2026-10-17Upload README.md with huggingface_hub4d7ab23
  16. 2026-10-17Upload Ternary-Bonsai-2-27B-PQ2_0.gguf with huggingface_hubffea514
  17. 2026-10-17Upload folder using huggingface_huba0128e7
  18. 2026-10-17initial commit51b9b5d
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration