Kujira Strips Ternary Bonsai 2.5's Safety Refusals by Editing One Attention Head
A hobbyist researcher edits a single attention head in Prism ML's ternary Qwen3.8 27B to cut refusals from 92% to 27.6%.
Takeaways
- Kujira released a CHiPS-abliterated variant of Prism ML's Ternary Bonsai 2.5 27B, Apache 2.0.
- Refusal rate on 312 harmful prompts dropped from 92.0% to 27.6% across English, Japanese, and Chinese.
- The entire edit is one attention head (layer 33, head 16) in one tensor.
- Perplexity changes under 0.1%, short-task accuracy unchanged at 100%.
- Known issues: thinking traces 4.6x longer, 28/312 empty answers, 2 symbol loops.
- Single 7.91 GB
Q2_0-mtpGGUF, runs on stock llama.cpp b11556+.
Kujira has published a modified GGUF of Prism ML’s Ternary Bonsai 2.5 27B. The community release changes exactly one attention head in one layer of the 27-billion-parameter model. In the author’s evaluation, refusal markers on harmful prompts fell from 92.0% to 27.6%, while perplexity and accuracy on 36 short tasks remained effectively unchanged. The model card uses “abliterated” to describe this reduction in safety refusals.
A 27B model and a 1,024-column edit
Prism ML’s Bonsai 2.5 27B compresses Qwen3.8 27B with ternary weights, which primarily use three values: −1, 0, and +1 multiplied by a scale for each block. Prism reports a 5.9 GB footprint for its smaller strict-ternary packaging. The release improves SWE-bench Verified, a benchmark based on resolving real GitHub issues, from 60.8% for Bonsai 2 to 75.6%, compared with 80.6% for the full-precision model.
The edited artifact targets the larger 7.91 GB Q2_0-mtp package. That file includes a multi-token prediction draft head, which supports speculative decoding by proposing several future tokens at once. The 5.9 GB figure and the 7.91 GB download describe different packings of the same base model.
The Kujira modification targets head 16 in layer 33 within blk.33.ssm_out.weight, the projection that maps outputs from a linear-attention layer back into the model’s hidden state. Bonsai folds a block Hadamard rotation into the input side of this tensor. That fixed mixing transform spreads the logical one-head update across 1,024 of the tensor’s 6,144 columns. All other tensors in the 866-tensor file, including the draft head, are byte-for-byte identical to Prism ML’s original Q2_0-mtp GGUF.
CHiPS confines the edit
The CHiPS method, short for Causal Head-isolated Projection Steering, changes behavior without additional training. Its process has three stages:
- Measure which attention heads have the strongest causal effect on the target behavior.
- Estimate a vector representing that behavior within the selected heads’ outputs.
- Remove the component aligned with that vector while preserving the remaining output.
Many abliteration methods estimate a refusal direction in the residual stream and subtract it across multiple layers. CHiPS confines the projection to selected heads. That limited scope helps preserve low-bit weight structure, where large updates can push many values outside the available quantization levels. According to the model card, rounding the edited weights into Q2_0 retains 99.3% of the intended change.
Refusals fall while traces grow
The model card compares the original and edited files on 312 single-turn harmful requests, split evenly across English, Japanese, and Chinese. Both runs used the same seeds and sampling settings. The sample is modest, and refusal was measured through pattern matching rather than human review or a safety classifier.
| Metric | Original Bonsai 2.5 | CHiPS-abliterated |
|---|---|---|
| Refusal markers detected | 287 of 312 (92.0%) | 86 of 312 (27.6%) |
| Mean new tokens | 486 | 2,262 |
| Finished normally | 310 of 312 | 280 of 312 |
| Empty final answer | 2 | 28 |
| English perplexity | 8.516 | 8.514 |
| Short-answer tasks | 36 of 36 | 36 of 36 |
The refusal-marker rate dropped by 64.4 percentage points, while average generation length increased by roughly 4.7 times. The marker test measures explicit refusal wording, leaving response accuracy, safety, and usefulness unmeasured. A response that lacks a refusal phrase may still be incomplete, incoherent, or factually wrong.
The capability checks detected no degradation on their limited axes. Teacher-forced perplexity, which measures how much probability the model assigns to reference text, remained within 0.1% of the original across English, Japanese, and code. Both files also completed all 36 short-answer and formatting tasks correctly. Those checks are too small to establish parity on coding agents, tool use, long contexts, or multi-turn conversations.
Long traces expose the failure modes
The model card labels the current file a flawed preview and says a corrected version is in progress. It reports several concrete problems:
- Reasoning traces average 2,262 new tokens, compared with 486 for the original, with the largest increase in English.
- Twenty-eight responses finish with an empty final answer, compared with two for the baseline.
- Two responses enter repeated-symbol loops lasting hundreds or thousands of characters inside the reasoning block.
- Some responses still contain explicit refusal phrases detected by the pattern matcher.
- The modification cannot be transferred directly to the smaller
PTQ1_0andPQ2_0strict-ternary packages.
The published counters overlap because a response can finish normally while leaving its final-answer field empty. Developers evaluating the artifact should inspect reasoning traces, final-answer fields, stop conditions, and repetition rates separately.
A fourth weight level blocks smaller packs
The packing constraint follows directly from the edited values. In the original tensor, each weight is −1, 0, or +1 multiplied by its block scale. Q2_0 provides a fourth level, +2, and the edit uses that level for 391,876 values, about 1.2% of the tensor’s roughly 31.5 million weights. The tensor therefore no longer fits a strict-ternary representation, while standard Q2_0 can still encode and load it.
Old runtimes fail silently
The 7.91 GB file requires stock llama.cpp build b11556 or later, which includes the Hadamard activation runtime used by these weights. Older stock builds may load the GGUF without an error and then generate invalid output.
hf download Kujira/Ternary-Bonsai-2.5-27B-CHiPS-Abliterated-GGUF \
Ternary-Bonsai-2.5-27B-CHiPS-Abliterated-Q2_0-mtp.gguf --local-dir .
llama-server -m Ternary-Bonsai-2.5-27B-CHiPS-Abliterated-Q2_0-mtp.gguf \
-ngl 99 -fa on --jinja -c 32768 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0
The example attempts broad GPU offload with -ngl 99, enables Flash Attention with -fa on, applies the model’s Jinja chat template, and allocates a 32,768-token context. Systems with less GPU memory can reduce the offload setting. Total runtime memory exceeds the 7.91 GB file size because the server also needs space for the KV cache, compute buffers, and runtime state.
The model card recommends a presence_penalty of 0.9 and a max_tokens limit well above 4,096 to accommodate the longer reasoning traces. The default reasoning effort is xhigh; selecting medium shortens responses. Higher token limits also increase latency and the chance of repetition, so callers should enforce timeouts, repetition checks, and validation for empty final answers.
A server exposing this model inherits the risks created by weakened refusal behavior. Public or shared deployments require authentication, request limits, logging, output controls, and use-case-specific safety checks around the llama.cpp endpoint.
One head, bounded conclusions
Taken together, the results support a narrow technical claim: one head in this linear-attention layer is a high-leverage intervention point for refusal behavior under the tested prompts. The edit survives low-bit rounding, remains compatible with a standard inference runtime, and leaves the model’s other tensors unchanged. Localization of the full refusal mechanism remains unproven, as does generalization across prompt styles, languages, conversations, and downstream agent workflows.
The preview’s empty answers, longer traces, and repetition loops make it poorly suited to production coding agents or tool-calling systems. Its current value is as an Apache 2.0 research artifact for studying behavioral steering in compressed models. The model card says a corrected release is planned but provides no publication date.