EN ▾
Get API key

How to Install Heretic LLM, or Skip the Install

If you want to know how to install heretic llm, the first thing to know is that Heretic is a tool, not a model: you install it with pip and point it at a model you want to process. If you only want to use an uncensored model, there is a shorter path further down.

Updated

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300
Two routes to a language model: a long path through GPUs and a short bridge to a hosted terminal
Isometric terminal sending glowing data packets along a cable to a server tower

What you are installing

Heretic is an open-source command-line program that takes a standard open-weight chat model and tries to reduce its refusals automatically, searching for settings that keep the model's quality while it stops declining requests. The method is related to the technique people call abliteration. The page how Heretic works on LLMs explains the mechanism, and Heretic versus abliterated models compares the two approaches.

That means "installing Heretic" is really a three-part job: install the tool, download or point it at the base model you want to process, then run the result somewhere. Many people searching for this actually want only the last part, a ready-made model, and can skip the first two entirely.

Always read the project's own README before you start. Commands, flags and requirements change between versions, and the steps below describe the general shape, not a fixed recipe.

Requirements before you begin

  • Python. A recent Python 3 release in a virtual environment. Check the README for the minimum version.
  • PyTorch. Installed for your hardware, CUDA build for NVIDIA cards. A CPU-only machine will be extremely slow.
  • GPU memory. The tool has to load the full model, and it runs it many times while it searches for settings. Small models of a few billion parameters can work on a single consumer GPU; larger ones need much more memory or quantised loading.
  • Disk space. Base weights for even a mid-sized model are many gigabytes, and you will store the processed copy too.
  • Time. Plan on a run lasting from tens of minutes to hours, depending on model size and hardware.

If any of these is missing, a local install will be frustrating. That is the main reason hosted access is popular: you rent the result instead of the hardware.

Install and run: the general steps

Create an isolated environment first so the tool's dependencies do not collide with other projects:

python3 -m venv heretic-env
source heretic-env/bin/activate

# install PyTorch for your hardware first (see pytorch.org), then:
pip install heretic-llm

# run it on a Hugging Face model id of your choice
heretic your-org/your-base-model

Treat the package and command names above as the usual pattern and confirm them in the README. When the tool starts, it loads the model, tests how often it refuses on a set of sample prompts, and then runs a series of trials, adjusting its settings to lower refusals while limiting damage to the model. At the end it lets you choose among the best trade-offs, and then to save the modified model to disk or upload it.

After the run

The saved folder is an ordinary model in a standard format. Load it in the runner you like, such as a Python script with Transformers, or convert it to a quantised format for Ollama or llama.cpp. Test it with a few prompts you know the original model refused, and also with ordinary tasks, to check it did not become worse at normal work.

Common problems

  • Out of memory. The model does not fit. Try a smaller base model, a quantised load if the tool offers it, or a machine with more GPU memory.
  • Install fails on PyTorch. Install PyTorch first from its official selector for your CUDA version, then install the tool.
  • Very slow run. You are probably on CPU. Check that PyTorch sees the GPU with torch.cuda.is_available().
  • The result still refuses sometimes. No method removes every refusal. Try another trial from the results list, or another base model.
  • The result is worse at normal tasks. Choose a trial with a lower change, or compare outputs to the original on non-sensitive prompts before you adopt it.

You also remain responsible for how you use the output. A processed model follows lawful adult requests; it does not change the law, and sexual content involving minors is off the table whatever tool you use.

Skip the install: call a hosted endpoint

If your goal is to use an uncensored model rather than to produce one, you can skip everything above. This site hosts one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is an OpenAI-compatible API, so any OpenAI SDK works with a changed base URL and key.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.hereticllm.cc/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Write a short scene where two rival wizards bargain."}],
)
print(resp.choices[0].message.content)

The same thing in curl:

curl https://api.hereticllm.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Hello"}]}'

Get a key on the API key page. New users can claim $0.50 of trial credit with one click after sign-up, no card needed. Setup details are on the Heretic LLM API page and in the documentation.

Check quality with a small test set

Whichever route you take, do not judge a model by one prompt. Keep a file of 20 to 30 prompts in two groups: tasks any model should handle (summaries, code, translation) and borderline requests that fiction writers or researchers might send. Then count how many replies are useful. This script runs such a file against the hosted endpoint and prints the first line of each reply:

from openai import OpenAI

client = OpenAI(base_url="https://api.hereticllm.cc/v1", api_key="YOUR_KEY")

with open("prompts.txt", encoding="utf-8") as f:
    prompts = [line.strip() for line in f if line.strip()]

for p in prompts:
    r = client.chat.completions.create(
        model="uncensored",
        temperature=0.3,
        seed=1,
        messages=[{"role": "user", "content": p}],
    )
    text = r.choices[0].message.content.strip().splitlines()[0]
    print(p[:50], "->", text[:80])

Setting temperature low and fixing seed makes runs comparable. Point the same script at your local runner's address when you have one, and compare. The cost of this test is tiny: 30 prompts of 100 input tokens and 300 output tokens use 3,000 input tokens ($0.00045) and 9,000 output tokens ($0.0045), about half a cent.

Local install or hosted API: how to choose

FactorInstall it yourselfHosted API
Upfront workEnvironment, weights, long run, conversionMinutes: key, URL, model ID
HardwareCapable GPU requiredNone
PrivacyEverything stays on your machineRequests go to a server; prompts are not used for training
Control over the modelFull: you choose base model and settingsOne fixed model, ID uncensored
Context lengthLimited by your memory100,000 tokens, prompt plus completion
CostHardware and electricity$0.15 per 1M input, $0.50 per 1M output tokens

Pick local when you want to study or modify models, or need full offline privacy. Pick hosted when you want to build something, because the pricing is pay as you go from credit that never expires. Amounts start at $20 and are listed on the pricing page. The hosted service is text only and is not the output of your own Heretic run, so it does not replace the tool for anyone who wants to process a specific model.

Questions and answers

Is Heretic a model or a program?

A program. It is an open-source tool that processes an existing open-weight model to reduce refusals. You still need a base model and a runner.

What do I need to run it locally?

Python, PyTorch for your hardware, plenty of disk space and a GPU with enough memory to load the model, plus patience for a long run. Check the project README for current requirements.

Can I use an uncensored model without installing anything?

Yes. Sign up, take a key and call the OpenAI-compatible endpoint with model uncensored. A $0.50 trial credit needs no card.

Is the hosted model a Heretic output I can download?

No. The API serves one hosted model for text requests. It does not give you weights to download.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

On this page

  1. What you are installing
  2. Requirements before you begin
  3. Install and run: the general steps
  4. Common problems
  5. Skip the install: call a hosted endpoint
  6. Check quality with a small test set
  7. Local install or hosted API: how to choose
  8. More guides
Start with trial credit

Email and password, key on screen right away.

Key points

  • Heretic is an open-source command-line tool that processes existing open-weight models; it is not itself a chat model.
  • Local use needs Python, PyTorch, enough GPU memory to load the model, and time.
  • The output is a modified model you then run in a local runner.
  • A hosted OpenAI-compatible endpoint skips all of it: base URL, key, model uncensored.