← Back to Leaderboard
HVinay-Umrethe

Vinay-Umrethe/heretic

HN ▲206 ↗

Local, training-free LLM weight editing with pluggable modifiers and multi-objective search

LLM TrainerQuickstart ↓
Engineering Health (Methodology)
B+ · 72/100
Maintenance Activity
● Updated today
Latest Release
Rolling commits (main)
Commercial License Check
AGPL-3.0 · Copyleft Warning

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption15/25
Release Cadence11/20
License Clarity11/20
CLIGPULocal AI
Total Stars
★ 619
24h Growth
+10
7d Growth
+617
Forks
52

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

Vinay-Umrethe/heretic Star History (2026-09-27 - 2026-12-04) ALL-TIME STAR HISTORY (2026-09 – 2026-12) +618 in 68d · avg +9/day 654 327 0 2026-09-27: ★ 12026-10-03: ★ 12026-10-10: ★ 12026-10-17: ★ 12026-10-24: ★ 12026-10-31: ★ 12026-11-05: ★ 12026-11-10: ★ 12026-11-15: ★ 12026-11-20: ★ 22026-11-25: ★ 22026-11-30: ★ 1552026-12-04: ★ 619 ★ 619 09-27 10-31 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Heretic is a local Python/PyTorch CLI that edits model weights rather than training them or wrapping a hosted inference API. It uses contrasting prompt examples to guide edits and evaluates candidate modifications with configured scorer plugins. Optuna's TPE-based optimizer searches modifier parameters against one or more scores, each configured for minimization or maximization. By default, the scores are refusal rate and KL divergence.

The interfaces in src/heretic/modifier.py and src/heretic/scorer.py separate the weight-editing method from the evaluation criteria. The default modifier is Arbitrary-Rank Ablation (ARA); the other built-in modifier implements directional ablation with configurable layer weighting, projected abliteration, and norm preservation. A run selects one modifier, but it can co-optimize multiple scorers or multiple configurations of the same scorer. Custom scorers load by Python import path or file-and-class reference without patching the package.

Key Capabilities & Differentiators

The tool supports most dense models, including many multimodal models, as well as several MoE architectures and many hybrid models. That is architecture coverage, not a guarantee for every checkpoint or hardware configuration. Refusal suppression is the default; separate TOML presets target low-quality filler, humor, sycophancy, emotional alignment, or response length. After a run, users can save or upload the model, test it in an interactive chat, or run benchmarks.

A Hugging Face upload can optionally include a reproduce/ directory and reproduce.json. Running heretic --reproduce path/to/reproduce.json replays the selected modification without repeating the search, checks for environment mismatches, and compares exported weight hashes with the manifest. Byte-for-byte reproduction depends on matching the original hardware, drivers, OS, and software stack; a manifest alone does not ensure identical weights.

Trade-offs & Limitations

Compared with a standalone abliteration tool such as FailSpy's abliterator.py, Heretic provides a common search and scoring workflow for experiments with competing objectives. The cost is repeated candidate evaluation and more decisions about prompt selection and metrics. A fixed-edit script may be easier to audit when the experiment needs only one controlled change. Selected public comparisons do not establish a general quality advantage across checkpoints.

A lower refusal rate and KL divergence are proxies, not proof that downstream capabilities or appropriate safety behavior survived. Validate on held-out tasks and prompts where refusal should remain appropriate before sharing edited weights. On-the-fly bitsandbytes 4-bit quantization can make a run fit in less VRAM at a slight accuracy cost. The package is AGPL-3.0-or-later; review source-disclosure obligations for modified network-accessible deployments and check the base model's terms separately before redistribution.

Hardware & Deployment Guide

Use Python 3.10+ and a hardware-appropriate PyTorch 2.6+ installation, then install the heretic-llm package with pip. The heretic CLI reads config.toml from the working directory unless HERETIC_CONFIG_FILE points elsewhere. Select the configuration explicitly for experiments that should not suppress refusals. The workflow is local model processing, not a serving stack; Hugging Face upload is optional.

At startup, Heretic benchmarks batch size. The documented reference run for Qwen3-4B-Instruct-2507 is about 30–40 minutes on an RTX 3090 with the default configuration; use it as a reference point, not a capacity estimate for another model or scoring setup. The manifest identifies the checkout as 2.2.0.dev0, and no latest release is listed. The concrete upgrade constraint is that 1.x TOML files are incompatible with 2.x; migrate them using docs/migration_v1_to_v2.md before rerunning old experiments.

Search loop: Optuna's TPE-based optimizer tunes modifier parameters against configured scores without retraining model weights.
Modifier boundary: ARA is the default; directional ablation supports layer weighting, projected abliteration, and norm preservation. Only one modifier runs at a time.
Scorer integration: Custom classes load by import path or file-and-class reference, and multiple scorer instances can be co-optimized.
Model coverage: Supports most dense models, including many multimodal models, plus selected MoE and hybrid architectures.
GPU operation: Startup batch-size benchmarking and on-the-fly bitsandbytes 4-bit quantization help fit evaluation runs to the hardware.
Reproduction: Optional Hugging Face uploads can include a reproduce.json manifest for replay and exported-weight hash checks.
Best For

Local GPU research on editable checkpoints when you need to compare behavior changes such as verbosity or sycophancy and can validate capability and safety regressions before sharing weights.

Skip If

You only have hosted API access, need a production inference server, or cannot independently evaluate the edited model.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

CLIGPULocal AI
pip install -U heretic-llm
heretic Qwen/Qwen3-4B-Instruct-2507

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/Vinay-Umrethe/heretic.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

Vinay-Umrethe/heretic Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about heretic

Can I add an evaluation objective without patching Heretic?

No. Implement get_score in a Scorer subclass and reference the class by its fully qualified Python import path or as path/to/plugin.py:MyScorerClass. The same scorer can be instantiated with different settings. A run can optimize several scores together but applies only one modifier.

How should I budget GPU memory and runtime?

Size for repeated candidate evaluation, not just for loading the checkpoint. Heretic benchmarks batch size at startup, and bitsandbytes 4-bit quantization can lower VRAM use at a slight accuracy cost. A Qwen3-4B-Instruct-2507 run on an RTX 3090 took about 30–40 minutes with the default configuration; that is not a sizing guarantee for other models or scorers.

Can we self-host Heretic commercially or distribute edited weights?

AGPL-3.0-or-later does not prohibit commercial use or local self-hosting. If you modify Heretic and let users interact with that version over a network, the AGPL requires offering those users its corresponding source. Separately, review the base model's terms before using or distributing edited weights; Heretic's license does not grant rights to the checkpoint.

When is Heretic preferable to a standalone abliteration tool?

Tools such as FailSpy's abliterator.py and AutoAbliteration are direct comparison points for directional ablation. Heretic is better suited when the experiment calls for a shared workflow for modifier selection, multi-objective search, and export. If the question is how one fixed edit affects a model, a narrower script can make that comparison easier to audit. There is not enough controlled benchmark evidence here to rank them generally.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining Vinay-Umrethe/heretic? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature Vinay-Umrethe/heretic on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare