
Explore efficient transformers that tackle the quadratic time and memory growth with sequence length, addressing long documents and multimodal inputs through models like Star Transformers, Reformer, Longformer, and Synthesizer.
Replace quadratic attention with a star-shaped topology using star transformers, introducing relay and satellite nodes with radical and ring connections to achieve linear complexity and faster attention for NLP tasks.
Explore sparse transformers that enable efficient self-attention over ultra-long sequences using fixed and striated attention, memory-saving backward recomputation, and redesigned residual blocks for scaling to tens of thousands of tokens.
Reformer replaces product attention with locality-sensitive hashing attention to achieve linear time, while reversible residual layers and chunked activations cut memory usage.
Longformer blends dilated sliding window attention with global tokens to capture local and global context, delivering linear memory and optimized sparse implementations for efficient long-sequence processing.
Linformer replaces self-attention with low-rank projections of keys and values for linear complexity and faster inference, using shared projections across heads or layers to balance memory, latency, and accuracy.
Explore efficient transformer architectures for long sequences, including sparse transformers, longformer with dilated and global windows, and reformer variants using lsh and projection-based linearization of q, k, v.
Explore six efficient transformer methods to reduce quadratic attention complexity, including Star Transformers, Reformer, Longformer, Linformer, Synthesizer, and NBC extended transformer construction, with benchmark implications.
Explore the extended transformer construction, combining relative position encodings with global and local sparse attention, using global tokens and CPC loss for structured input.
The Big Bird model blends global, local, and random attention to handle long sequences, achieving state of the art results on MLM, QA, summarization, and genomics benchmarks.
Learn how linear attention converts quadratic complexity to linear for autoregressive, long-sequence modeling, using causal updates, kernel-based similarity, and fast, memory-efficient processing.
Explore the performer, a transformer that achieves linear space and time complexity by approximating softmax attention with kernel-based feature maps, including positive random features and orthogonal variants.
Explore the sparse sinkhorn transformer, where queries attend to key blocks via trainable sorting and block embeddings, using permutation normalization to enable a forward network driven mixture with standard attention.
Explore routing transformers that replace locality sensitive hashing with k-means clustering to route attention among queries and keys, achieving memory-efficient sparse attention with exponential moving average clustering and causal attention.
Explore the long range arena benchmark evaluating six long-sequence tasks—from list operations to Pathfinder image tasks—comparing models like Big Bird and linear transformer on accuracy, latency, and memory tradeoffs.
Compare efficient transformer methods across axes of memory and complexity, detailing fixed versus learnable patterns, local and global attention, external and internal memory, compression, and recurrence for long-range sequences.
Explore efficient transformers for long-range NLP tasks. Survey global, local, sparse, and dynamic attention methods like Big Bird, linear transformers, and routing transformers.
This course is a part of "Deep Learning for NLP" Series. In this course, I will talk about various design schemes for efficient Transformer models. These techniques will come in very handy for academic as well as industry participants. For industry use cases, Transformer models have been shown to lead to very high accuracy values across many NLP tasks. But they have quadratic memory as well as computational complexity making it very difficult to ship them. Thus, this course which focuses on methods to make Transformers efficient is very critical for anyone who wants to ship Transformer models as part of their products.
Time and activation memory in Transformers grows quadratically with the sequence length. This is because in every layer, every attention head attempts to come up with a transformed representation for every position by "paying attention" to tokens at every other position. Quadratic complexity implies that practically the maximum input size is rather limited. Thus, we cannot extract semantic representation for long documents by passing them as input to Transformers. Hence, in this module we will talk about methods to address this challenge.
The course consists of two main sections as follows. In the two sections, I will talk about Efficient Transformer Models, Efficient Transformer benchmark and a Comparison of various efficient Transformer methods.
In the first section, I will talk about methods like Star Transformers, Sparse Transformers, Reformer, Longformer, Linformer, Synthesizer.
In the second section, I will talk about methods like ETC (Extended Transformer Construction), Big bird, Linear attention Transformer, Performer, Sparse Sinkhorn Transformer, Routing transformers. Long Range Arena is a recent benchmark for evaluating models on long sequence tasks with respect to accuracy, memory usage and inference time. We will discuss details about long range arena and finally wrap up with a philosophical categorization of various efficient Transformer methods.
For each method, we will discuss specific scheme for optimization, architecture and results obtained for pretraining as well as downstream tasks.