Heretic
Heretic Deployment: GPU Environments, Quantization, and Model Provenance
Plan a private Heretic workstation or batch environment with pinned dependencies, VRAM controls, artifacts, and recovery boundaries.

What you will learn
- Explain the KL/refusal optimization objective
- Run a pinned model experiment
- Design broader safety evaluation
Before you start
- Basic Git and command-line usage
- Comfort reading a project README
You can explain the project, run its documented first step, and decide what to verify before adopting it.
Key takeaways
- Deploy Heretic as an isolated experiment worker, not an open endpoint.
- PyTorch feature compatibility matters more than the minimum version.
- Artifacts and recovery records are part of the deployment contract.
Treat deployment as an experiment runner
Heretic is documented as a command-line research tool rather than a multi-tenant serving platform. A practical deployment is an isolated GPU worker with a read-only model cache, a controlled output volume, and a manifest for every run.
Python 3.10+ and PyTorch 2.2+ are the baseline. The README warns that some models need later PyTorch features, such as `torch.accelerator` for MXFP4 gpt-oss models; pin the exact stack instead of assuming the minimum is sufficient.
Capacity and artifacts
The program benchmarks the machine to choose batch size. On the documented RTX 3090 example, Qwen3-4B takes roughly 20–30 minutes, but treat that as a workload-specific reference. Bitsandbytes `bnb_4bit` can reduce VRAM while adding a quantization variable to the evidence.
Persist the source model revision, lockfile, TOML configuration, hardware inventory, logs, evaluation outputs, checkpoint hash, and license. Keep upload credentials outside the worker and make export an explicit, reviewed step.
Recovery
Use a disposable output directory, checkpoint space and a known-good baseline. Test interrupted runs, insufficient VRAM, corrupted downloads, failed uploads, and cleanup before scheduling batches.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Pin Python, PyTorch, Heretic, uv lock, and model revisions.
- 2
Provision GPU, cache, output, and secret boundaries.
- 3
Run a smoke transform and evaluation with bounded VRAM.
- 4
Test interruption, restore, export, and cleanup paths.
Copy-ready example
uv run heretic --help
# pin the model revision and config.default.toml
heretic --model <model-id> --evaluate-model <checkpoint>
# keep HF/upload credentials in the secret manager, never in the imageFrequently asked questions
Can I run Heretic as a public API?
The README describes a CLI workflow; expose any service only after adding authentication, quotas, isolation, and a separate safety review.
Does 4-bit quantization preserve the same result?
Not necessarily. Measure it as a separate configuration because quantization changes memory, speed, and potentially model behavior.
Sources
- Heretic README (captured 2026-08-31)Source checked 2026-08-31
- Heretic repositorySource checked 2026-08-31