Heretic Abliteration

Heretic — fully automatic LLM censorship removal (abliteration) and serving the result via Ollama. Wraps p-e-w/heretic: directional ablation (difference-of-means refusal directions, orthogonalizing attn.o_proj + mlp.down_proj) with an Optuna/TPE search that co-minimizes refusal count and KL divergence. Automates the full local workflow with the dependency + device fixes that make it actually run: clean-venv install (+ kernels/jinja2 fixes), device-correct run (CPU on Apple Silicon — MPS is blocked by a PyTorch GQA matmul bug; CUDA for real models), and the HF→GGUF→Ollama bridge. Includes a no-compute fast path: pull a pre-abliterated GGUF straight into Ollama. Use when: (1) decensoring / uncensoring an open-weight LLM locally, (2) running heretic-llm and hitting install or MPS/CUDA errors, (3) converting a Heretic/abliterated HF model to GGUF and serving it via Ollama CLI, (4) pulling a ready-made abliterated model into Ollama, (5) understanding abliteration as an evaluator-governed (EGRI) optimization loop.

broomva 1198196 10 files · 32.3 KB Updated

File contents

broomva/skills/tree/main/skills/models/heretic-abliteration commit 11981960cd

Frequently asked questions

npx skillmds@latest add broomva/heretic-abliteration