{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "p-e-w-heretic--verify-decensored-model-against-original",
 "repo": "p-e-w/heretic",
 "repo_url": "https://github.com/p-e-w/heretic",
 "repo_slug": "p-e-w-heretic",
 "title": "Measure refusals and KL divergence against the original model",
 "page_title": "How to measure refusals and KL divergence against the original model with Heretic",
 "summary": "Use Heretic's built-in evaluation to compare a decensored model with its original on the same metrics.",
 "who": "A model evaluator who needs to check whether a published decensored model is actually less restricted and still capable.",
 "problem": "Claims about a decensored model are hard to trust without the same refusal and divergence metrics applied to both models.",
 "outcome": "Refusal counts and KL divergence figures for a candidate model, comparable with the numbers in the README table.",
 "steps": [
  "Prepare a Python 3.10+ environment with PyTorch 2.2+ installed for your hardware.",
  "Run `pip install -U heretic-llm`.",
  "Run `heretic --model google/gemma-3-12b-it --evaluate-model p-e-w/gemma-3-12b-it-heretic`, replacing the two model IDs with the original and the candidate.",
  "Record the refusal count for the harmful prompts and the KL divergence for the harmless prompts.",
  "Compare the results with the README table and note that values can vary by platform and hardware."
 ],
 "agent_prompt": "Install the heretic-llm package from the p-e-w/heretic repo, then run `heretic --model <original-model-id> --evaluate-model <candidate-model-id>`. Return the refusal count and KL divergence the tool reports, and verify that both model IDs in the output match the ones you passed in.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README says these numbers depend on platform and hardware, and its own table used PyTorch 2.8 on an RTX 5090, so your figures may differ.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10 or newer",
  "PyTorch 2.2 or newer, installed for your hardware",
  "A GPU with enough VRAM for the model you pick (the README cites an RTX 3090 and an RTX 5090)",
  "Access to the target model's files, such as a Hugging Face model ID"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/p-e-w-heretic/verify-decensored-model-against-original/",
 "md": "https://dedupedai.com/use-cases/p-e-w-heretic/verify-decensored-model-against-original/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/p-e-w-heretic--verify-decensored-model-against-original.json",
 "api_version": "v1"
}
