Expand description
Flash Attention - Memory-Efficient Attention Mechanism
Implements FlashAttention-2 algorithm for O(N) memory instead of O(N²). Uses tiled matrix multiplication with online softmax normalization.
Structs§
- Flash
Attention - Flash Attention layer with tiled computation and online softmax.
- Flash
Attention Grads - Gradients from Flash Attention backward pass.
- Grouped
Query Attention - Grouped Query Attention (GQA) - Efficient attention with fewer KV heads
- KVCache
- KV-Cache for efficient autoregressive generation
- Multi
Query Attention - Multi-Query Attention (MQA) - Extreme efficiency with single KV head
- Sliding
Window Attention - Sliding Window Attention for efficient long-context processing
Enums§
- Attention
Mask - Attention mask for custom attention patterns