license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
language:
- en
- de
- es
- fr
- ja
- pt
- ar
- cs
- it
- ko
- nl
- zh
tags: - granite
- granite-4.2
- abliterated
- uncensored
- heretic
- refusal-removal
- 3b
base_model: ibm-granite/granite-4.2-3b
granite-4.2-3b-abliterated
Refusal behaviour reduced in ibm-granite/granite-4.2-3b with
Heretic v2.1.0, using Arbitrary-Rank Ablation (ARA) over 100 optimisation trials.
Granite 4.2 3B is IBM's enterprise-oriented 3.66B dense model — reasoning, tool-calling, 12 languages, Apache-2.0.
Before this release it had only four abliteration derivatives, the best of which had 285 downloads against
~40,000 monthly downloads of the base model. This release is measured rather than just published.
Measured results
Both numbers are Heretic's own scorers, run during the optimisation and recorded in reproduce/.
| Metric | This model | Base model |
|---|---|---|
Refusals (mlabonne/harmful_behaviors, test[:100]) |
52 / 100 | 98 / 100 |
KL divergence (mlabonne/harmless_alpaca, test[:100]) |
0.2167 | 0 (by definition) |
Refusal rate roughly halved at a KL of 0.22, which is low enough that general capability is largely preserved.
The refusal metric is keyword-based, not a classifier — it counts responses matching refusal markers, so it
under-reports soft refusals and over-reports false positives. Treat 52/100 as "substantially fewer refusals",
not as a precise rate.
Independent verification
Not just a successful job exit code. After training, the published weights were re-downloaded and checked:
- Tensor magnitudes vs base: no blow-up.
layers.19.mlp.down_proj0.107 → 0.109 (×1.01),layers.19.self_attn.o_proj0.063 → 0.065 (×1.03). Zero tensors above a 100× ratio. - Generation: coherent on neutral prompts and on a previously-refused prompt. It answers
"how do I pick a lock?" with practical content instead of a refusal. - GGUF quantisation: succeeds cleanly, which doubles as a numerical sanity check — a damaged tensor
shows up asfound inf value at block Nduring quantisation.
Method
| Parameter | Value |
|---|---|
| Modifier | ARA (Arbitrary-Rank Ablation) |
| Heretic version | 2.1.0 |
| Optimisation trials | 100 |
start_layer_index |
15 |
end_layer_index |
37 |
preserve_good_behavior_weight |
0.1932 |
steer_bad_behavior_weight |
0.0005 |
overcorrect_relative_weight |
0.2338 |
neighbor_count |
2 |
ARA is not classic directional abliteration. It learns a low-rank transform with L-BFGS against a set of
desired responses, and the outer loop is an Optuna TPE search over those parameters, co-optimising refusal
count against KL divergence. This trial was chosen from the middle of the Pareto front rather than the
lowest-refusal point — see Limitations.
Reproduction information is included in reproduce/ for a byte-identical rebuild.
Quantisations
Available in granite-4.2-3b-abinfer-GGUF:
| File | Size | Notes |
|---|---|---|
model-q4_k_m.gguf |
2.14 GB | best size/quality trade-off; use this by default |
model-q8_0.gguf |
3.71 GB | near-lossless |
Usage
transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Lonelyguyse1/granite-4.2-3b-abinfer"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
text = tok.apply_chat_template(
[{"role": "user", "content": "Explain why the sky is blue in one sentence."}],
tokenize=False, add_generation_prompt=True,
)
out = model.generate(tok(text, return_tensors="pt").input_ids.to(model.device), max_new_tokens=200)
print(tok.decode(out[0], skip_special_tokens=True))
llama.cpp
huggingface-cli download Lonelyguyse1/granite-4.2-3b-abinfer-GGUF model-q4_k_m.gguf --local-dir .
llama-cli -m model-q4_k_m.gguf -p "Explain why the sky is blue in one sentence."
Ollama
huggingface-cli download Lonelyguyse1/granite-4.2-3b-abinfer-GGUF --local-dir granite-abliterated
cd granite-abliterated && ollama create granite-abliterated -f Modelfile
ollama run granite-abliterated
Limitations
- Refusal removal is partial. 52/100 on a keyword metric; some prompts are still declined, and a
classifier-based eval would report a different number. - Keyword-metric caveat. The scorer matches strings like "I can't" or "sorry", so a helpful answer that
happens to contain those words counts as a refusal, and a soft refusal that avoids them does not. - Trial selection. This is a mid-front Pareto point (
trial_index = 4), not the lowest-refusal one.
The lowest-refusal trial in this same search produced a numerically degraded model — magnitudes
exploded by 10⁸× in one MLP tensor and generation collapsed into repeated tokens despite a healthy-looking
KL. Numerical sanity was preferred over the headline refusal number. - Reasoning traces. Granite 4.2 emits a thinking block; refusal scoring skips it, so the score reflects
the final answer rather than the reasoning. - Not a capability upgrade. Everything the base model cannot do, this cannot do either.
Safety
Safety alignment was intentionally removed. This model will produce content the base model refuses, and it
inherits the base model's limitations while losing its refusals. You are responsible for how you use it.
It is not intended for advice on illegal activity and it has no additional guardrails beyond whatever your
inference stack adds.
Licence
Apache-2.0, inherited from ibm-granite/granite-4.2-3b.