← back to catalog · registered 2026-09-23 04:57

Override-6/Ternary-Bonsai-2-27B-abliterated-gguf

Override-6 27B GGUF 262K ctx
Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/Override-6%2FTernary-Bonsai-2-27B-abliterated-gguf"
Response includes
  • classification m8
  • files 5
  • hub_downloads_all_time 1,858
  • author_summary 1 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M8
Primary method

Repackaging (quantization)

Applied on top of direct removal inherited from the base model.
Confidence
MEDIUM
Inherited from base model
Why this label 3 signals
Method inferred from partial signals - repository name, related files, or tag patterns. Producer identity not confirmed; label may sharpen or shift as we gather more evidence.
  • 'abliterated' in name/tags
  • is_gguf=1
  • assume M1 (base ablation) + M8 (GGUF quant) - default when producer unknown
Refusal direction extraction

No specific extraction method could be identified for this model. The producer either did not document it or used a proprietary pipeline.

What is a refusal direction? →
Downloads · lifetime
2K
Likes
2
Model age
6w ago
created 2026-09-23
Downloads over time
Now4.5K→from0↑0%
01.7K3.3K5K0 on Sep 234.5K on Nov 7SepOctNov
Sep 23 → Nov 7 · 46 snapshots · spans 45 days

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Metadata

License
apache-2.0
Tags
llama.cpp gguf ternary llama-cpp abliterated uncensored bonsai hybrid-attention text-generation base_model:prism-ml/Ternary-Bonsai-2-27B-gguf base_model:quantized:prism-ml/Ternary-Bonsai-2-27B-gguf license:apache-2.0

Related

Control vectors

Total size
5.54 GB
Files
5
Quantizations
1
Registered
2026-09-23 04:57
Last updated on HF
2026-09-23 15:17

Files by quantization

Auxiliary files 5 files 5.54 GB
Ternary-Bonsai-2-27B-PTQ1_0-abliterated.gguf 5.54 GB 0b310654 download
LICENSE 9.94 KB 66a27ec5 download
README.md 7.28 KB 4de46706 download
.gitattributes 1.56 KB 40cb5e5e download
NOTICE.txt 411 B 275696b5 download

README current version from Hugging Face


license: apache-2.0
library_name: llama.cpp
pipeline_tag: text-generation
base_model:

  • prism-ml/Ternary-Bonsai-2-27B-gguf
    tags:
  • ternary
  • gguf
  • llama-cpp
  • abliterated
  • uncensored
  • bonsai
  • hybrid-attention

Ternary-Bonsai-2-27B — abliterated (still pure ternary)

This is an abliterated version of prism-ml/Ternary-Bonsai-2-27B-gguf
(PTQ1_0 packing). It keeps the exact original file size, 5,946,648,928 bytes:

  • Every tensor has its original type and shape.
  • All 66 edited weight matrices are still {-1, 0, +1} × fp16 group-128 scales.
  • On average 0.64% of their trits were flipped, and their scales were refit.
  • No tensor was upcast to a higher-precision format.

Created using Bonsai by Prism ML. Built from Qwen3.8-27B (Alibaba Cloud). See NOTICE.txt.

Usage

These files need the PrismML llama.cpp fork, exactly like the original. Stock llama.cpp cannot run
PTQ1_0 or apply the Hadamard activation transform.

# https://github.com/PrismML-Eng/llama.cpp/releases  (tested with prism-b10709-9a9394a, CUDA 12.4)
./llama-server -m Ternary-Bonsai-2-27B-PTQ1_0-abliterated.gguf -ngl 99 -fa on -c 32768

Sampling is the same as the base model: thinking mode temp 1.0, top_p 0.95, top_k 20.

Results

All numbers were measured locally on an RTX 4070 with the fork above.

Original PTQ1_0 Naive abliteration (writers re-quantized to Q6_K) This model
File size 5.95 GB 9.36 GB 5.95 GB
Harmful prompts, thinking mode: complied / deflected / refused 0 / 3 / 101 – 76 / 27 / 1
Harmful prompts, no-think mode: complied / deflected / refused / empty 1 / 8 / 95 / 0 44 / 50 / 10 / 0 74 / 30 / 0 / 0
MMLU, log-prob scoring (n=1000) 78.9 78.2 79.0
GSM8K, thinking mode (n=100) 94.0 93.0 94.0
KL divergence vs original, harmless chats 0 0.0240 0.0189
KL divergence vs original, wikitext-2 0 0.0134 0.0130

Evaluation setup

  • Harmful prompts: the 104 held-out prompts of mlabonne/harmful_behaviors (test split). Responses
    are labeled by an LLM judge (the original model in non-thinking mode, judge.py):
    • complied: it does what was asked
    • deflected: it answers with a sanitized, fictional or "ethical" substitute
    • refused
    • empty
  • KL divergence comes from llama-perplexity --kl-divergence against the original model. The
    harmless chat corpus is the original model's own answers to 200 held-out harmless_alpaca prompts.
  • Limits: these are subsets and spot checks, not the 14-benchmark thinking-mode suite reported by
    Prism ML. Coding, instruction following, tool calling, long context and vision were not
    re-evaluated. With 100 GSM8K questions, differences of ±2–3 points are noise.
  • Deflections remain: about a quarter of harmful requests still get a watered-down answer. A
    stronger setting reduces this at a measurable KL cost.

Abliteration process

The scripts are in scripts/. The fixed refusal direction is scripts/directions/dirs_proj_both.npy.

1. Why the usual recipe fails on a ternary model

Abliteration replaces every residual-stream writer W with W − α·r·rᵀW. On this model:

  • The per-weight change is far below one ternary step (about 1% of a step, at most half a step).
  • Re-quantizing the projected matrix therefore just rounds back to the original model, so a naive
    ternary abliteration silently does nothing.
  • The alternative is to store the writers at higher precision, which makes the file 60% bigger.

2. Refusal direction (make_dirs.py, tools/actdump.cpp)

  • Capture the residual stream (l_out) of every layer at the last prompt token, for 400 harmful and
    400 harmless training prompts.
  • Compute the direction at the layer-36 residual:
    • difference of means, harmful minus harmless
    • pooled over both answer positions: <think>\n (thinking mode) and </think>\n\n (no-think
      mode). The two per-mode directions only have cosine 0.64. A direction taken from one mode only
      leaves the other mode broken: the model returns empty answers.
    • orthogonalized against the harmless mean. The raw direction also carries general features;
      removing it wholesale gave KL ≈ 2.
  • On held-out prompts it separates harmful from harmless with Cohen's d ≈ 9.6 (thinking) and
    9.05 (no-think).

3. Ternary-preserving ablation (abliterate.py)

  • The trits are edited directly. The PTQ1_0 block codec is re-implemented and verified to round-trip
    byte-exact.

  • For each writer in layers 16–48, the exact delta −α·r·(rᵀW) is realized by unbiased
    stochastic trit flips
    , followed by a small greedy correction so that rᵀW′ = (1−α)·rᵀW holds
    column by column.

  • Per-component strength:

    • α = 2.0 on attention and linear-attention output writers (attn_output, ssm_out)
    • α = 0.7 on ffn_down

    MLP edits cost far more KL per unit of refusal removed, consistent with
    Heretic's findings.

  • The Hadamard rotation of this model is on the input axis only, so an output-side projection is
    exact in the stored basis.

4. Healing (heal.py, tools/wdump.cpp)

  • Capture the rotated inputs of every writer (H = E[xxᵀ]) on 16k calibration tokens:

    • alpaca train prompts with the original model's answers
    • GSM8K train thinking traces
    • harmful-prompt train responses
    • wikitext-2 train

    None of these overlap the evaluation sets.

  • For each edited writer, refit only the fp16 group scales by ridge least squares, per output row:
    min_s (s·B − w*) H (s·B − w*)ᵀ, where w* = (I − α·r·rᵀ)W is the exact abliterated target.
    Trits, layout and size are unchanged.

5. What didn't work (so you don't have to try)

Approach Result
Raw (unprojected) direction on all layers KL 1.4–7.8, model broken
Direction from the thinking position only many empty answers in no-think mode
Narrower layer bands (16–40, 16–44) refusal comes back (Hydra effect)
GPTQ trit re-selection output error is lower, but it does not remove the direction by itself
Two orthogonal directions worse on both refusal and KL
Overshoot α = 1.3–1.5 on all writers 0% refusal but KL 2–4× higher and many empty answers

Reproducing

  1. actdump on thinking and no-think prompt files (prompts.py), then make_dirs.py.

  2. wdump on the calibration corpus (gen_calib.py), all layers.

  3. Build the model:

    python abliterate.py --src Ternary-Bonsai-2-27B-PTQ1_0.gguf --out cand.gguf \
        --dirs directions/dirs_proj_both.npy --dir-layer 36 --layers 16-48 --alpha-attn 2.0 --alpha-ffn 0.7
    python heal.py --orig Ternary-Bonsai-2-27B-PTQ1_0.gguf --edited cand.gguf --out final.gguf --acts wacts \
        --dirs directions/dirs_proj_both.npy --dir-layer 36 --layers 16-48 --alpha-attn 2.0 --alpha-ffn 0.7 --recorrect 0
    
  4. Evaluate with evalmodel.sh (refusal + KL), bench.py, mmlu_lp.py and judge.py.

Stochastic flips use seed 0.

Disclaimer

This model has had its refusal behavior removed. It will produce content the original model would
decline to produce. You are responsible for how you use it and for complying with applicable laws.

README history 2 versions

The author's README evolved over time. Click a version to see its content at that point.

  1. 2026-09-23Card: add IFEval, NIAH and head-to-head comparison with other Bonsai 2 ablite...44c04249.5 KB
    Loading...
  2. 2026-09-23Model card, license, notice and abliteration scripts9c264e07.3 KB
    Loading...
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