Skip to content

Releases: fla-org/flash-linear-attention

v0.5.2

Choose a tag to compare

@yzhangcs yzhangcs released this 27 Jul 18:25
9c8e42e

What's Changed

  • [NSA] Support cached inference by @mutiann in #574
  • [Docs] Add sparse-attention design-space note (NSA/MoBA/DSA/MSA) by @yzhangcs in #956
  • [NSA] Skip empty query tiles in selective backward (bwd_dkv) by @yzhangcs in #957
  • [Agents] Add correctness-gated kernel optimization loop workflow by @yzhangcs in #959
  • [Docs] Restructure CONTRIBUTING; add benchmarking, testing, and style conventions by @yzhangcs in #960
  • [GDN] Restrict Blackwell fwd h kernel to 2 warps by @zhiyuan1i in #953
  • [NSA] Speed up parallel backward: gather+batch bwd_dkv by @yzhangcs in #961
  • [NSA] Use int64 addressing to avoid int32 overflow at large T by @yzhangcs in #964
  • [Attn] Prevent int32 overflow for long sequences; tune NSA large-GQA autotune by @yzhangcs in #965
  • [Ops] Tile prepare_block_csr counting-sort over query blocks by @yzhangcs in #966
  • [CI] Add ascend-a2-ci workflow for Atlas A2 NPU module tests by @zheliuyu in #944
  • [CI] Drop auto-installed NVCC/PyTorch on H100 runners by @yzhangcs in #969
  • [Agents] Tighten fla-optimization-loop guardrails from KDA-Pilot by @yzhangcs in #970
  • [Fix] Scale L2Wrap logits gradient by the upstream gradient by @Sunt-ing in #963
  • [Misc] Clean up feature_map type hints and add tests by @yzhangcs in #971
  • [Fix] Uninitialized rotary output on left-padded batched generation by @AvivBick in #967
  • [CI] Enable backend dispatch for model tests by @zhiyuan1i in #974
  • [Misc] Remove unused USE_CUDA_GRAPH by @zhiyuan1i in #954
  • [CI] bump GitHub Actions to latest versions by @zhiyuan1i in #976
  • [Perf] Fuse GatedDeltaNet q/k/v short convolutions in the dense no-cache path by @Costa-SM in #972
  • [Ops] Add naive PyTorch reference for DeepSeek Sparse Attention (DSA) by @yzhangcs in #978
  • [Ops] Propagate chunk_size through non-attention chunk kernels and add coverage by @zhiyuan1i in #935
  • [Ops] Expand triton-ascend backends(fla/modules, fla/ops/utils) and upgrade CANN to 9.0.0 by @zheliuyu in #973
  • [Fix] remove redundant decorators, add PowGlu kernel and pin the version of torch_npu to 2.7.1.post4 for npu. by @sunyi0505 in #982
  • [Fix] Restrict delta_rule prepare_wy_repr_bwd to num_warps=2 on Hopper by @zhiyuan1i in #988
  • [CI] Parallelize Ascend A2 CI tests with pytest-xdist across 8 NPUs by @zheliuyu in #987
  • [Fix] Prune oversized autotune configs in GLA chunk backward by @zhiyuan1i in #989
  • [TileLang] Support GVA in chunk_bwd_dqkwg by @zhiyuan1i in #975
  • [CI] Run op tests one file per process to avoid runner OOM by @zhiyuan1i in #991
  • [Fix] Make T a runtime arg in path_attn cumprod_householder_bwd by @zhiyuan1i in #994
  • [Fix] Probe TileLang availability via find_spec to avoid per-dispatch import cost by @ShareLer in #993
  • [Conv] Chunk Ascend causal_conv1d launches for 65535 grid limit by @zheliuyu in #992
  • [Perf] Optimize Ascend NPU activation kernels by @sunyi0505 in #995
  • [Perf] Cache find_spec lookups in backend dispatch by @zhiyuan1i in #996
  • [Conv] Harden triton-ascend causal_conv1d silu/add against Ascend launch limits by @zheliuyu in #997
  • [GDN] Restrict Blackwell gated delta bwd autotune by @HQuanShaWu in #1000
  • [Fix] fix benchamrk issues and add ub management for npu by @sunyi0505 in #1001
  • [Ops] Add triton-ascend backend for l2norm and fused_norm_gate kernels by @zheliuyu in #1002
  • [Fix] [Test] Remove unused GeLU/SquaredReLU NPU kernels and add Ascend UB Manager tests by @sunyi0505 in #1006
  • [GDN] Add FlashQLA backend dispatch by @Erix025 in #998
  • [Fix] avoid SymInt stride reads in activations under torch.compile by @zhiyuan1i in #1008
  • [Fix] Expose DPLR args including cp_context/disable_recompute in chunk_rwkv7 wrapper by @sablin39 in #1004
  • [Ops] Add Gluon backend for AttnRes by @yzhangcs in #1010
  • [Fix] Correct Mamba-3 decay (A==+A_floor) by @netanel-haber in #1012
  • [Fix] Add get_max_length to FLA cache for transformers 5.x by @zhiyuan1i in #1009
  • [Test] Skip flash-attn-dependent tests when flash-attn is not installed by @zhiyuan1i in #1014
  • [Perf] Optimize triton-ascend L2Norm with row tiling on Ascend NPU by @sunyi0505 in #1036
  • [Fix] Store split attention decode outputs at the correct offset by @morluto in #1031
  • [Fix] Avoid concurrent LSE stores in value-split attention by @morluto in #1033
  • [Refactor] Centralize generation errors for unsupported cache strategies by @morluto in #1035
  • [Ops] Rewrite recompute_w_u_fwd kernel for Triton Ascend backend by @OsirisDuan in #1021
  • [Fix] Support value-split Wall backward with local deltas by @morluto in #1042
  • [Perf] Reuse Wall autotuning across length buckets by @morluto in #1041
  • [Perf] Add LayerNormGated benchmarks and BT-tile Ascend fused_norm_gate by @sunyi0505 in #1044
  • [Perf] Add opt-in TileLang RWKV6 intra kernel by @markovchain-builder in #1045
  • [Perf] Fuse ds in Ascend chunk_bwd_dqkwg to avoid recomputing do@v.T by @sunyi0505 in #1048
  • [Perf] Fuse Ascend chunk_fwd_o inter+intra into unified 1D core-grid kernel by @OsirisDuan in #1049
  • [Cleanup] Remove Ascend chunk_fwd_o kernels superseded by #1049 by @zhiyuan1i in #1050
  • [Ops] Add triton-ascend backend for KDA kernels by @zheliuyu in #1047
  • [CI] Add ascend-a2-benchmark-ci and fix ascend-a2-ci by @zheliuyu in #1052
  • [Attn] Support for heterogeneous hybrid-attention configurations by @Michael-RDev in #1051
  • [Perf] Optimize Ascend chunk_o backward with dynamic BC tiling and contiguous g loads by @sunyi0505 in #1056
  • [Perf] Optimize the performance of causal conv1D on Ascend NPU by @ChengQianqian in #1024
  • [Ops] Add triton-ascend backend for attn_res kernel by @zheliuyu in #1057
  • [Ops] Migrate kernels off tl.make_block_ptr / tl.advance for triton main compat by @zhiyuan1i in #1062
  • [Docs] Strengthen comment discipline and agent operational guidance by @zhiyuan1i in #1058
  • [Perf] Optimize Ascend chunk_delta_h bwd_dhu with dynamic BK/BV tiling and host gate precomp by @sunyi0505 in #1060
  • [CI] Forbid tl.make_block_ptr/advance in lint and skip H100 CI for NPU-only PRs by @zhiyuan1i in #1063
  • [Perf] Optimize Ascend prepare_wy_repr_bwd with fused KV kernel, core-grid launch, and varlen tests by @sunyi0505 in #1065

New Contributors

Read more

v0.5.1

Choose a tag to compare

@yzhangcs yzhangcs released this 18 Jun 18:16
2e38c1f

What's Changed

  • [Typo] Fix typos in kernel comments [skip test] by @yurekami in #856
  • [KDA] Support use_beta_sigmoid_in_kernel by @zhiyuan1i in #858
  • [CI] Disable backend when testing models and bump tilelang by @zhiyuan1i in #861
  • [Fix] GatedDeltaNet step mode crash when conv cache is None on cold Triton autotuner cache by @CiprianFlorin-Ifrim in #860
  • [Cache] FLA autotune cache by @sBobHuang in #798
  • Add Mamba3 by @Phoenix8215 in #855
  • [README] Add Mamba-3 news entry and models table item by @yzhangcs in #865
  • [Common] Support transpose_state_layout in fused_recurrent (GLA / SimpleGLA / RetNet) by @yzhangcs in #864
  • [Docs] Reorganize ENVs.md into themed sections by @yzhangcs in #866
  • [Conv] Fix causal_conv1d backward producing wrong gradients for non-contiguous dy by @4332001876 in #871
  • [Typo] Restore comment-typo fixes regressed by #816 [skip test] by @yurekami in #873
  • [Fix] Improve fused loss gradient accumulation by @yzhangcs in #874
  • [Fix] Fix dk in normalized linear attention by @ayghri in #875
  • [Common] Switch chunk paths to exp2 by @yzhangcs in #867
  • [GDN] Fix WY backward when gating is disabled by @yzhangcs in #863
  • [KDA] Fix chunk size 32 path by @yzhangcs in #876
  • [Docs] Refresh README overview by @yzhangcs in #877
  • [Ops] Add AttnRes operator by @yzhangcs in #878
  • [Ops] Export fused AttnRes from ops [skip test] by @yzhangcs in #879
  • [Models] Apply AttnRes to model definitions by @yzhangcs in #880
  • [Ops] Fuse output RMSNorm into attnres kernels by @yzhangcs in #883
  • [Bench] Add torch.profiler pass and run-context header to throughput bench by @yzhangcs in #886
  • [Lint] Fix benchmark_training_throughput.py [skip test] by @yzhangcs in #887
  • [Ops] Switch attnres to list-input + pointer-table API by @yzhangcs in #884
  • [Fix] Add functools.cache for op dispatch to reduce CPU overhead by @KevinZeng08 in #881
  • [Model] Add YOCO model implementation by @Shomvel in #857
  • [Fix] Enable torch.compile on Python 3.10 by @yzhangcs in #894
  • [Docs] Document Ruff ignore rationale by @yzhangcs in #896
  • [Fix] Define FLA package import contract by @yzhangcs in #897
  • [Ops] Allocate attnres fwd output in residual dtype to reduce IO by @yzhangcs in #898
  • [Fix] Tolerate configs without head_dim in throughput bench by @yzhangcs in #899
  • [Enhance] Extend tensor_cache to a bounded queue by @HAOCHENYE in #895
  • Add Raven model integration by @AvivBick in #900
  • [Raven] Remove dead params and fix o_norm affine consistency by @yzhangcs in #901
  • [Raven] Fix negative RoPE offset on left-padded prefill by @yzhangcs in #902
  • [Ops] Skip None args in autotune restore_value to avoid clone crash by @kasper0406 in #893
  • [Ops] Rename transpose_state_layout to state_v_first and extend it to GLA / SimpleGLA chunk by @yzhangcs in #905
  • [Fix] Fix packed varlen launch by @sablin39 in #904
  • [Fix] Correct RWKV7 gate output chunk mask by @sablin39 in #907
  • [Ops] Replace attnres int64 ptr table with padded tensor tuple by @wyc-ruiker in #912
  • [Ops] Tidy attnres fused kernels: drop DTYPE, rename BL to L2 by @yzhangcs in #914
  • [Perf] Read each attnres residual once in fwd and bwd by @yzhangcs in #916
  • [Bench] Fix throughput-bench crash on configs without num_heads by @yzhangcs in #917
  • [Fix] Large-offset Pointer Arithmetic in Blackwell GPUs by @Costa-SM in #911
  • [GDN] Support use_beta_sigmoid_in_kernel & allow_neg_eigval by @yzhangcs in #919
  • [Activation] Add SigmoidGLU and fix GeLUFunction backward by @yzhangcs in #921
  • [Docs] Expand contributor guidelines by @yzhangcs in #923
  • [Docs] Add AGENTS.md guide for AI coding agents by @yzhangcs in #922
  • [Test] Add zero-gate regime to chunk_gated_delta_rule tests by @yzhangcs in #924
  • [Git] Ignore Python virtual environment directories by @yzhangcs in #925
  • Make varlen index helpers torch.compile-friendly by @kasper0406 in #909
  • [Test] Reorganize ops/utils tests to mirror source layout by @yzhangcs in #926
  • [Ops] Feat: Add triton-ascend backend support for FLA module kernels by @zheliuyu in #927
  • [GDN2] Add Gated DeltaNet 2 (GDN-2) ops, layer, and tests by @shahvishal8465 in #920
  • [CI] Update H100 PyTorch test matrix by @zhiyuan1i in #929
  • [CI] Add agent workflow guardrails and PR title validation by @zhiyuan1i in #930
  • [Attn] Add Wall attention (per-channel multiplicative-decay) op, layer, and model by @tea-more in #928
  • [Refactor] Rename gated_delta_net_v2 (GDN-2) to gdn2 and align the layer with fla conventions by @yzhangcs in #931
  • [Attn] Wall: add AttnRes support and align layer/model with fla conventions by @yzhangcs in #932
  • [Refactor] Split fla.utils into maintainable package by @zhiyuan1i in #933
  • [CI] Gate H100 Triton baseline by environment by @zhiyuan1i in #936
  • [Fix] Detect consumer Blackwell (SM120) as Blackwell by @kasper0406 in #940
  • [Refactor] Decouple torch/triton backend from base deps by @kashif in #937
  • [Layer] Add PowGLU (Power-Gated Linear Unit) activation by @yzhangcs in #951
  • [Attn] Add Parallax (parameterized local linear attention) op, layer and model by @Yifei-Zuo in #939
  • [Fix] parallel_attn: keep NV==1 in backward so dq/dk reduce over full V by @kasper0406 in #941
  • [Fix] FLA cache window updates and reset behavior by @Michael-RDev in #910

New Contributors

Read more

v0.5.0

Choose a tag to compare

@yzhangcs yzhangcs released this 21 Apr 20:25
3a9ce1c

✨ Highlights

The main new model this release is MoBA / FlashMoBA (#840, #845), which brings Moonshot's Mixture of Block Attention into the fla family.

Beyond new models, fla is also moving from a Triton-only stack to a multi-backend one: FlashKDA is added as a new backend for KDA (#852), and TileLang is introduced for GDN, KDA, and parallel attention kernels (#827, #846, #854), with more backends to come.

What's Changed

  • [CP] Fix missing bos and i_h offsets in backward gk loads by @zhiyuan1i in #781
  • [KDA] Clarify gate input tracking in chunk backward by @zhiyuan1i in #785
  • [GDN] Fuse kkt + solve_tril kernel & unified benchmark infrastructure by @yzhangcs in #789
  • [Conv] Fix int32 overflow in conv kernel pointer arithmetic for large tensors by @tmct in #783
  • [GDN] Add exp2 support across chunk kernels for improved performance by @yzhangcs in #791
  • Fix parameter initialization for FSDP meta device compatibility by @yzhangcs in #793
  • [GDN] Fix missing mask on off-diagonal blocks in fused kkt+s… by @yzhangcs in #794
  • Fix layer_norm_bwd_kernel OOB access on high-SM GPUs by @mpurland in #795
  • [Misc] Upgrade minimum PyTorch requirement to 2.7.0 by @zhiyuan1i in #801
  • [Conv] Fix int32 overflow in varlen conv kernel pointer arithmetic by @tmct in #803
  • [GDN] Add GVA support by @zhiyuan1i in #799
  • [BugFix] Fix illegal memory access in KDA backward by dropping buggy autotune configs on Hopper by @zhiyuan1i in #807
  • [CE] Add logit softcapping support to fused cross entropy by @yzhangcs in #810
  • [Mamba] Remove unused arguments and update to align with mamba_ssm by @PuR3Luck in #782
  • [GDN] Native GVA support: remove redundant Q/K repeat and unify head naming by @yzhangcs in #812
  • [KDA] Add safe_gate/lower_bound support and improve docstrings by @yzhangcs in #814
  • [GDN] Add fused gate kernel with use_gate_in_kernel support by @yzhangcs in #813
  • chore: add AUTHORS, unify copyright headers, and add CI workflows by @yzhangcs in #816
  • [CI] Improve benchmark outputs by @yzhangcs in #817
  • [CI] Fix skip-test check failing on fork PRs by @zhiyuan1i in #821
  • [CP] Enable KCP for DPLR by @zhiyuan1i in #822
  • [Fix] Guard checkpoint weight re-initialization in RWKV-7, Mamba, Mamba2, and LogLinearMamba2 by @puigde in #820
  • fix: register default global_scratch allocator on Blackwell GPUs by @ssubbotin in #825
  • [Attn] Add sliding window attention support by @yzhangcs in #824
  • [Docs] Add CONTRIBUTING.md by @yzhangcs in #830
  • allow neg eigvals for delta-net by @hoedt in #832
  • chore: add standalone isort config by @yzhangcs in #834
  • Add autotune for causal conv update by @MARD1NO in #828
  • [GDN] Add TileLang backend for chunk_bwd_dqkwg kernel by @zhiyuan1i in #827
  • [Refactor] Simplify TileLang backend directory structure by @yzhangcs in #835
  • [CI] Post benchmark comment via workflow_run for fork-safe PRs by @yzhangcs in #841
  • [KDA] Add Grouped Value Attention (GVA) support by @yzhangcs in #833
  • [Attn] Add GPT-OSS-style attention sink support by @Shomvel in #831
  • [Fix] respect user-provided cu_seqlens when attention_mask is present by @yzhangcs in #842
  • [Fix] flatten batched qkv in varlen cu_seqlens path by @lxr-tech in #839
  • [Fix] Enforce batch-size check for varlen mode across multiple ops by @zhiyuan1i in #844
  • [MoBA] Integrate MOBA and FlashMOBA by @ReyJerry in #840
  • [MoBA] Follow-up: fix broken import, rename layer, add modeling, tests & docs by @yzhangcs in #845
  • [GDN/KDA] Fuse gate activation into fused_recurrent kernels by @yzhangcs in #848
  • [TileLang] Add fwd/bwd kernel for parallel attention by @zhiyuan1i in #846
  • [CI] Add issue/PR pytest command workflow by @zhiyuan1i in #843
  • [GDN] Optimize b_dg computation in chunk_bwd_kernel_dqkwg#USE_G by @MzeroMiko in #823
  • [GDN][Tilelang] Optimize b_dg computation in chunk_bwd_kernel_dqkwg by @zhiyuan1i in #849
  • [Linear Attention] Update fused_recurrent.py for inference with normalization by @yiyousong in #268
  • [Fix] Fix incorrect cumsum dim for naive_chunk_linear_attn normalize by @zhiyuan1i in #851
  • [Cleanup] Remove deprecated head_first parameter from public ops by @yzhangcs in #853
  • [KDA] Support FLASHKDA backend by @zhiyuan1i in #852
  • [KDA][TileLang] Add TileLang backend for chunk_kda_bwd_wy_dqkg_fused by @zhiyuan1i in #854

New Contributors

Full Changelog: v0.4.2...v0.5.0

v0.4.2

Choose a tag to compare

@yzhangcs yzhangcs released this 12 Mar 14:45
ca910f8

What's Changed

  • [Misc] Use autopep8 to keep style by @zhiyuan1i in #697
  • [Misc] Reduce D2H/H2D Sync by @zhiyuan1i in #698
  • [Conv]: Support mix mode(Triton fwd and CUDA bwd) by @zhiyuan1i in #699
  • [Test] Add memory guard fixtures for CUDA memory safety testing by @zhiyuan1i in #700
  • [KDA] Add lowerbound gate function by @zhiyuan1i in #701
  • [KDA] Remove deprecated head_first in kda gate func by @zhiyuan1i in #702
  • [KDA] Speed up chunk_kda by introducing lowerbound gate by @zhiyuan1i in #703
  • [NSA] fix varlen related logic in cmp dkv kernel by @yibozhong in #707
  • [DPLR] Speed up DPLR by lowerbound gate by @zhiyuan1i in #709
  • [Misc] Enhance non-cuda platform ci by @zhiyuan1i in #708
  • [Conv] Add non-contiguous tensor support for convolution ops by @zhiyuan1i in #712
  • [Conv] Fix corner case by @zhiyuan1i in #714
  • [Conv] Refactor dh0 into separate Triton kernel and add gradient tests by @zhiyuan1i in #717
  • [Misc] Wrap exp/log math ops with @triton.jit and enforce float32 pre… by @zhiyuan1i in #720
  • [Conv] Refractor to packages by @zhiyuan1i in #722
  • [Conv] Clean duplicate calculate chunk_indices by @zhiyuan1i in #724
  • [DPLR] Add disable_recompute support for DPLR chunk op by @zhiyuan1i in #726
  • [CP] fuse fwd/bwd kernels and fix IMA in long context by @zhiyuan1i in #733
  • [KCP] add KCP.md; fix fp32 precision in M matrix chain; cleanup CP tests by @zhiyuan1i in #740
  • [Backend] Introduce dispatch system by @zhiyuan1i in #741
  • [Backend] Select from available backends based on priority order by @zhiyuan1i in #742
  • [MAMBA2] fix initialization for mamba2 by @mayank31398 in #739
  • [KDA] Refractor interface by @zhiyuan1i in #744
  • [Deltarule] Added intra-card context parallel optimization for KDA and GDN by @zhiyuan1i in #743
  • [Misc] centralize reference implementations in naive.py by @zhiyuan1i in #746
  • [Cache] Fix get_seq_length to return per-layer length by @zhiyuan1i in #748
  • fewer l2norm recompilations by @tyler-romero in #745
  • [OJA] Integrate Gated OJA Rule by @AwesomeSeq in #730
  • [Misc] remove redundant dot precision param in KDA recompute_w_u by @KevinZeng08 in #750
  • Fix shared memory guards for AMD RDNA GPUs (64KB shared mem) by @Gildoniel in #751
  • [Fix] Guard A_log and dt_bias re-initialization against loaded checkpoint values in GatedDeltaNet, Comba, and KDA by @ljxw88 in #754
  • [MAMBA-2] fix mamba-2 init for FSDP-2 with DTensors by @mayank31398 in #753
  • [Deltrarule] Add cache for intra cp by @zhiyuan1i in #755
  • Update Windows warning to detect triton-windows by @erm14254 in #757
  • [Misc] Reduce recompile by @zhiyuan1i in #764
  • [PaTH] Prevent int32 index overflow for long sequences by @zhixuan-lin in #769
  • [Test] Add regression tests for cache seen-token bug (GH-766) by @zhiyuan1i in #768
  • [Misc] removes all @torch.jit.script decorators from the codebase by @zhiyuan1i in #767
  • [Conv] Fix invalid memory access by @zhiyuan1i in #774
  • [KDA][GDN] Support transpose_state_layout for [V,K] state memory layout by @zhiyuan1i in #776
  • [GDN] Enhance Triton 3.2 compatibility by @winglet0996 in #773
  • [Model] Unify cache function by @zhiyuan1i in #777

New Contributors

Full Changelog: v0.4.1...v0.4.2

🎄 v0.4.1

Choose a tag to compare

@yzhangcs yzhangcs released this 24 Dec 18:07
3a904f0

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@yzhangcs yzhangcs released this 27 Oct 08:18

🧠 New Models

What's Changed

New Contributors

Full Changelog: v0.3.2...v0.4.0

v0.3.2

Choose a tag to compare

@yzhangcs yzhangcs released this 10 Sep 07:43
f7d95fa

📣 Highlights

Starting with this release, every time we ship a new version of flash-linear-attention, we will simultaneously publish fla-core: a minimal-dependency subset of the main repo that contains only the essentials.

🧠 New Models

What's Changed

Full Changelog: v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@yzhangcs yzhangcs released this 26 Aug 20:28
80acaeb

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@yzhangcs yzhangcs released this 14 Jul 09:49
17dd566

Highlights

🧠 New Models

We are excited to expand our model library with the addition of four powerful new architectures.

What's Changed

New Contributors

Full Changelog: v0.2.2...v0.3.0

v0.2.2

Choose a tag to compare

@yzhangcs yzhangcs released this 05 Jun 16:50

What's Changed

New Contributors

Full Changelog: v0.2.1...v0.2.2