#8282nd of 126 in ML frameworks and libraries

flash-linear-attention

Triton kernels and PyTorch layers for linear attention and hybrid sequence models

Stars
6k
License
MIT
Last commit
Nov 2026
Last release
Oct 2026
Language
Python
Stars, last 30 weeks+1,251
3 Apr 2026: 4,759 stars10 Apr 2026: 4,799 stars17 Apr 2026: 4,858 stars24 Apr 2026: 4,933 stars1 May 2026: 4,980 stars8 May 2026: 5,019 stars15 May 2026: 5,060 stars22 May 2026: 5,086 stars29 May 2026: 5,124 stars5 Jun 2026: 5,157 stars12 Jun 2026: 5,185 stars19 Jun 2026: 5,209 stars26 Jun 2026: 5,241 stars3 Jul 2026: 5,268 stars10 Jul 2026: 5,299 stars17 Jul 2026: 5,337 stars24 Jul 2026: 5,389 stars31 Jul 2026: 5,468 stars7 Aug 2026: 5,504 stars14 Aug 2026: 5,547 stars21 Aug 2026: 5,586 stars28 Aug 2026: 5,646 stars4 Sept 2026: 5,691 stars11 Sept 2026: 5,729 stars18 Sept 2026: 5,760 stars25 Sept 2026: 5,789 stars2 Oct 2026: 5,809 stars9 Oct 2026: 5,844 stars16 Oct 2026: 5,939 stars23 Oct 2026: 5,977 stars30 Oct 2026: 6,010 stars

4,759 on 3 Apr 20266,010 on 30 Oct 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Library of Triton kernels, `fla.layers` token-mixing modules and model implementations for linear attention, sparse attention, state space models and hybrids. It covers RetNet, GLA, DeltaNet, Gated DeltaNet, KDA, RWKV7, Mamba2/3, NSA and MoBA, and the layers can replace standard multihead attention. The README states the implementations are verified on NVIDIA, AMD and Intel hardware.

Who it is for: Researchers and engineers training or benchmarking subquadratic LLMs

Strengths

  • Covers about 40 architectures, from RetNet and GLA to Mamba3, KDA and Gated DeltaNet
  • Layers can replace standard attention in an existing model, with hybrid model support
  • Backend extras for CUDA, ROCm, XPU, NPU and CPU installs
  • Variable-length kernels, fused linear cross-entropy, context parallel for KDA and GDN

Weaknesses

  • Bare pip install does not pull torch or triton; a backend extra is required
  • Full training loop lives in a separate repo (flame), not here
  • Input layout changed from head-first to seq-first in 2024, which can break older code

What it needs

  • GPU optional
  • Needs PyTorch, Triton
  • Models: RetNet, GLA, DeltaNet, Gated DeltaNet, KDA

Quick answers

Is flash-linear-attention open source?

Yes. Its code is on GitHub under the MIT license.

Does flash-linear-attention need a GPU?

No. It runs on a CPU and can use a GPU when you have one.

Also in ML frameworks and libraries

See all 126
Also in ML frameworks and libraries
RankProjectScore
1pytorchPython tensor library with GPU support and tape-based autograd for deep learning105.1k starscustom license95 out of 100
2transformersPython library defining open models for text, vision, audio and multimodal tasks168.4k starsApache-2.094 out of 100
3ultralyticsPython library and CLI for training and running YOLO vision models63k starsAGPL-3.093 out of 100
#4pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts37.3k starsApache-2.093 out of 100
#5supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.4k starsMIT91 out of 100