Abliteration HandbookField guide
Start here

Complete abliteration curriculum

The single path through every method, setup, and script in this handbook. Goal: this repo is the most complete abliteration reference on the internet — papers, tools, math, hardware, and…

5 min read 4 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/13 sections reviewed

View original Markdown
Interactive companion

Explore the chapter map

Use the visual controls alongside the complete source chapter.

The single path through every method, setup, and script in this handbook. Goal: this repo is the most complete abliteration reference on the internet — papers, tools, math, hardware, and runnable code.

Hour 0 (no GPU): Stage 0.5 (guide → doctor → limits → self-check → demo). If you only want a working local checkpoint today, skip to Stage 2 after that. Come back here when you need the rest.

Paper word → chapter: paper-term-map.md.

Ethics first: risks-and-ethics.md. This handbook is for authorized factory QA, lab pentest, and research. Abliteration removes a refusal direction; it does not add skills and it does not authorize misuse.


What “complete” means here#

LayerWhat you get
TheoryArditi DIM → projected/norm-preserving → ORBA/Householder → multi-D cones → SAE/SOM/COSMIC
MethodsWeight projection, hooks, Heretic/Abliterix/ErisForge/OBLITERATUS/llm-abliteration
SetupsWindows / WSL / Linux / macOS / 8–80 GB VRAM / Apple Silicon / no GPU
ScriptsMeasure direction, bake weights, hook-only prototype, refusal-rate eval, LoRA export
EvalFactory / OSINT / CyberGym / XSTest / KL / GSM8K gates
Frontier2025–2026 papers + tools not covered by a single “uncensor with Heretic” blog

Companion maps: setup-encyclopedia.md · bleeding-edge.md · research-landscape.md · ../instructions/method-cookbook.md


Stage 0 — Vocabulary (30 min)#

Read overview.md then theory.md.

TermOne line
Refusal direction rUnit vector in residual space that predicts refuse vs comply
Mean-difference (DIM)r = normalize(mean(h_harmful) − mean(h_harmless))
Inference ablationh' = h − (h·r)r — reversible hook
Weight abliterationProject down_proj / o_proj so the layer cannot write r
Projected (T03)Remove the component of r that lies along the harmless mean
Norm-preservingRestore row norms after the edit (Heretic row_normalization = full)
ORBA / HouseholderReflection-based rank-1 edit; directional ablation (α=0) is the stable special case
Over-refusalModel refuses benign security/hardware prompts (wmic, nmap lab)

Stage 0.5 — Toy lab (10 min, no GPU)#

Do this before Heretic. The operators are the same math you will later apply to a checkpoint.

  1. Download one unique file from cxx-nightly: abliterate-cxx-windows-x64-msvc.zip · abliterate-cxx-linux-x64-gcc16.tar.gz · abliterate-cxx-macos-arm64-llvm.tar.gz.
  2. Unpack so examples/ sits next to the binary.
  3. abliterate-cxx guide then doctor then limits then self-check then demo. doctor must print cplusplus=202400; limits documents every pre-allocation guardrail.

Full path: cxx26-researcher-guide.md. This CLI is not a Heretic/GGUF substitute.


Stage 1 — Environment (30–90 min)#

Pick one row. Full matrices: setup-encyclopedia.md · ../instructions/setup-environment.md

HardwarePath
Windows + NVIDIA, 8–12 GBWSL2 Ubuntu + Heretic bnb_4bit — bitsandbytes is unreliable natively
Windows + NVIDIA, 24 GB+Native or WSL; config.production.toml
Linux + NVIDIANative Heretic; best path
Apple SiliconCloud/WSL surgery or MLX / Blasphemer / 199-biotech Gemma recipes; infer with mlx-lm / llama.cpp Metal
No GPUHour 0 is the C++26 toy lab (Stage 0.5). A real checkpoint still needs a rented GPU or an already-abliterated GGUF — CPU-only surgery is not the first hour
20B+ / MoE on 24 GBllm-abliteration 4-bit measure + sharded_ablate.py
powershell
python scripts/check_env.py

Stage 2 — First successful run (Heretic)#

  1. ../techniques/safety-guardrail-abliteration-methodology.md
  2. ../instructions/beginner-reproduction-methodology.md
  3. ../instructions/beginner-local-model-guide.md (tracks A/B/C)
  4. ../instructions/run-locally-ollama-lmstudio.md

Default flags that already live in handbook pins:

toml
orthogonalize_direction = true
row_normalization = "full"

Configs: sources/heretic-tools/config.low-vram.toml · config.production.toml


Stage 3 — Measure before you trust it#

GateDoc / command
Corpus countsnpm run eval:stats
Factory / OSINT / CyberGym JSONLevaluation.md · ../instructions/eval-driven-workflow.md
Marker-based refusal ratecxx/build/abliterate-cxx eval --jsonl <generations.jsonl>
Over-refusaldata/eval/xstest-overrefusal-sample.jsonl
CapabilityGSM8K / MMLU / HumanEval — see comparative-abliteration-benchmarks.md
Runtime gatepython scripts/hardware-tool-gate.py

Abliteration that tanks GSM8K or factory tool_call rate is a failed run, even if chat “sounds uncensored.”


Stage 4 — Every method family (implementation)#

Read ../methods/README.md in this order:

#MethodWhen
1residual-hook-ablation + abliterate-cxx hookReversible experiment
2mlp-down-proj-abliterationClassic permanent edit
3attention-o-proj-abliterationComplementary to MLP
4automated-heretic-searchProduction default
5manual-transformers-pipelineFull control
6safetensor-abliteration-pipeline + abliterate-cxx applyBake without Heretic
7projected-llm-abliterationT03 manual
8orba-pipelineHouseholder vs directional rank-1
9cosmic-direction-idOutput-independent r
10multi-direction-ablationStubborn leftovers
11gradient-rdo-pipelineOptimized r
12svd-refusal-subspaceOBLITERATUS / multi-D SVD
13moe-expert-abliterationQwen-MoE, Phi-MoE, Granite
14lora-adapter-exportShip ΔW as PEFT
15gguf-export-notesllama.cpp / Ollama

Handbook helpers are the C++26 CLI (no Heretic, no Python required for the math):

bash
npm run cxx:build
cxx/build/abliterate-cxx guide
cxx/build/abliterate-cxx doctor
cxx/build/abliterate-cxx self-check
cxx/build/abliterate-cxx demo

→ cxx26-researcher-guide.md · cxx26-platform.md


Stage 5 — Technique catalog (concepts)#

Numbered T-ids: advanced-techniques-catalog.md. Index: ../techniques/README.md.

Always start production with T03 (projected + norm-preserving). Then add:

If this happensNext technique
8 GB OOMT11 QLoRA measure · ../instructions/low-vram-abliteration.md
Thinking / R1 skips refusals in CoTT14 · ../instructions/thinking-models-guide.md
MoE quality dropT08 per-expert
Single r not enoughT05/T06/T07 · T35 SOM · T34 ORBA
Weakly aligned / no “I cannot”T36 COSMIC
Need subspace not a lineT37 SVD / OBLITERATUS
Factory false-refusal onlyT38 Wang w′ ← w − λ v (not factory DIM, not T03)
Jailbreaks vs over-refusal disagreeT39 harm vs refusal (Zhao 2025)
Gemma 4 / VL / SSM presetsAbliterix Track J
GSM8K collapse on HereticErisForge Track K; or jim-plus --projected --normpreserve

Stage 6 — Tooling (do not pick from a tweet)#

DefaultAlternativeResearch only
Heretic (heretic-llm)Abliterix (AGPL, 150+ presets)FailSpy / TransformerLens
jim-plus llm-abliteration v1.2measure.py --deccp (AUGMXNT topics, not a peer CLI)J-Wash; Nous fork frozen ~2025-11-27
Handbook scripts/abliteration_math.pyErisForge layer-bandOBLITERATUS surgical / SAE
export-abliteration-lora.pygrimjim LoRA adaptersablate-llm (pip install ablate-llm)

Compare numbers, not vibes: comparative-abliteration-benchmarks.md (arXiv:2512.13655). Placement: ../techniques/extended-abliteration-toolkit.md. Commands: ../instructions/method-cookbook.md.


Stage 7 — Model-family and deploy#

TopicDoc
Qwen / Gemma / Llama / VL picker../instructions/model-family-guide.md
Thinking models../instructions/thinking-models-guide.md
Safetensors → GGUF → LoRAtoolchain-safetensors-gguf-lora.md
Advanced tracks A–K + L–N../instructions/advanced-abliteration-workflow.md
Factory / pentest / CyberGymuse-cases/factory-firmware-qa.md

Stage 8 — When it fails#

../instructions/troubleshooting-encyclopedia.md · defenses-against-abliteration.md

SymptomFirst check
Nothing changedExtended-refusal / ART defense, or wrong measure set
GibberishOver-ablation — lower max_weight, enable T03
Factory still refusesDomain [bad_prompts], not more global α
Tools break, chat worksTool-call eval; SuperGemma / Jarvis repair, not more surgery
Math scores craterErisForge / jim-plus --deccp topics / narrower kernel

Stage 9 — Research literacy (after first deploy)#

  1. refusal-research-beginners-guide.md — 2024–2026 papers, PDFs in sources/research/papers/
  2. bleeding-edge.md — ORBA, COSMIC, SOM, SVD, J-Wash, harm≠refusal
  3. Refresh corpus: npm run fetch:research-papers

One-page decision tree#

Example
Need a local model that stops false-refusing factory/lab tools?
├─ First time, 8–24 GB NVIDIA → Heretic + handbook config (Stage 2)
├─ No GPU → Hour 0 Stage 0.5, then GGUF import or rent a GPU for surgery
├─ 20B+ / OOM → llm-abliteration 4-bit + sharded ablate
├─ MoE / Gemma 4 / VL preset exists → Abliterix Track J
├─ Want reversible only → inference hook (Stage 4.1)
├─ Heretic leaves refusals → multi-D / SOM / RDO / domain pass
├─ Heretic tanks GSM8K → ErisForge or jim-plus (`--deccp` topics), then re-eval
├─ No refusal template in outputs → COSMIC
├─ Need adapter not full weights → export-abliteration-lora.py
└─ Still refusing after surgery → defenses doc (not more α)

Then always: Stage 3 eval gates.

Trace this chapter to its source.

The complete Markdown remains the editable source. This page adds navigation, typography, and a visual companion.

docs/complete-curriculum.md
Inspect the source fingerprintSHA-256 df4aeb40467b4d9cbf3b6d6a68c0d8560b69918a9023e22b09b187cfb985a8fdSource commit 6fba7436a5914cad7c8f0835a14b480a29dac263