idiap/fast-transformers
A PyTorch library providing optimized transformer implementations with fast attention mechanisms, including softmax and linear attention variants.

Fast Transformers is a research-focused PyTorch library developed for efficient transformer attention mechanisms. It addresses the quadratic scaling problem of self-attention by offering linear attention alternatives, making transformers scalable to long sequences. The library provides builder APIs for constructing transformer encoders with configurable attention types and supports CUDA optimization for efficient execution.