PaddlePaddle/FlashMask v4.0.0
PaddlePaddle/FlashMask
Captured source
source ↗published Nov 3, 2026seen 3wcaptured 3whttp 200method plain
FlashMask v4.0.0: Efficient Mask-Aware Attention for Long-Context Training
Repository: PaddlePaddle/FlashMask
Tag: v4.0.0
Published: 2026-11-03T07:02:59Z
Prerelease: no
Release notes:
Overview
FlashMask is an efficient attention kernel library designed for flexible masking and distributed long-context training.
- FlashMask (ICLR 2025): Introduced memory-efficient column-wise sparse mask representation, reducing mask storage complexity from O(N²) to O(N), while skipping unnecessary attention computation.
- FlashMask-3 (NeurIPS 2026): Extended mask-aware attention to distributed long-context training with mask-aware load balancing and communication/computation overlap.
- FlashMask-4: Introduces high-performance CuTe DSL kernels for NVIDIA Hopper and Blackwell, with support for flexible masks, sink bias, deterministic computation, and large head dimensions.
Key Features
- Flexible and memory-efficient sparse mask representation.
- High-performance attention kernels for Hopper (SM90) and Blackwell (SM100).
- Large head dimension and shared KV optimizations.
- Mask-aware context parallelism and communication/computation overlap.
- Native PaddlePaddle and PyTorch interfaces.
Getting Started
See the [README](https://github.com/PaddlePaddle/FlashMask) for installation, usage examples, benchmarks, and supported configurations.
Acknowledgements
FlashMask builds upon [FlashAttention](https://github.com/Dao-AILab/flash-attention). We sincerely thank Tri Dao and the FlashAttention team for their foundational contributions.