MoonshotAI/FlashKDA
FlashKDA: high-performance Kimi Delta Attention kernels
What it solves
FlashKDA provides high-performance CUDA kernels for Kimi Delta Attention (KDA), a linear attention mechanism. It addresses the need for efficient, hardware-accelerated computation of these kernels to improve the speed and memory efficiency of models using this specific attention variant.
How it works
The project implements KDA kernels built on the CUTLASS library, specifically targeting NVIDIA SM90 (H100) and above architectures. It integrates as a backend for the flash-linear-attention (FLA) library, allowing users to replace the standard Triton-based implementation with these optimized C++ kernels for better performance.
Who it’s for
It is designed for AI researchers and engineers working with linear attention models and those utilizing the flash-linear-attention framework to optimize their model inference and training performance on modern NVIDIA GPUs.
Highlights
- High-performance kernels built on CUTLASS for SM90+ GPUs.
- Seamless integration with the
flash-linear-attentionlibrary via auto-dispatch. - Support for variable-length batching using cumulative sequence lengths (
cu_seqlens). - Support for both stateless and stateful (initial/final state) recurrent computations.
Related
- Project
- Dispatch
- Project
- Dispatch
- Project