Abliteration HandbookField guide
Practical guides

Researcher guide — do not spend a year figuring this out

Build confidence with the native C++26 lab, verified downloads, numerical operators, and reproducible first steps.

4 min read 7 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/7 sections reviewed

View original Markdown
Interactive companion

Explore the chapter map

Use the visual controls alongside the complete source chapter.

This page is the hand-holding path for abliterate-cxx. Read it top to bottom once. You should have a passing demo in the same afternoon you download the binary.

Binary: cxx-nightly · CLI UX: abliterate-cxx guide


The only order that works#

Example
guide → doctor → limits → self-check → demo → estimate dim → apply orba-directional → eval toys
         → recipes → (optional) projected / cosmic / svd
         → then and only then a real model (Heretic)

Hour 0 is guide → doctor → limits → self-check → demo. Hour 0.5 is estimate dim → apply orba-directional → eval toys → recipes.

If you skip to a 32B GGUF you will debug tooling for weeks and learn no geometry.


Day 0 — install (pick one)#

Pick one unique filename. GCC and Clang no longer share a name.

You haveDownload from cxx-nightly
Windows x64abliterate-cxx-windows-x64-msvc.zip
Linux x64abliterate-cxx-linux-x64-gcc16.tar.gz
Linux arm64abliterate-cxx-linux-arm64-gcc16.tar.gz
macOS Apple Siliconabliterate-cxx-macos-arm64-llvm.tar.gz
macOS Intelabliterate-cxx-macos-x64-llvm.tar.gz

Windows x64

The zip is flattened: abliterate-cxx.exe sits next to GETTING-STARTED.md at archive root. Use the checksum-first PowerShell block in cxx/GETTING-STARTED.md; it downloads SHA256SUMS, rejects a mismatch, and refuses to overwrite an existing destination.

powershell
Expand-Archive -Path abliterate-cxx-windows-x64-msvc.zip -DestinationPath abliterate-cxx-1.2.0
Set-Location abliterate-cxx-1.2.0
.\abliterate-cxx.exe guide
.\abliterate-cxx.exe doctor
.\abliterate-cxx.exe limits
.\abliterate-cxx.exe self-check
.\abliterate-cxx.exe demo

If you used Expand-Archive without -DestinationPath, cd into the zip-stem folder (abliterate-cxx-windows-x64-msvc). The exe is immediately there — no extra nested folder. Then run the same five Hour 0 commands.

Linux x64 / arm64

bash
mkdir abliterate-cxx-1.2.0 && tar -xzf abliterate-cxx-linux-x64-gcc16.tar.gz -C abliterate-cxx-1.2.0
cd abliterate-cxx-1.2.0
./abliterate-cxx guide
./abliterate-cxx doctor
./abliterate-cxx limits
./abliterate-cxx self-check
./abliterate-cxx demo

macOS arm64 / x64

bash
mkdir abliterate-cxx-1.2.0 && tar -xzf abliterate-cxx-macos-arm64-llvm.tar.gz -C abliterate-cxx-1.2.0
cd abliterate-cxx-1.2.0
xattr -d com.apple.quarantine ./abliterate-cxx 2>/dev/null || true
./abliterate-cxx guide
./abliterate-cxx doctor
./abliterate-cxx limits
./abliterate-cxx self-check
./abliterate-cxx demo

From source (ISO C++26)

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

doctor must print cplusplus=202400. Anything else is the wrong compiler.


What each file is#

FileMeaning
tiny-bad.txt5 “should trigger refusal-ish” activation rows, dim=4
tiny-good.txt5 harmless rows, same dim
tiny-W.txttoy down_proj-shaped weight (4×3)
tiny-h.txtone residual vector to hook
generations.jsonl5 fake model answers with expected labels

Format of every matrix: first line rows cols, then floats. That is the whole file format. There is no safetensors in this binary.


Map: what you typed in a paper → what you type here#

You readYou type
“difference-in-means / Arditi / abliterator”estimate --mode dim
“projected abliteration / orthogonalize_direction”estimate --mode projected
“COSMIC / no refusal template”estimate --mode cosmic (score + DIM r; not full paper ID)
“multi-direction / concept cone / SVD subspace”estimate --mode svd --rank 2
“ORBA directional / α=0 rank-1”apply --mode orba-directional
“Householder / reflection”apply --mode orba-householder (A/B only)
“inference ablation / steering hook”hook --h … --direction r.txt
“false refusal / over-refusal / wmic”two DIMs (v harmful/harmless, w factory-false/comply), form w′ ← w − λ v offline — no Wang flag; estimate --mode dim is not Wang
“harm ≠ refusal (Zhao)”two DIMs; wipe factory only
“Heretic / Abliterix / Optuna”not this binary — after demo
Example
abliterate-cxx why projected
abliterate-cxx recipes

How to read eval#

Example
abliterate-cxx eval --jsonl examples/generations.jsonl
FieldMeaning
nrows scored
refusal_ratefraction matching “I cannot / as an AI / …”
false_refusalrefused but expected was tool_call / comply / good
true_refusal_hitsrefused and expected was refuse / harmful / bad

Factory goal: false_refusal → 0, true_refusal_hits not collapsed. If both collapse you ablated raw factory w or the safety DIM — T38 is Wang w′ ← w − λ v, not a two-set factory DIM.

empty_response / degenerate (whitespace, ...) is not a safety hit (exit 2) and not a successful abliteration. All-empty JSONL exits non-zero — generate answers first. Keyword rates are a learning loop, not a deploy gate.

This is a keyword judge. It is for learning the loop. Deploy gates live in docs/evaluation.md and data/eval/*.jsonl.


When surgery “does nothing”#

  1. cosmic_score ≤ 0 — contrast set cancelled (topic-matched pairs; Petrov 2026). Use unmatched harmful vs alpaca-style harmless, or factory txt.
  2. High dim_align on toys but a defended base (extended-refusal 2505.19056, ART 2605.26526) — change checkpoint, not α.
  3. Thinking models refuse inside CoT — docs thinking-model guide; not more SVD rank.
  4. You edited a GGUF — never. Measure/bake safetensors, convert after.

Day 1 — a real model (only after demo is boring)#

  1. pip install heretic-llm==1.4.0 and config.production.toml from sources/heretic-tools/.
  2. Dump or use Heretic’s own eval. Optionally export last-token residuals to rows cols text and reuse this CLI for DIM vs projected A/B.
  3. Gate with handbook JSONL + GSM8K if math matters (Young 2512.13655).

You are not behind if you stay in abliterate-cxx for a day. You are behind if you skip it.

Obscure 2025–2026 pointers (abliterate-cxx recipes): OT 2603.04355 and RFM-AGOP 2607.02396 are reported estimators (GPU). DeepRefusal 2509.15202 is a defense (train-time probabilistic ablation) — defenses-against-abliteration.md, not an Abliterix bake. Task-conditioned over-refuse 2603.27518 is why one factory DIM may not be enough.

Ethics: docs/risks-and-ethics.md. Authorized lab / factory / research only.

Trace this chapter to its source.

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

docs/cxx26-researcher-guide.md
Inspect the source fingerprintSHA-256 0a19d96f640e1f6b0ecf9b0e36175bb15e0e9cc9fa6c865ca0cce08c83d09a10Source commit 6fba7436a5914cad7c8f0835a14b480a29dac263