Skip to content
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

Move Patchscope Logit Lens Token Looping to Script #43

Merged
merged 10 commits into from
Apr 22, 2024

Conversation

shaheenahmedc
Copy link
Collaborator

@shaheenahmedc shaheenahmedc commented Apr 15, 2024

For replicating the "decoding next-token prediction" task from the Patchscopes paper, we need to run a Patchscope Logit Lens for just one position per prompt, but currently the Patchscope Logit Lens loops over all prompt positions.
This looping is useful for producing the nostalgebraist-style logit lens plots, but I think should be moved out of the base Patchscope Logit Lens implementation, to the relevant script.

Oh also, I think the heatmaps visualisation had a bug in it, around repeated tokens in a prompt. Corrected for that.

Also, idna needed upgrading from 3.6 to 3.7, due to a vulnerability.

@shaheenahmedc shaheenahmedc marked this pull request as draft April 15, 2024 08:24
@shaheenahmedc shaheenahmedc marked this pull request as ready for review April 17, 2024 08:28
Copy link
Collaborator

@llinauer llinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly agree with the changes; just wanted to point out possible changes that can be applied to the ClassicLogitLens as well

obvs/lenses.py Show resolved Hide resolved
obvs/lenses.py Outdated Show resolved Hide resolved
@llinauer llinauer merged commit 67d9a13 into main Apr 22, 2024
3 checks passed
@llinauer llinauer deleted the patchscope_ll_token_looping branch April 22, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants