transformerlensorg/transformerlens

A library for mechanistic interpretability of GPT-style language models

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 1 hour ago
Added to GitGenius on September 17th, 2026
Created on August 26th, 2022
Open Issues & Pull Requests: 15 (+0)
GitHub issues: Enabled
Number of forks: 689
Total Stargazers: 3,893 (+0)
Total Subscribers: 26 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 34.6 hours
Mean response time: 71.0 days
90th percentile: 235.8 days
Tracked items: 334

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Practically every issue opened in the past year has drawn a reply. Work labelled "v4.x" is answered fastest, typically in under an hour, while "complexity-high" waits about 3 days. 95% of issues opened in the past year have since been closed. Three people close 93% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 10
New in 7 days: 6
Closed in 7 days: 4
Avg open age: 172 days
Stale 30+ days: 3
Stale 90+ days: 2

Recent activity

Opened in 7 days: 3
Closed in 7 days: 4
Comments in 7 days: 1
Events in 7 days: 5

Top labels

  • TransformerBridge (104)
  • complexity-moderate (93)
  • help wanted (77)
  • bug (63)
  • good first issue (47)
  • complexity-high (45)
  • enhancement (44)
  • complexity-simple (35)

Detailed Description

TransformerLens is a library for mechanistic interpretability of GPT-style language models.

The library addresses the challenge of understanding how trained language models work by exposing their internal mechanisms. It loads models from HuggingFace and provides direct access to internal activations at any layer or component. Users can cache activations, edit them, remove them, or replace them during model execution to observe how changes propagate through the network. This approach enables researchers to reverse-engineer the algorithms that models learn during training by examining and manipulating their weights and activations.

The tool suits researchers and practitioners focused on interpretability work rather than production deployment. It is particularly valuable for those studying circuit analysis, attention patterns, and the learned algorithms within transformer models. The library supports over 15,000 open source models across more than 140 architecture families through its TransformerBridge interface, which preserves raw HuggingFace weights by default. A legacy HookedTransformer API remains available but is deprecated in favor of the newer TransformerBridge approach. The project maintains compatibility with HuggingFace's model ecosystem, allowing researchers to work with a broad range of contemporary architectures.

Development activity shows consistent maintenance with automated testing and documentation deployment pipelines. The project has established clear migration guidance for users transitioning between major versions, indicating attention to the developer experience as the codebase evolves. Active stewardship is evident in the deprecation of legacy APIs in favor of improved interfaces rather than abrupt breaking changes.