TransformerLensOrg / TransformerLens

A library for mechanistic interpretability of GPT-style language models
https://transformerlensorg.github.io/TransformerLens/
MIT License
1.17k stars 241 forks source link

(v3) Draft PR: add Pyright static typing to hook_points.py #590 #607

Closed starship006 closed 1 month ago

starship006 commented 1 month ago

Description

This is a copy of PR https://github.com/TransformerLensOrg/TransformerLens/pull/590 and #464 , but just remade so that @bryce13950 can close it.


This draft PR adds Pyright static typing to hook_points.py. See Alan's message on the slack for motivation/background. Specifically, this PR:

It's not entirely complete, but is in a state to where it would benefit from some review/assistance. Before being PR ready, we should:

Type of change

Please delete options that are not relevant.

Checklist:

bryce13950 commented 1 month ago

Alright, there is one more issue left to resolve. I am done for the day, but I am happy to take care of it tomorrow. If you want to look at it feel free, but I don't mind taking care of it.

starship006 commented 1 month ago

okay feel free to knock it out tomorrow if i don't get to it, thanks for the support

bryce13950 commented 1 month ago

All set! Thank you so much for your help and patience on this! If you are interested in contributing more, that would be much appreciated. If you aren't quite sure what you should or could do next, feel free to reach out to me on Slack as "Bryce Meyer" I would be happy to have a quick call to discuss what you are interested in, and to see if we can get you something fun to do.