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

[Minor] Allow sharing interventions across multiple positions #129

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

frankaging
Copy link
Collaborator

Description

We added in keep_last_dim flag into intervention class to represent whether we want to intervene just on the last dimension without any reshaping.

  • with this flag set to False, we will concatenate multiple reprs from different positions together and intervene on them as a unified repr.
  • with this flag set to True, we intervene on them individually without concatenation. This allows an intervention to be shared across multiple positions easily.

Testing Done

Tutorial has a new test.

Checklist:

  • My PR title strictly follows the format: [Your Priority] Your Title
  • I have attached the testing log above
  • I provide enough comments to my code
  • I have changed documentations
  • I have added tests for my changes

@frankaging frankaging merged commit 7504fb6 into main Mar 14, 2024
1 check passed
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.

1 participant