MoonshotAI/FlashKDA
原文摘要
FlashKDA: high-performance Kimi Delta Attention kernels FlashKDA FlashKDA: Flash Kimi Delta Attention — high-performance KDA kernels built on CUTLASS News 2026-04-22 — Deep-Dive Blog: the design decisions behind FlashKDA v1, read it here . Requirements SM90 and above CUDA 12.9 and above PyTorch 2.4 and above Installation git clone https://github.com/MoonshotAI/FlashKDA.git flash-kda cd flash-kda git submodule update --init --recursive pip install -v --no-build-isolation . By default, the build detects the current CUDA device and compiles for that architecture. For wheel or CI builds, compile all supported architectures explicitly: FLASH_KDA_CUDA_ARCHS=all pip install -v --no-build-isolation . Supported values are auto (default), all , or a comma-separated arch list such as 90a,100a . Using FlashKDA as an FLA backend Once installed, FlashKDA is auto-dispatched from flash-linear-attention 's chunk_kda . See fla-org/flash-linear-attention#852 for integration details. Requirements Install flash-linear-attention >= 0.5.0 : pip install -U flash-linear-attention Call chunk_kda under torch.inference_mode() import torch from fla.ops.kda import chunk_kda with torch.inference_mode(): out, fin…