fla-core
Core operations for flash-linear-attention
What it is and what it does
Flash Linear Attention is a library of optimized building blocks for modern sequence models that move beyond standard quadratic-complexity attention. It bundles hardware-efficient kernels, training-ready layers, and complete model implementations spanning linear attention mechanisms, sparse attention patterns, state space models, and hybrid architectures that mix different attention types. The library targets practitioners building or experimenting with alternatives to Transformers—researchers exploring state-of-the-art sequence modeling papers, engineers deploying models on resource-constrained hardware, and teams training large language models where memory and compute efficiency matter.
The package is organized around fused operations and platform-agnostic implementations verified on NVIDIA, AMD, and Intel hardware. It depends only on einops for tensor manipulation and requires Python 3.10 or later. The description and news section indicate active development with frequent additions of new model variants and backends throughout 2025 and 2026, suggesting this is a living research-to-production bridge rather than a static library.
Use it for:
- Replace standard Transformer attention with linear or sparse alternatives to reduce memory and compute during training or inference of large language models.
- Experiment with state space models as sequence modeling primitives without implementing custom CUDA kernels.
- Train hybrid models that combine multiple attention mechanisms in a single architecture.
- Deploy sequence models on AMD or Intel accelerators where NVIDIA-only libraries are unavailable or suboptimal.
- Benchmark and compare different subquadratic attention schemes on the same hardware and codebase.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides hardware-efficient implementations of linear attention, sparse attention, state space models, and hybrid sequence model architectures, verified across NVIDIA, AMD, and Intel platforms.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT License, and fills a genuine need for practitioners exploring or deploying efficient sequence models. No known security vulnerabilities. Install if you are building or researching linear attention, state space models, or hybrid architectures; skip if you only need standard Transformer attention.
Install
fla-core on PyPI
pip
pip install fla-coreuv
uv add fla-corepoetry
poetry add fla-coreInstalling fla-core
Before you install
Low install friction with a single pure-Python dependency (einops). Active maintenance with recent commits and steady releases; repository shows 5560 stars and receives regular updates.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install fla-core
import fla
# Use a model implementation or kernel from fla.layers or fla.ops
Requires Python 3.10 or later; hardware acceleration benefits depend on NVIDIA, AMD, or Intel accelerator availability.
Verify before relying
- Whether all advertised model implementations (RetNet, Mamba, GLA, DeltaNet, etc.) are production-ready or research prototypes
- Performance benchmarks and actual speedup claims compared to standard attention implementations
- Compatibility with specific PyTorch or CUDA versions beyond the Python 3.10+ requirement
Package facts
| License | MIT License Copyright (c) 2023-2026 Songlin Yang, Yu Zhang, Zhiyuan Li Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — einops |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 696,013/month — #5,306 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fla_core-0.5.2-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
bytesparseProvides a bytearray-like class that stores…
permissive · top 15,000 on PyPI
sageattentionSageAttention provides quantized attention…
permissive · top 15,000 on PyPI
xformersXFormers provides reusable, composable building…
permissive · top 5,000 on PyPI
flashinfer-pythonFlashInfer provides optimized GPU kernels for…
permissive · top 5,000 on PyPI
nvidia-cudnn-frontendProvides Python and C++ APIs to NVIDIA's cuDNN…
permissive · top 5,000 on PyPI
local-attentionImplements local windowed attention for…
permissive · top 15,000 on PyPI
ring-flash-attnImplements ring attention with flash attention…
permissive · top 15,000 on PyPI
cpm-kernelsProvides CUDA kernels optimized for CPM,…
permissive · top 15,000 on PyPI
tokamaxTokamax provides custom accelerator kernels for…
permissive · top 15,000 on PyPI
flash-attnProvides optimized GPU implementations of…
permissive · top 15,000 on PyPI