SafeTune is a PyPI library of LLM safety methods organized into a
2-tier, input-keyed taxonomy. It is not a pipeline — each task has many
independent methods that solve it by different mechanisms; users pick one per task.
No pipeline orchestration. Users pick one method per task, not a sequence.
This prevents accidental method entanglement and keeps each method independently
auditable.
Lazy imports for heavy optional backends.vllm (and the interpret
extras) are imported only when a method that needs them runs, so the base
install does not pull them in. Note that transformers, trl, torch,
datasets, and peft are eager dependencies imported at import safetune
time, so a cold import safetune still takes a few seconds.
Faithfulness audit built-in. Every method carries an audit badge
(Faithful / Simplified / Variant / Wrong / Stub). Only Faithful methods may be
cited as the named paper.
Runner layer as optional wizard. The runner/ package wraps pillar methods
in a Trainer().train().eval().save_results() workflow. Users can also use
the pillar packages directly (safetune.recover.apply_resta(...)).