Skip to content

Conversation

degenfabian
Copy link
Collaborator

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@degenfabian degenfabian force-pushed the activation_patching_demo_transformer_bridge_migration branch from fc93245 to 739e8bf Compare August 18, 2025 15:17
@bryce13950 bryce13950 added this to the 3.0 milestone Aug 20, 2025
@bryce13950
Copy link
Collaborator

@degenfabian What's up with the changes made to transformers.py in this PR?

@degenfabian
Copy link
Collaborator Author

degenfabian commented Aug 26, 2025

@degenfabian What's up with the changes made to transformers.py in this PR?

Cell 8 fails because the devices of the tensors differ (HookedTransformer is on cuda and TransformerBridge is on cpu). I made those changes to mimic how the device selection worked in HookedTransformer (if the user doesn't specify anything, use the best available device on the current machine). This fixed the mismatching output on my laptop, but curiously not in the CI and so far I haven't been able to figure out why.

@bryce13950
Copy link
Collaborator

@degenfabian Sounds good! For something like this, that change should be a separate PR, since it may have a benefit in other places

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