Skip to content

Notebooks

Interactive Colab notebooks demonstrating every SafeTune workflow.

Demos — one per pillar

One notebook per pillar. Each runs to completion with printed output. Start with steer_demo — no GPU needed, ~2 minutes.

No GPU? Run 01, 02, 05, 09 (steer, recover, interpret, safety monitoring — all inference or light patching, no training). Have a GPU? Everything works, including 10 (full_pipeline), which is the longest single run since it exercises all six pillars back to back.

#NotebookPillarGPULink
01steer_demo ← start hereSteerNo GPUOPEN IN COLAB
02recover_demoRecoverNo GPUOPEN IN COLAB
03harden_demoHardenGPU helpsOPEN IN COLAB
04unlearn_demoUnlearnGPU helpsOPEN IN COLAB
05interpret_demoInterpretNo GPUOPEN IN COLAB
06evaluate_demoEvaluateGPU helpsOPEN IN COLAB

Comparisons — pick the right method

Side-by-side runs of multiple methods on the same checkpoint.

#NotebookPillarGPULink
07steer_comparisonSteerGPU helpsOPEN IN COLAB
08recover_comparisonRecoverGPU helpsOPEN IN COLAB

Advanced

#NotebookPillarGPULink
09safety_monitoringEvaluateNo GPUOPEN IN COLAB
10full_pipelineAll pillarsGPU helpsOPEN IN COLAB

Prefer plain scripts?

The six pillar demos (01–06) and full_pipeline (10) each mirror a script in examples/ (examples/quickstart/ or examples/demos/); steer_comparison, recover_comparison, and safety_monitoring (07–09) are notebook-only. Where a script exists, it's the source of truth; the notebook wraps the same code for interactive Colab sessions.