-
Notifications
You must be signed in to change notification settings - Fork 415
Add hooked transformer generate stream #908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add hooked transformer generate stream #908
Conversation
9fcf45a
to
b86b035
Compare
b86b035
to
b7bce69
Compare
Before we merge this:
|
@hijohnnylin The test is from this commit in this PR b7bce69 |
I added the test in this PR. It tests that the last value of TransformerLens/tests/acceptance/test_hooked_transformer.py Lines 178 to 195 in 47fe156
So I think that completes 2. You and I talked about 1 shortly after I opened this PR, in person. I'm not sure it's worth the effort - I spent a lot of time trying to dedupe code between the two functions for this PR, and not only did functions stop working as expected, but extracting abstractions was awkward. This is probably because |
Description
Adds a new method
HookedTransformer.generate_stream()
. We wanted to add this in #847, but hadn't added tests, and also want to complete hijohnnylin/neuronpedia#51. @hijohnnylin said to open a PR, and if we merge this, we can replace a fork of TransformerLens with the latest version oftransformer-lens
as a dependency in neuronpedia.Fixes # (issue)
Type of change
Please delete options that are not relevant.
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist: