Skip to content

updated loading in attribution patching demo to use transformer bridge#1013

Merged
jlarson4 merged 46 commits intodev-3.x-canaryfrom
attribution_patching_demo_transformer_bridge_migration
Mar 6, 2026
Merged

updated loading in attribution patching demo to use transformer bridge#1013
jlarson4 merged 46 commits intodev-3.x-canaryfrom
attribution_patching_demo_transformer_bridge_migration

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

@bryce13950 bryce13950 added this to the 3.0 milestone Aug 20, 2025
@bryce13950 bryce13950 changed the base branch from dev-3.x to dev-3.x-folding October 10, 2025 13:06
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
…n_patching_demo_transformer_bridge_migration
@jlarson4 jlarson4 changed the base branch from dev-3.x-folding to dev-3.x February 9, 2026 16:52
degenfabian and others added 10 commits February 27, 2026 11:03
Replace `from torchtyping import TensorType as TT` with a lightweight
stub class since torchtyping is not in project dependencies. Clear
outputs from cells with execution_count=null.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pysvelte was never imported in the notebook. Replace
pysvelte.AttentionMulti with cv.attention.attention_heads from
circuitsvis, which is already a project dependency.
- Replace manual forward cache hooks with model.run_with_cache() which
  handles hook alias resolution automatically
- Keep manual backward hooks for gradient caching (no built-in method)
- Add alias entries for grad_cache to fix hook.name mismatch
- Clear stale stderr output (DeprecationWarning for ipython.magic)
- Clear stale error output (torchtyping ModuleNotFoundError)
- Clear stale Cell 18 output (cache counts differ with TransformerBridge)

Note: Notebook is blocked on TransformerBridge bugs documented in
.claude/plans/transformer_bridge_bugs.md (pos_embed batch dim, cache
aliasing, MPS placeholder storage). Will revisit after upstream fixes.
… of github.com:TransformerLensOrg/TransformerLens into attribution_patching_demo_transformer_bridge_migration
@jlarson4 jlarson4 changed the base branch from dev-3.x to dev-3.x-canary March 6, 2026 02:57
@jlarson4 jlarson4 merged commit b4fc375 into dev-3.x-canary Mar 6, 2026
18 checks 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.

3 participants