Relation to other packages¶
How TorchLens relates to the tools people already use. Checked 2026-11-03.
- Which tool for this job?: the dated table, and when five lines of hooks are enough.
- Comparable tools, checked November 2026: each tool's status and source.
- Using TorchLens with other tools: the bridges, by direction.
- Where to go instead: jobs another tool does and TorchLens does not.
Coming from another tool¶
Every page has the same sections: the same task in both tools, a translation table, what TorchLens adds, what the other tool does that TorchLens does not, using both, and semantic differences.
- PyTorch building blocks: forward hooks, torch.fx, Hugging Face
output_hidden_statesandoutput_attentions. - Interpretability and intervention: TransformerLens, nnsight, pyvene, baukit, AutoCircuit, SAELens, RepE, penzai.
- Attribution: Captum, Inseq, transformers-interpret.
- Feature extraction: torchvision's feature extractor, torchvision's
IntermediateLayerGetter, timmfeatures_only, thingsvision, torchextractor, surgeon-pytorch, model zoos. - Inspection and drawing: torchinfo, flax tabulate, torchview, torchviz or hiddenlayer, BertViz or Ecco, torchsnooper, lovely-tensors.