Welcome to nice_hooks’s documentation!
A python package for making working with torch hooks easier. You can bind hooks to a modules using a flexible pattern string that can target multiple modules/neurons and it contains utilities for working with activation caches.
Many of the ideas are based on the
TransformerLens library, but written so it can work with any pytorch model.