Optimized Attention

Optimized Attention refers to architectural modifications and algorithmic improvements within the Transformer framework designed to reduce computational complexity and memory footprint during large-language-model inference and training. Standard self-attention scales quadratically with sequence length, creating bottlenecks for long-context processing. Optimized variants aim to approximate this mechanism with linear or sub-quadratic complexity while preserving model performance.

Key Mechanisms & Variants

  • Sparse Attention: Restricts attention windows to local regions or specific patterns (e.g., Strided Attention, Block Sparse Attention) to reduce token interactions.
  • Linear Attention: Reformulates the softmax attention operation to allow for associative scanning, enabling complexity (e.g., Performer, Linear Transformer).
  • State Space Models (SSMs): Alternative recurrent mechanisms that process sequences in a single pass, often integrated with attention for hybrid efficiency (e.g., mamba, RWKV).
  • KV Cache Optimization: Techniques to compress or quantize the Key-Value cache used during autoregressive generation to reduce VRAM usage.

Recent Developments

References