QwenLM/FlashQLA

high-performance linear attention kernel library built on TileLang

What it solves

FlashQLA provides high-performance linear attention kernels for GDN Chunked Prefill, addressing the computational bottlenecks of long-sequence processing and training in models like the Qwen series on NVIDIA GPUs.

How it works

Built on TileLang, FlashQLA implements fused warp-specialized kernels and hardware-friendly algebraic reformulations. It features gate-driven automatic intra-card context parallelism and Dual CP for multi-GPU sequence parallelism, sharing summary computation to minimize boundary-state overhead.

Who it’s for

It is designed for machine learning engineers and researchers training or running inference on large language models using linear attention mechanisms who require significant speedups on single or multi-GPU setups.

Highlights

  • Achieves 1.7-3.1x forward speedup and up to 4.4x backward speedup over FLA Triton kernels on a single GPU.
  • Reaches up to 4.8x forward speedup and 4.4x combined speedup on 8 GPUs with up to 1M token contexts using Dual CP.
  • Gate-driven automatic intra-card context parallelism for tensor parallel, long-sequence, and small-head settings.
  • Seamlessly serves as a backend for flash-linear-attention's GDN via standard APIs.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project