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.
| # | Notebook | Pillar | GPU | Link |
|---|---|---|---|---|
| 01 | steer_demo ← start here | Steer | No GPU | OPEN IN COLAB |
| 02 | recover_demo | Recover | No GPU | OPEN IN COLAB |
| 03 | harden_demo | Harden | GPU helps | OPEN IN COLAB |
| 04 | unlearn_demo | Unlearn | GPU helps | OPEN IN COLAB |
| 05 | interpret_demo | Interpret | No GPU | OPEN IN COLAB |
| 06 | evaluate_demo | Evaluate | GPU helps | OPEN IN COLAB |
Comparisons — pick the right method¶
Side-by-side runs of multiple methods on the same checkpoint.
| # | Notebook | Pillar | GPU | Link |
|---|---|---|---|---|
| 07 | steer_comparison | Steer | GPU helps | OPEN IN COLAB |
| 08 | recover_comparison | Recover | GPU helps | OPEN IN COLAB |
Advanced¶
| # | Notebook | Pillar | GPU | Link |
|---|---|---|---|---|
| 09 | safety_monitoring | Evaluate | No GPU | OPEN IN COLAB |
| 10 | full_pipeline | All pillars | GPU helps | OPEN 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.