← back to catalog · registered 2026-11-07 09:02

Abhijit-2k5/Ternary-Bonsai-2-9B-mlx-2bit-abliterated

Abhijit-2k5 9B multimodal
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/Abhijit-2k5%2FTernary-Bonsai-2-9B-mlx-2bit-abliterated"
Response includes
  • classification m1
  • files 4
  • author_summary 1 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M1
Primary method

Direct removal

No other method signals detected in this model.
Confidence
MEDIUM
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=0 (base model)
  • no specific method indicators - defaulting to M1 (most common)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
MEDIUM
Why we say so
primary_method=M1; difference-of-means is the reference extraction for M1/M3 (Arditi 2024)
Downloads · 30-day
0
Likes
1
Model age
today
created 2026-11-07

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
mlx safetensors prism_hadamard_qwen35 ternary bonsai refusal-direction steering image-text-to-text conversational base_model:prism-ml/Ternary-Bonsai-2-9B-mlx-2bit base_model:finetune:prism-ml/Ternary-Bonsai-2-9B-mlx-2bit license:apache-2.0
Total size
0 B
Files
4
Quantizations
1
Registered
2026-11-07 09:02
Last updated on HF
2026-11-07 13:37

Files by quantization

Auxiliary files 4 files 402 KB
refusal_dir.npz 387 KB 8130d489 download
LICENSE 9.94 KB 66a27ec5 download
README.md 3.29 KB 350dc9e2 download
.gitattributes 1.48 KB a6344aac download

README current version from Hugging Face


license: apache-2.0
library_name: mlx
pipeline_tag: image-text-to-text
base_model:

  • prism-ml/Ternary-Bonsai-2-9B-mlx-2bit
    tags:
  • mlx
  • ternary
  • bonsai
  • refusal-direction
  • steering

Ternary-Bonsai-2-9B-mlx-2bit-abliterated

Residual-stream steering directions for prism-ml/Ternary-Bonsai-2-9B-mlx-2bit. The packed 2-bit weights are unchanged. At inference, four language-model blocks subtract the refusal direction from the residual stream:

x' = x - alpha * (x · s) s

Default: alpha = 1 on layers 11, 19, 23, and 27. On a 12-prompt refusal probe set this dropped refusals from 12/12 to 0/12. Math, code, and short prose prompts still completed. The model still describes why a request is dangerous.

Files

File Contents
refusal_dir.npz Unit directions dir_{11,19,23,27} (float64, dim 4096), plus the harmful and harmless means they were built from

Download the base pack separately (~3.46 GB). Do not re-upload those weights.

hf download prism-ml/Ternary-Bonsai-2-9B-mlx-2bit --local-dir bonsai2-9b-mlx
hf download Abhijit-2k5/Ternary-Bonsai-2-9B-mlx-2bit-abliterated refusal_dir.npz
pip install "mlx-vlm>=0.7.8" numpy

Wrap each chosen block. lm.layers[i] must return the same structure it returned before the wrap (tensor, or a tuple whose first element is the hidden state).

import numpy as np
import mlx.core as mx
from mlx_vlm import load

class Steer:
    def __init__(self, inner, vec, alpha):
        self.inner = inner
        self.v = mx.array(vec.astype(np.float32))
        self.alpha = alpha

    def __getattr__(self, name):
        return getattr(self.inner, name)

    def __call__(self, *args, **kwargs):
        out = self.inner(*args, **kwargs)
        h = out[0] if isinstance(out, tuple) else out
        proj = (h @ self.v).astype(mx.float32)
        h = h - self.alpha * proj[..., None] * self.v
        return (h,) + out[1:] if isinstance(out, tuple) else h

data = np.load("refusal_dir.npz")
model, processor = load("bonsai2-9b-mlx")
lm = model.language_model
for i in (11, 19, 23, 27):
    lm.layers[i] = Steer(lm.layers[i], data[f"dir_{i}"], alpha=1.0)

Pass the Bonsai sampler explicitly (temperature=1.0, top_p=0.95, top_k=20 with thinking on). mlx_vlm.generate is greedy if you omit them.

How the directions were measured

Teacher-forced forward passes over 100 mlabonne/harmful_behaviors prompts and 100 tatsu-lab/alpaca prompts. Last 8 residual positions at layers 11, 19, 23, and 27, accumulated in float64. Direction is normalize(mu_harmful - mu_harmless) after two Gram-Schmidt steps against mu_harmless.

The residual stream is in the Hadamard-rotated basis used by this pack. A normalized Hadamard is orthonormal, so the projection is the same as in the unrotated basis.

Cosine between the two means: layer 11 = 0.880, 19 = 0.739, 23 = 0.734, 27 = 0.748.

Limits

  • Apple Silicon, MLX, mlx-vlm 0.7.8 or newer (model_type: prism_hadamard_qwen35).
  • Vision tower and MTP head are not steered.
  • Thinking mode was not measured under steering.
  • Re-measure if you change packs. These vectors match this 9B MLX 2-bit release only.
  • Context on an 8 GB machine is memory-bound, not the nominal 262K.

License

Apache 2.0, following the base model.

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