3 ms·
Intermediate Activations – the forward hook (2020)
- vinay427 2y agoFor those interested in playing with or doing research using model internals, the TransformerLens [1] project appears to be the leading open-source tooling in this area. It allows for loading dozens of different models, adding hooks, displaying activations in a format compatible with CircuitsVis, and other (mechanistic) interpretability work. [1] https://github.com/neelnanda-io/TransformerLens https://github.com/neelnanda-io/TransformerLens [2] https://github.com/alan-cooney/CircuitsVis https://github.com/alan-cooney/CircuitsVis
- jey 2y ago(2020)
- knlb2022 2y agoI gave a small talk on how to really push using hooks for logging intermediate values (including capturing gradients from torch & fx scripted modules) that may be useful: https://static.sched.com/hosted_files/pytorch2023/40/Intermediate%20Logging%20_%20PyTorch%20Conference%202023.pdf https://static.sched.com/hosted_files/pytorch2023/40/Interme...
- jph00 2y agoFYI, for anyone interesting in creating and using hooks to better understand what's happening in your model, I created a free lesson covering that: https://course.fast.ai/Lessons/lesson17.html https://course.fast.ai/Lessons/lesson17.html