Heretic
Desplegar Heretic: GPU, cuantización y procedencia del modelo
Un runner aislado con dependencias fijadas, control de VRAM, artefactos y recuperación.

Qué aprenderás
- Explain the KL/refusal optimization objective
- Run a pinned model experiment
- Design broader safety evaluation
Antes de empezar
- 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.
Conclusiones clave
- 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 es un runner de experimentos, no un servicio multi-tenant; fija Python/PyTorch/uv, revisión del modelo, volumen de salida y pruebas de recuperación.
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.
Cómo elegir
| Criterio | Opción A | Opción 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 |
Pasos de implementación
- 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.
Ejemplo para copiar
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 imagePreguntas frecuentes
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.
Fuentes
- Heretic README (captured 2026-08-31)Fuente verificada 2026-08-31
- Heretic repositoryFuente verificada 2026-08-31