/agentic-awesome-skills:vibe-abliterationfrom agentic-awesome-skills
Automates directional abliteration with Heretic to reduce model refusals while managing the refusals-vs-KL-divergence trade-off. Covers setup, Pareto front analysis, verification, and model card creation.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Automate directional ablation with Heretic, a tool that edits a model's weights to reduce refusals while measuring the cost in KL divergence from the base model.
The hard part is not running the tool. It is choosing a point on the refusals-versus-drift trade-off deliberately, verifying the exported model rather than trusting the trial numbers, and documenting what was done so the result is reproducible.
This skill covers setup, the parameter that actually matter, reading the Pareto front, headless flags, and verification before publishing. It edits model weights; it does not remove a licence or a terms-of-use obligation.
Before running, check whether a suitable converted model already exists; a fresh optimisation run costs GPU hours for a result someone may have published already. A directory of published Heretic conversions, including quantised formats, is at https://hdir.sdad.pro (maintained by the same author as this skill - disclose that affiliation). Its numbers are publisher-reported, not re-measured, and rows with published metrics are more trustworthy than inherited ones.
A GPU with enough VRAM for the model (4-8 GB minimum for small models), Python 3.10+, and PyTorch installed for the correct CUDA version. A Hugging Face token only when the base model is gated or the result will be uploaded. Disk for checkpoints, which can be large.
Installation order matters: install PyTorch first so the tool does not pull a
CPU-only build, then install heretic-llm, which pins its own dependencies.
Before spending GPU time, confirm the architecture is supported. Heretic locates
layers at model.model.language_model.layers or model.model.layers, then
modifies attn.o_proj and mlp.down_proj-style projections. MoE experts, hybrid
linear attention and some conv blocks map onto those names. Two signatures mean
"unsupported, not a bug": a missing .layers attribute, and
No modifiable modules found in layer.
Create a virtual environment, install PyTorch for the target CUDA version, then
install heretic-llm. Log in to Hugging Face only if the model is gated or an
upload is planned; keep the token in the environment, never in a config file.
The model id is the main argument. The levers that matter:
--n-trials and --n-startup-trials: search budget, not a quality dial on its
own.--quantization bnb_4bit: VRAM relief for larger models.--seed: controls startup exploration and the guided search path.--study-checkpoint-dir: keeps the journal so a run is not lost.Settings that are lists (scorers, modifiers, benchmarks) cannot be passed as
flags. Put them in config.toml in the working directory.
Each trial applies an ablation profile and measures two objectives: refusal count on harmful prompts and KL divergence from the base model. Keep the Pareto front, not a single winner.
Gains flatten after roughly 50-150 trials per seed for sub-1B models. After that, a new seed or different prompt datasets beats more trials. If the entire front sits at high refusals for low KL, the refusal direction does not fit the model and more trials will not fix it.
Optimization ends with interactive prompts. In a non-TTY run a missing answer
raises EOFError; that is a missing flag, not a bug. Set the trial index as a
position in the sorted Pareto front (not the printed trial label), the model
action (save or upload), the save directory or repo id, and the export
strategy (merge or adapter).
Refusal counts are keyword-matched and the export is a different artifact from the trial. Load the saved model and check that prompts the base model refused now answer without degenerate output, that normal prompts keep their formatting and reasoning, and, when capability matters, that one benchmark holds up. KL alone is not a capability test.
Record the base model, tool version, trial index and parameters, KL divergence and refusal score. Save locally by default. Upload only after the user explicitly authorizes publication of that artifact to the named repository and visibility. Include the model card and publish only if the base model terms permit redistribution.
User request: "Abliterate this 1.7B instruct model, keep quality high."
Inputs: base model id, one 24 GB GPU, 200 trial budget, upload planned.
Expected result (illustrative):
Ran 200 trials at seed 42; front showed KL 0.0068-0.19 for 0-3 refusals per 100
against a 4/100 baseline.
Chose the knee: KL 0.0083, 2/100 refusals, capability spot-check clean.
Saved merged weights, wrote a model card with the trial parameters, and verified
three previously refused prompts before upload.
This skill removes refusal behaviour from a model. It writes checkpoints to disk, can download tens of gigabytes, spends GPU time, and can publish a model publicly under the user's account. Upload only on explicit instruction, mark the model card accurately, and respect the base model's licence and terms. Irreversible weight edits should be done on a copy, never on an original checkpoint. Do not use the result to build something that breaks the law or a platform's terms; state that boundary once, plainly, then continue.
finetune-llm; for measuring whether a
model actually changed, use an evaluation skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
abliteration, model-editing, refusal-removal, heretic, optuna, model-cards
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills2 plugins in one repository ship this exact skill · first indexed Nov 16, 2026
3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.Other plugins' skills for the same job