Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

heretic

БесплатноЗапускает вложенные скриптыНе проверен

Runs directional ablation and refusal-direction analysis for open-weight models the user may modify; use to reduce benign over-refusal or measure refusal/KL…

akillnessот akillness★ 63 звезды на GitHub

Об этом скилле

heretic — Automatic Abliteration & Refusal-Direction Interpretability

Keyword: heretic · abliterate · decensor a model · remove refusals · refusal direction · plot residuals

Responsible use. Heretic is AGPL-3.0 software for research and for customizing models you have the right to modify. Respect each base model's license and every platform's Terms of Service when downloading, modifying, uploading, or serving weights. Abliteration lowers a model's refusal rate on all topics, including genuinely harmful ones — do not use it to produce a model for illegal content (e.g. CSAM, weapons-of-mass-destruction uplift, targeted harassment) or to evade safety controls you are contractually bound by. Legitimate uses include interpretability/alignment research, red-teaming, reducing benign over-refusal, and running uncensored models on your own hardware for lawful work.

heretic packages the p-e-w/heretic tool (AGPL-3.0) as an installable jeo-skills plugin. Heretic implements a parametrized variant of directional ablation (abliteration, after Arditi et al. 2024): it computes a per-layer "refusal direction" as the difference-of-means between first-token residuals for harmful and harmless prompts, then orthogonalizes the attention out-projection and MLP down-projection matrices against it — inhibiting refusals without any fine-tuning or post-training. A TPE optimizer (Optuna) searches the ablation kernel to minimize refusals while keeping KL-divergence from the original model low, so the process is fully automatic and needs no configuration.

This skill is routing-first: pick the smallest workable mode for the request, keep the responsible-use guardrails above in view, and route web-based discovery/research through scrapling.


When to use / not use

Use heretic when the user wants to:

  • Decensor / abliterate / un-refuse an open-weight model (Qwen, Llama, Gemma, gpt-oss, Mistral, …).
  • Reduce benign over-refusal while preserving capability (low KL-divergence).
  • Tune the ablation: trial budget, KL target, quantization to fit VRAM, chat/evaluate/upload after.
  • Measure a model: refusal count on harmful prompts + KL-divergence vs the original.
  • Do interpretability research: refusal-direction geometry, residual-geometry metrics, PaCMAP plots.

Do NOT route here (answer directly or elsewhere):

  • "Recommend an already-uncensored model to download" → answer directly (point at HF ?other=heretic).
  • General LLM fine-tuning / RLHF / DPO → that is training, not ablation (different tools).
  • Requests whose only plausible purpose is producing genuinely illegal/harmful content → decline.

Modes (pick the smallest that satisfies the request)

Mode Trigger Command / action
decensor (default) "abliterate / decensor <model>" heretic <model> — fully automatic; then choose save / upload / chat / evaluate
configure "fit in 16GB", "more trials", "less brain damage" edit config.*.toml or pass flags (--quantization bnb_4bit, --n-trials, --kl-divergence-target)
evaluate "how censored is it / did it work" heretic --model <orig> --evaluate-model <candidate> → refusals + KL
research "plot residuals", "refusal geometry" pip install -U 'heretic-llm[research]'; --plot-residuals / --print-residual-geometry
discover (scrapling) "find a base model / existing heretic model / benchmarks" route web extraction through scrapling (see below)

Start narrow: an evaluate or discover request must not kick off a full multi-hour decensor run.

decensor (default)

pip install -U heretic-llm          # or: uv run heretic  (pins uv.lock for reproducibility)
heretic Qwen/Qwen3-4B-Instruct-2507 # replace with any model you have the right to modify

The run is fully automatic: Heretic benchmarks the hardware to pick a batch size, computes refusal directions, then runs the Optuna TPE optimizer (default n_trials = 200, n_startup_trials = 60) to co-minimize (a) refusals on harmful prompts and (b) KL-divergence from the original on harmless prompts. When it finishes you are offered: save, upload to Hugging Face, chat (test), and run benchmarks — any combination. Checkpoints land in checkpoints/ so a run can resume.

configure

Fully automatic already works; reach for config only for hardware/quality control. Common knobs (see config.default.toml, or the bundled presets config.nohumor.toml / config.noslop.toml):

  • quantization = "bnb_4bit" — bitsandbytes 4-bit to fit larger models in less VRAM.
  • kl_divergence_target (default 0.01) — raise to allow deeper ablation, lower to protect capability.
  • n_trials (default 200) — more trials = better compliance/quality tradeoff, longer runtime.
  • dtypes, device_map, `max_b
Полный SKILL.md на GitHub

Установить heretic в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Write
Edit
Glob
Grep
WebFetch

Вложенные файлы

SKILL.toonevals/evals.jsonreferences/abliteration-and-optimization.mdreferences/cli-and-config.mdreferences/install.mdreferences/research-and-scrapling.mdscripts/install.sh

FAQ

Что делает скилл heretic?

Runs directional ablation and refusal-direction analysis for open-weight models the user may modify; use to reduce benign over-refusal or measure refusal/KL trade-offs, not for training.

Как установить скилл heretic?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл heretic запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить heretic с