ml-interpretabilitylisted
Install: claude install-skill Lu1sDV/skillsmd
# ML Interpretability
Two reference modules. Open only the reference the task needs; do not preload all.
| Task / Tool | Read |
|---|---|
| Activation caching, hooks, logit attribution, causal tracing, patching, or DAS/IIT (`TransformerLens`, `nnsight`, `pyvene`) | [Hooks and patching reference](references/hooks-and-patching.md) |
| Loading/training sparse autoencoders, feature attribution, steering, or Neuronpedia lookup (`SAELens`) | [Sparse autoencoders reference](references/sparse-autoencoders.md) |
## What each covers
- **Hooks and patching** — tool selection matrix plus practical APIs for `HookedTransformer` (`run_with_cache`, `run_with_hooks`, direct logit attribution, induction heads), `nnsight` (`LanguageModel`, `trace` context, `.save()`, `tracer.invoke()`, `remote=True` on NDIF, local gradients), and `pyvene` (`IntervenableModel`, `IntervenableConfig`, ROME causal tracing, `RotatedSpaceIntervention` / DAS, HF Hub sharing).
- **Sparse autoencoders** — `SAELens` workflows for loading pre-trained SAEs (`SAE.from_pretrained`), training custom SAEs (`LanguageModelSAERunnerConfig`, `SAETrainingRunner`, TopK/Gated/JumpReLU/Standard), target metrics (`L0`, CE loss recovered, dead feature ratio), feature logit attribution, steering/ablation hooks, and troubleshooting.
## Universal rules
- **Verify tokenization before computing metrics**: multi-character words often split into multiple tokens; inspect with `model.to_str_tokens(...)` and validate single-token targets wi