Add hooked transformer generate stream#908
Add hooked transformer generate stream#908anthonyduong9 wants to merge 6 commits intoTransformerLensOrg:devfrom
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-lensas 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: