AIAny
AI Infra2023
Icon for item

Flash Linear Attention

Triton kernels and PyTorch layers for linear-attention, state-space, and sparse-attention token mixers (GLA, RWKV, Mamba2, GSA) as drop-in replacements for multihead attention. Runs on NVIDIA, AMD, and Intel GPUs with Hugging Face support.

Introduction

Most clever efficient-attention ideas die in a research notebook: a neat recurrence that nobody can plug into a real training run. What actually made linear attention usable wasn't new math — it was a chunkwise-parallel, Triton-level implementation fast enough to compete with FlashAttention on wall-clock time. That implementation lives here, and it has quietly become the reference codebase the whole sub-field builds on.

What Sets It Apart
  • One home for a fragmenting field. GLA, RWKV-6/7, Mamba2, GSA, DeltaNet, HGRN2 and more share a single set of fused kernels and nn.Module token mixers, so switching architectures is a config change rather than a rewrite of custom CUDA.
  • The hard kernel is already written. The chunkwise-parallel form — the trick that lets these models train as fast as they infer — is implemented and tuned across NVIDIA, AMD and Intel hardware, not left as an exercise.
  • Hugging Face-native. Models expose standard generate() APIs alongside fused ops (rotary embeddings, RMSNorm, fused cross-entropy), so a linear-attention model slots into an existing training and eval stack instead of forcing a parallel one.
Great Fit / Look Elsewhere

Great fit if you research sub-quadratic sequence models, want to benchmark a new linear / SSM / sparse variant against strong baselines, or need to scale a non-Transformer LLM without hand-writing kernels. Look elsewhere if you want a turnkey chatbot or a frozen, stable API — this is a fast-moving research library where module signatures and kernels shift between releases, and correctness on less common hardware still warrants your own verification.

Information

  • Websitegithub.com
  • OrganizationsMIT CSAIL, Soochow University
  • Authorsfla-org, Songlin Yang, Yu Zhang
  • Published date2023/12/20

Categories

More Items

GitHub
AI Infra2026

Indexes mixed-format folders locally into a zero-config, Elasticsearch-compatible search engine offering keyword, semantic, vector and hybrid retrieval. Embeds on ingest, provides per-agent namespaced memory and AST-aware code indexing in a single static binary with no external embedding key.

GitHub

Turns natural-language instructions into end-to-end Android automation that drives real devices and captures Logcat and screenshots. Uses a multimodal “Dynamic‑First, Coordinate‑Fallback” locator and a native MCP server for IDE integration, supporting fast Flash (3–5s/step) and verifiable Pro workflows.

Converts real repositories into verifiable, sandboxed training environments with black-box tests to train coding agents on long-horizon program reproduction. Provides Program-Env for automated environment construction and Program-Agent for a role-isolated development workflow, yielding 1,648 C/C++/Go/Rust tasks and improving benchmark performance.