> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/p-e-w/heretic/llms.txt
> Use this file to discover all available pages before exploring further.

# Heretic

> Fully automatic censorship removal for language models

<div
  style={{ 
background: 'linear-gradient(135deg, #94cb04 0%, #545454 100%)',
padding: '4rem 2rem',
borderRadius: '8px',
marginBottom: '2rem',
color: 'white'
}}
>
  <h1 style={{ fontSize: '48px', fontWeight: '700', marginBottom: '1rem', color: 'white' }}>
    Heretic
  </h1>

  <p style={{ fontSize: '18px', maxWidth: '800px', color: 'white', opacity: '0.95' }}>
    Fully automatic censorship removal for language models using directional ablation and parameter optimization. Remove safety alignment from transformer models without expensive post-training.
  </p>
</div>

## Get Started

Remove censorship from any language model in minutes.

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install Heretic and set up your environment
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Decensor your first model in under 5 minutes
  </Card>

  <Card title="How It Works" icon="brain" href="/concepts/how-it-works">
    Learn about directional ablation and optimization
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    Complete command-line interface documentation
  </Card>
</CardGroup>

## Key Features

<CardGroup cols={3}>
  <Card title="Fully Automatic" icon="wand-magic-sparkles">
    No manual tuning required. Heretic automatically finds optimal abliteration parameters using TPE-based optimization.
  </Card>

  <Card title="Quality Preserved" icon="shield-check">
    Achieves best-in-class KL divergence, preserving model intelligence while removing refusals.
  </Card>

  <Card title="Quantization Support" icon="microchip">
    Run on consumer hardware with bitsandbytes 4-bit quantization support.
  </Card>

  <Card title="Built-in Evaluation" icon="chart-line">
    Evaluate models with refusal counting and KL divergence metrics out of the box.
  </Card>

  <Card title="Research Tools" icon="flask">
    Advanced residual vector analysis and PaCMAP projections for interpretability research.
  </Card>

  <Card title="Hugging Face Integration" icon="face-smile">
    Seamlessly upload and share your models on Hugging Face Hub.
  </Card>
</CardGroup>

## Proven Results

Heretic produces decensored models that rival manually-created abliterations while preserving more of the original model's capabilities.

<Info>
  **Example: Gemma-3-12B-IT**

  * **Refusals**: 3/100 (same as manual abliterations)
  * **KL Divergence**: 0.16 (vs. 1.04 for manual methods)
  * **Result**: Same refusal suppression with 85% less damage to model capabilities
</Info>

## Quick Example

```bash theme={null}
# Install Heretic
pip install -U heretic-llm

# Decensor a model (fully automatic)
heretic Qwen/Qwen3-4B-Instruct-2507

# With quantization for lower VRAM usage
heretic --quantization bnb_4bit meta-llama/Llama-3.1-8B-Instruct
```

## What You Can Do

<CardGroup cols={2}>
  <Card title="Remove Safety Alignment" icon="unlock" href="/concepts/abliteration">
    Strip censorship from instruction-tuned models without retraining
  </Card>

  <Card title="Optimize Parameters" icon="sliders" href="/concepts/optimization">
    Automatically find the best ablation weights for your model
  </Card>

  <Card title="Evaluate Models" icon="magnifying-glass-chart" href="/configuration/evaluation">
    Measure refusal rates and KL divergence from baseline
  </Card>

  <Card title="Analyze Internals" icon="microscope" href="/research/overview">
    Visualize residual vectors and refusal directions
  </Card>
</CardGroup>

## Community

<CardGroup cols={2}>
  <Card title="GitHub Repository" icon="github" href="https://github.com/p-e-w/heretic">
    View source code, report issues, and contribute
  </Card>

  <Card title="Hugging Face Models" icon="face-smile" href="https://huggingface.co/models?other=heretic">
    Browse 1,000+ community models created with Heretic
  </Card>
</CardGroup>
