← ClaudeAtlas

ml-interpretabilitylisted

Mechanistic interpretability for neural networks: activation caching, hook points, causal tracing, activation patching, interchange interventions (DAS/IIT), and sparse autoencoders (SAEs). Covers TransformerLens, nnsight (including NDIF remote execution), pyvene, and SAELens. Triggers on 'TransformerLens', 'HookedTransformer', 'nnsight', 'NDIF', 'pyvene', 'SAELens', 'activation patching', 'causal tracing', 'circuit analysis', 'sparse autoencoder', 'feature steering', or 'mechanistic interpretability'.
Lu1sDV/skillsmd · ★ 2 · AI & Automation · score 63
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