Abliteration HandbookField guide
Research & reference

References

Follow the primary papers and tools behind the handbook, with the existing bibliography preserved.

5 min read 3 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/15 sections reviewed

View original Markdown
Interactive companion

Explore the primary records

Use the visual controls alongside the complete source chapter.

Source policy: GitHub repos and arXiv first. Hugging Face is listed for weights and the heretic/abliterated model registry. Refresh with npm run fetch:all (or fetch:heretic / fetch:docs / fetch:research-papers / fetch:hf-models:firefox).

2026 primary-source update: 50-paper reading map · machine catalog · Offline research corpus (PDFs + text): sources/research/README.md · Beginner map: docs/refusal-research-beginners-guide.md

The 50-paper update is a dated discovery snapshot (23 August 2026) covering refusal geometry, activation steering, abliteration, safety recovery, over-refusal, attack surfaces, and representation-level evaluation. Inclusion records relevance; it does not claim independent replication.

Primary papers#

TitleLinkRepo PDF / code
Refusal in LLMs is mediated by a single direction (Arditi, NeurIPS 2024)arXiv:2406.11717PDF · andyrdt/refusal_direction
Accessible summaryLessWrong—
Geometry of Refusal — concept cones (TUM 2025)arXiv:2502.17420PDF · geometry-of-refusal
Comparative abliteration methods (Young 2025/26)arXiv:2512.13655PDF · ricyoung/abliteration-comparison
More to refusal than a single direction (QCRI 2026)arXiv:2602.02132PDF · multi-category-refusal-beginners-guide.md
Defense: extended-refusal fine-tuning (Shairah 2025)arXiv:2505.19056PDF · defenses-against-abliteration.md
COSMIC — refusal direction ID (Siu, ACL 2025)arXiv:2506.00085PDF · wang-research-lab/COSMIC
Safety pretraining under abliteration (2025)arXiv:2510.02768PDF · safety_pretraining
Topic-matched contrast baselines fail (2026)arXiv:2603.22061PDF
Open-weight defenses vs abliteration (Kuo 2026)arXiv:2605.26526PDF
Code LLMs — refusal vs capability (2026)arXiv:2606.05396PDF
False-refusal single vector (Wang, ICLR 2025)arXiv:2410.03415PDF · False-Refusal-Mitigation · T38
Harmfulness ≠ refusal (Zhao, NeurIPS 2025)arXiv:2507.11878PDF · CHATS-lab code · T39
DDI harm-detect vs refuse-execute (Zhang & Sun, AAAI-26)arXiv:2511.06852PDF · Analysis only (no attack recipe) · T39
SOM multi-direction (Piras, AAAI 2026)arXiv:2511.08379PDF · pralab/som-refusal-directions · T35
ORBA (Lai 2026)HF blogT34 · orba-pipeline
Task-conditioned refusal (2026)arXiv:2603.27518PDF
Representation EngineeringarXiv:2310.01405RepE ecosystem
Circuit Breakers (defensive)arXiv:2406.04313GraySwanAI/circuit-breakers
Projected abliteration (blog)grimjim/projectedllm-abliteration --projected
Norm-preserving biprojected (blog)grimjim/norm-preserving--normpreserve
Heretic concepts (live)mintlify Hereticp-e-w/heretic

Tools (GitHub — preferred)#

ProjectURLRole
Hereticgithub.com/p-e-w/hereticFully automatic abliteration + Optuna search
llm-abliterationgithub.com/jim-plus/llm-abliterationv1.2 handbook/manual path: measure.py → analyze.py → sharded_ablate.py
refusal_directiongithub.com/andyrdt/refusal_directionPaper pipeline, direction.pt artifacts
TransformerLensgithub.com/TransformerLensOrg/TransformerLensHooks, residual analysis
FailSpy/abliteratorgithub.com/FailSpy/abliteratorTransformerLens hooks; mechanistic prototyping
remove-refusals-with-transformersgithub.com/Sumandora/remove-refusals-with-transformersPure Transformers, no TransformerLens
wassname/abliteratorgithub.com/wassname/abliteratorCommunity implementation
ErisForgegithub.com/Tsadoq/ErisForgeLayer-band single-pass; ExpressionRefusalScorer
NousResearch/llm-abliterationgithub.com/NousResearch/llm-abliterationFrozen fork (~2025-11-27); historical YAML only — not the handbook path
abliterate.cppgithub.com/kabachuha/abliterate.cppGGUF measure → llm-abliteration (WIP)
Abliterixgithub.com/wuwangzhang1216/abliterixOptuna multi-objective; 150+ configs; HonestAbliterationBench
DECCP (AUGMXNT)github.com/AUGMXNT/deccpTopics/dataset (Qwen2 PoC), not a peer CLI. Measure: python measure.py --deccp on jim-plus
COSMICgithub.com/wang-research-lab/COSMICCosine-similarity refusal direction ID (ACL 2025)
abliteration-comparisongithub.com/ricyoung/abliteration-comparisonYoung arXiv:2512.13655 reproduction assets
spkgyk/abliterationgithub.com/spkgyk/abliterationPure PyTorch hooks (no TransformerLens)
OBLITERATUSgithub.com/elder-plinius/OBLITERATUSSVD / surgical / CoT-aware presets
ablate-llmgithub.com/AIAnytime/ablatepip install ablate-llm KL-guided CLI
J-Washgithub.com/Extraltodeus/J-WashJacobian-lens manual alignment
Blasphemergithub.com/sunkencity999/blasphemerHeretic fork for macOS / LM Studio
vaubangithub.com/teilomillet/vaubanMLX-native steering / abliteration
senbonzakuragithub.com/elementmerc/senbonzakuraMulti-direction refusal CLI; not official SOM (pralab/som-refusal-directions)
Awesome-Refusal-Suppressiongithub.com/ant-research/Awesome-Refusal-SuppressionExternal catalog (cross-check, not a substitute)
Handbook C++26 CLIcxx/README.mdnpm run cxx:build · abliterate-cxx self-check
GraySwan circuit-breakersgithub.com/GraySwanAI/circuit-breakersDefensive alignment (contrast)

Heretic also mirrors to codeberg.org/p-e-w/heretic.

Alternative tools (arXiv:2512.13655 benchmarks):

bash
# ErisForge — single-pass toolkit (often better GSM8K preservation on subset)
pip install erisforge   # verify package name on github.com/Tsadoq/ErisForge README
git clone https://github.com/Tsadoq/ErisForge.git && cd ErisForge && pip install -e .

# DECCP — AUGMXNT topics/dataset, not a peer CLI. Measure on jim-plus:
# python measure.py --deccp
# optional topic checkout:
git clone https://github.com/AUGMXNT/deccp.git

→ docs/comparative-abliteration-benchmarks.md · techniques/extended-abliteration-toolkit.md

Tool selection for responsible use: GSM8K capability deltas and architecture-specific findings in the comparative benchmarks directly inform risk mitigation. Pair any tool decision with the capability sanity gates, post-edit labeling, and authorized scope rules in docs/risks-and-ethics.md.

For agentic workloads, also cross-reference:

See the dedicated "Tool selection via comparative benchmarks" section + "Agentic use-case evals & benchmarks" list in docs/risks-and-ethics.md and the bidirectional links + responsible selection guidance in docs/comparative-abliteration-benchmarks.md.

Pinned in this repo: sources/heretic-tools/ · docs/tools/heretic-tools-reference.md

Heretic / abliterated models (Hugging Face)#

Live documentation#

SiteURL
abliteration.ai docsdocs.abliteration.ai
Agent doc indexdocs.abliteration.ai/llms.txt
Heretic READMEp-e-w/heretic
CyberGym paperarXiv:2506.02548
OpenHands READMEOpenHands/OpenHands
hashcat READMEhashcat/hashcat
Kali metapackagesKali documentation

Low VRAM & LoRA tooling#

ProjectURLRole
bitsandbytesbitsandbytes-foundation/bitsandbytesHeretic bnb_4bit, QLoRA load
PEFThuggingface/peftLoRA adapter export & infer
Unslothunslothai/unslothFast QLoRA (Jarvis repair)
Acceleratehuggingface/acceleratemax_memory CPU offload
llama.cppggml-org/llama.cppconvert_hf_to_gguf.py, convert_lora_to_gguf.py
GGUF-my-LoRAspaces/ggml-org/gguf-my-loraWeb PEFT → GGUF LoRA
grimjim abliteration LoRAgrimjim/Llama-3-Instruct-abliteration-LoRA-8BRefusal removal as adapter
vLLMvllm-project/vllmAgent API + LoRA slots
mlx-lmml-explore/mlx-examplesApple Silicon inference
export-abliteration-lora.pyscripts/export-abliteration-lora.pyΔW → adapter safetensors

Guides: docs/toolchain-safetensors-gguf-lora.md · methods/safetensor-abliteration-pipeline.md · methods/gguf-export-notes.md · techniques/lora-qlora-abliteration.md

Install commands (from upstream, Jun 2026)#

bash
# Heretic — PyPI package built from GitHub
pip install heretic-llm==1.4.0 bitsandbytes accelerate
heretic Qwen/Qwen3-4B-Instruct-2507
# Low VRAM: quantization = "bnb_4bit" in config.toml

# Or clone for reproducible uv.lock
git clone --branch v1.4.0 https://github.com/p-e-w/heretic.git
cd heretic && uv run heretic <model>

# Manual pipeline (4-bit measure)
git clone https://github.com/jim-plus/llm-abliteration.git
cd llm-abliteration && pip install -r requirements.txt
python measure.py -m <model_path> -o directions.pt --quant 4bit --projected
python sharded_ablate.py config.yml --projected --normpreserve

# GGUF merged deploy
python llama.cpp/convert_hf_to_gguf.py ./abliterated --outfile model-q4_k_m.gguf --outtype q4_k_m

# LoRA sidecar deploy
python scripts/export-abliteration-lora.py --base ./base --abliterated ./out --out ./adapter --rank 16
python llama.cpp/convert_lora_to_gguf.py --outfile lora.gguf --base-model-id <id> --lora-path ./adapter

Toolchain overview: docs/toolchain-safetensors-gguf-lora.md

Validation & agent loop#

bash
npm run validate    # links, jsonl, pins, python — exit 0 required before commit
npm run ralph       # validate → refresh pins → re-validate (max 3)

→ docs/ralph-loop.md · docs/agent-development-loop.md · Benchmarks: docs/comparative-abliteration-benchmarks.md · arXiv:2512.13655

Agentic security & evaluation#

ProjectURLRole
CyberGymcybergym.io · arXiv:2506.025481,507 real-world vuln tasks for agent scoring
OpenHandsgithub.com/OpenHands/OpenHandsBash-chaining agent (CyberGym top performer)
JARVIS Tool Repair v7sources/jarvis-pack/IMPORT.mdSFT/DPO tool-use repair (48k rows, local)
hardware-tool-gatescripts/hardware-tool-gate.pyRuntime ALLOW / CONFIRM / BLOCK for terminal calls
Command catalogdocs/hardware-command-catalog.mdFactory / firmware / lab read-only diagnostics

Use-case guides: factory-firmware-qa.md · pentest-cyber-analysis.md · cybergym-benchmark.md

Benchmarks & ethics for agentic selection: Choose abliteration backends using evidence from docs/comparative-abliteration-benchmarks.md (GSM8K sensitivity by tool/architecture, Heretic vs single-pass tradeoffs) and always enforce the gates + provenance in docs/risks-and-ethics.md. See the new "Tool selection via comparative benchmarks" section there for use-case-specific gating steps (factory/pentest/CyberGym corpora via eval-driven-workflow).

Full pipeline including eval corpora and runtime gate: instructions/agentic-security-stack.md. Use-case guides: docs/use-cases/factory-firmware-qa.md · docs/use-cases/pentest-cyber-analysis.md · docs/use-cases/cybergym-benchmark.md.

Security tool catalogs (OSINT / Kali / hashcat)#

Platform tooling (Windows / macOS / Zig)#

Interpretability & SAE#

Advanced handbook sections#

  • Activation steering — inference-time only (reversible)
  • Directional ablation — subtract refusal component from activations or weights
  • Norm-preserving biprojected abliteration — Jim Lai / llm-abliteration --normpreserve --projected
  • Gradient RDO — optimized refusal direction (TUM 2025)
  • Multi-direction subspace — PCA / category-specific directions
  • Context7 — up-to-date dependency docs → docs/context7.md

Additive September 2026 refresh#

See the 14-paper annotated update, versioned catalog, and selective-method guide. The previous bibliography and snapshots are preserved.

Additive October 2026 refresh#

Annotated eight-paper map · versioned catalog · adaptive interventions and ARA · huihui-ai guide · pinned model cards · tooling status.

The 2026-10-05 check distinguishes Heretic 1.4.0 stable from inspected development source, and publisher claims from independently measured results.

Trace this chapter to its source.

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

references.md
Inspect the source fingerprintSHA-256 506f6fdb64ddb99c52ef7ac0ceea9d43008f35d37af0524da3d979c6fd5568c6Source commit 6fba7436a5914cad7c8f0835a14b480a29dac263