lucidrains/x-transformers

A concise but complete full-attention transformer with a set of promising experimental features from various papers

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 50 minutes ago
Added to GitGenius on September 11th, 2026
Created on October 24th, 2020
Open Issues & Pull Requests: 76 (+0)
GitHub issues: Enabled
Number of forks: 519
Total Stargazers: 5,944 (+0)
Total Subscribers: 56 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 1.7 hours
Mean response time: 11.8 days
90th percentile: 11.1 days
Tracked items: 65

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 10% of issues opened in the past year have been closed. Three people close 84% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 19
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 572 days
Stale 30+ days: 19
Stale 90+ days: 19

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (4)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

x-transformers is a Python library that implements a full-featured transformer architecture with experimental features from recent research papers.

The library addresses the need for a flexible, production-ready transformer implementation that incorporates modern optimizations and architectural innovations. It provides encoder-only, decoder-only, and full encoder-decoder configurations, allowing developers to build models ranging from BERT-like architectures to GPT-style language models to multimodal systems. The implementation emphasizes practical efficiency through features like Flash Attention, which reduces memory consumption to linear complexity with respect to sequence length while simultaneously improving computational speed by minimizing high-bandwidth memory accesses.

The tool suits researchers and practitioners building transformer-based models who want access to recent experimental techniques without implementing them from scratch. It works well for projects requiring longer context lengths, since Flash Attention enables training on sequences that would otherwise hit memory constraints. The library includes implementations of augmented self-attention with persistent memory and memory tokens, techniques that improve model performance by adding learned tokens to the attention mechanism. Developers should choose this library if they need a concise but complete transformer implementation that incorporates state-of-the-art optimizations and can be readily integrated into larger systems for tasks like language modeling, vision, or multimodal learning.

Maintainers respond to new issues and pull requests within hours. Development activity is dominated by enhancement work, indicating ongoing refinement and addition of new capabilities rather than bug fixes or maintenance concerns.