User Guide¶
Usage guides for all six method groups — four intervention pillars and two instrumentation tools. Each guide covers the input contract, a quick example, and the catalog of methods.
◆ SafeTune
audited LLM-safety methods
Tier 1 · Interventions
↓
Tier 2 · Instrumentation
↓
TIER 1 · INTERVENTIONS
CHANGE model safety
hardenTrain-time · base + FT data
recoverWeight-space · drifted model
unlearnForget-set · remove capability
steerInference-time · frozen model
TIER 2 · INSTRUMENTATION
OBSERVE safety
interpretDiagnose · locate safety
evaluateMeasure · red-team + eval
-
Keep safety during fine-tuning. A Harden trainer replaces your SFT trainer — it IS the fine-tuning.
-
Restore safety in a drifted model. Weight-space editing, no training. Methods across 6 granularities.
-
Remove a capability from a finished model. Forget set + retain set.
-
Refuse harmful prompts at inference time. Wraps a frozen model, no weight changes.
-
Locate where safety lives — directions, neurons, circuits. Feeds Steer and localization-aware Recover.
-
Measure safety with red-team attacks and benchmark/judge eval.
Tips & best practices¶
- Pick one method per task. SafeTune is a library of alternatives, not a
pipeline.
recover,harden, andsteersolve different problems by different mechanisms — choose the one that matches your situation. - Safety dataset: BeaverTails works well for English LLMs; customize for other languages.
- Benchmarks: HarmBench + XSTest cover most cases; add custom benchmarks as needed.
- Steering strength: The strength parameter (named
strengthin CAA and refusal-direction steering, default1.0, ormultiplierin SCANS/STA/AdaSteer, default3.0-3.5) controls how aggressively the model is steered. Increase for stronger safety enforcement; watch for fluency cost at very high values. - Memory: SafeGrad requires two forward passes (task + safety); use gradient accumulation to fit.