Model Unfetter — Production Engine for LLM Directional Ablation / Unalignment
- URL: https://github.com/HOLYKEYZ/model-unfetter
- Date Saved: 2025-06-15
- Source: GitHub (HOLYKEYZ)
- Tags: security-privacy, ai-tools
Summary
Production-grade engine for removing refusal behaviors from LLMs via “Aggressive Repulsion Orthogonalization”. Builds on failSpy’s Abliterator and Heretic, with improvements for stubborn/small models (0.5B-3B), GGUF support, and CPU-only operation.
Key Innovations vs Standard Ablation
- Column-based projection math (v @ W) instead of row-based — ensures mathematically orthogonal output
- Final Token Extraction — targets exact decision point in chat template, not prompt averaging
- Strength 1.5+ (Aggressive Repulsion) — actively repels weights from refusal manifold, not just neutralizes
- Universal heuristics — auto-detects architecture for 15+ model families
Math
W’ = W - strength * (v̂ ⊗ (v̂ᵀ · W))
Where W is weight matrix (o_proj, down_proj) and v̂ is normalized refusal direction vector.
Usage
pip install -e ".[full]"
unfetter ablate meta-llama/Llama-3.1-8B-Instruct --strength 1.5 --layers 10:-1
Supports: Llama 3, Mistral, Mixtral, Gemma, Qwen, Phi, etc. Output: SafeTensors or GGUF (for Ollama/LM Studio deployment)
Stats
- 48 stars, 4 forks
- Apache 2.0 license
- Python, PyTorch
- Pre-built model: huggingface.co/josephmayo/Qwopus-9B-Unfettered
Relation to Earlier Link
This is essentially a production-ready implementation of the same concept as “Heretic” (shared earlier from Threads) — identifying and removing the refusal direction vector from LLM weights. Model Unfetter adds improvements for small models and aggressive repulsion mode.