News for hackers. Stuff that matters.
Re:Intermediate Activations – The Forward Hook by vinay427 on Sunday April 21, 2024 @02:01PM (#40107782)
For 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

[2] https://github.com/alan-cooney/CircuitsVis

Re:Intermediate Activations – The Forward Hook by jey on Sunday April 21, 2024 @07:32PM (#40110122)
(2020)
Re:Intermediate Activations – The Forward Hook by knlb2022 on Sunday April 21, 2024 @08:25PM (#40110437)
I 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/Interme...
Re:Intermediate Activations – The Forward Hook by jph00 on Sunday April 21, 2024 @11:58PM (#40111297)
FYI, 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