Skip to content

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
  • Harden


    Keep safety during fine-tuning. A Harden trainer replaces your SFT trainer — it IS the fine-tuning.

  • Recover


    Restore safety in a drifted model. Weight-space editing, no training. Methods across 6 granularities.

  • Unlearn


    Remove a capability from a finished model. Forget set + retain set.

  • Steer


    Refuse harmful prompts at inference time. Wraps a frozen model, no weight changes.

  • Interpret


    Locate where safety lives — directions, neurons, circuits. Feeds Steer and localization-aware Recover.

  • Evaluate


    Measure safety with red-team attacks and benchmark/judge eval.

Tips & best practices

  1. Pick one method per task. SafeTune is a library of alternatives, not a pipeline. recover, harden, and steer solve different problems by different mechanisms — choose the one that matches your situation.
  2. Safety dataset: BeaverTails works well for English LLMs; customize for other languages.
  3. Benchmarks: HarmBench + XSTest cover most cases; add custom benchmarks as needed.
  4. Steering strength: The strength parameter (named strength in CAA and refusal-direction steering, default 1.0, or multiplier in SCANS/STA/AdaSteer, default 3.0-3.5) controls how aggressively the model is steered. Increase for stronger safety enforcement; watch for fluency cost at very high values.
  5. Memory: SafeGrad requires two forward passes (task + safety); use gradient accumulation to fit.