Overview of MagiAttention
mainMagiAttention is a distributed attention (Context Parallelism) solution designed for ultra-long sequences and heterogeneous masking patterns. It achieves linear scalability through several key architectural components:
- Flex-Flash-Attention (FFA): A kernel that supports distributable and flexible mask representations.
- Dispatch Solver: Manages load-balanced computation.
- Group Collective Primitives: Enables zero-redundant communication.
- Adaptive Multi-stage Overlap Strategy: Coordinates components to optimize performance.
It is optimized for large-scale training scenarios, such as video generation (e.g., Magi-1).