lucidrains/x-transformers
A full-featured PyTorch transformer library implementing encoder-decoder, GPT-style decoder-only, and BERT-style encoder-only architectures.

This repository provides a complete transformer implementation in PyTorch with support for encoder-only, decoder-only, and encoder-decoder architectures. It includes experimental features from various research papers, enabling users to build BERT-style, GPT-style, and full encoder-decoder models with configurable dimensions, depth, attention heads, and sequence lengths. The library is installable via pip and designed for researchers and practitioners implementing transformer-based models.
Frequently asked
- What is lucidrains/x-transformers?
- A full-featured PyTorch transformer library implementing encoder-decoder, GPT-style decoder-only, and BERT-style encoder-only architectures.
- Is x-transformers open source?
- Yes — lucidrains/x-transformers is open source, released under the MIT license.
- What language is x-transformers written in?
- lucidrains/x-transformers is primarily written in Python.
- How popular is x-transformers?
- lucidrains/x-transformers has 5.9k stars on GitHub.
- Where can I find x-transformers?
- lucidrains/x-transformers is on GitHub at https://github.com/lucidrains/x-transformers.