fla-core 0.4.0__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. {fla_core-0.4.0/fla_core.egg-info → fla_core-0.4.2}/PKG-INFO +23 -5
  2. fla_core-0.4.0/PKG-INFO → fla_core-0.4.2/README.md +21 -16
  3. {fla_core-0.4.0 → fla_core-0.4.2}/fla/__init__.py +1 -1
  4. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/__init__.py +2 -3
  5. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/activations.py +267 -80
  6. fla_core-0.4.2/fla/modules/conv/__init__.py +14 -0
  7. fla_core-0.4.2/fla/modules/conv/causal_conv1d.py +124 -0
  8. fla_core-0.4.2/fla/modules/conv/cp/__init__.py +6 -0
  9. fla_core-0.4.2/fla/modules/conv/cp/ops.py +251 -0
  10. fla_core-0.4.2/fla/modules/conv/cuda/__init__.py +9 -0
  11. fla_core-0.4.2/fla/modules/conv/cuda/ops.py +228 -0
  12. fla_core-0.4.2/fla/modules/conv/long_conv.py +165 -0
  13. fla_core-0.4.2/fla/modules/conv/short_conv.py +241 -0
  14. fla_core-0.4.2/fla/modules/conv/triton/__init__.py +19 -0
  15. fla_core-0.4.2/fla/modules/conv/triton/kernels.py +657 -0
  16. fla_core-0.4.2/fla/modules/conv/triton/ops.py +397 -0
  17. fla_core-0.4.2/fla/modules/convolution.py +38 -0
  18. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/feature_map.py +14 -16
  19. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/fused_bitlinear.py +18 -19
  20. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/fused_cross_entropy.py +6 -7
  21. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/fused_kl_div.py +16 -18
  22. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/fused_linear_cross_entropy.py +14 -15
  23. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/fused_norm_gate.py +130 -156
  24. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/grpo.py +10 -9
  25. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/l2norm.py +39 -46
  26. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/l2warp.py +0 -1
  27. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/layernorm.py +80 -63
  28. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/layernorm_gated.py +9 -10
  29. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/mlp.py +9 -10
  30. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/parallel.py +4 -6
  31. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/rotary.py +33 -23
  32. {fla_core-0.4.0 → fla_core-0.4.2}/fla/modules/token_shift.py +37 -32
  33. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/__init__.py +1 -2
  34. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/abc/__init__.py +1 -2
  35. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/abc/chunk.py +39 -41
  36. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/abc/naive.py +5 -7
  37. fla_core-0.4.2/fla/ops/attn/__init__.py +8 -0
  38. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/attn/decoding.py +8 -10
  39. fla_core-0.4.2/fla/ops/attn/naive.py +64 -0
  40. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/attn/parallel.py +25 -21
  41. fla_core-0.4.2/fla/ops/backends/__init__.py +168 -0
  42. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/based/__init__.py +1 -2
  43. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/based/fused_chunk.py +3 -5
  44. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/based/naive.py +2 -4
  45. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/based/parallel.py +6 -8
  46. fla_core-0.4.2/fla/ops/comba/__init__.py +10 -0
  47. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/comba/chunk.py +40 -18
  48. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/comba/fused_recurrent.py +11 -13
  49. fla_core-0.4.2/fla/ops/comba/naive.py +166 -0
  50. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/comba/utils.py +15 -12
  51. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/comba/wy_fast.py +25 -21
  52. fla_core-0.4.2/fla/ops/common/__init__.py +0 -0
  53. fla_core-0.4.2/fla/ops/common/backends/__init__.py +12 -0
  54. fla_core-0.4.2/fla/ops/common/backends/intracard.py +93 -0
  55. fla_core-0.4.2/fla/ops/common/chunk_delta_h.py +775 -0
  56. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/chunk_h.py +21 -23
  57. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/chunk_h_parallel.py +28 -26
  58. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/chunk_h_split.py +18 -20
  59. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/chunk_o.py +74 -49
  60. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/chunk_scaled_dot_kkt.py +8 -8
  61. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/fused_chunk.py +23 -26
  62. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/common/fused_recurrent.py +36 -38
  63. fla_core-0.4.2/fla/ops/common/intracard_cp.py +597 -0
  64. fla_core-0.4.2/fla/ops/cp/__init__.py +25 -0
  65. fla_core-0.4.2/fla/ops/cp/chunk_delta_h.py +1314 -0
  66. fla_core-0.4.2/fla/ops/cp/comm.py +162 -0
  67. fla_core-0.4.2/fla/ops/cp/context.py +165 -0
  68. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/__init__.py +1 -2
  69. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/chunk.py +39 -23
  70. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/fused_chunk.py +1 -2
  71. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/fused_recurrent.py +12 -14
  72. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/naive.py +0 -1
  73. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/parallel.py +14 -16
  74. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/delta_rule/wy_fast.py +25 -20
  75. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/deltaformer/__init__.py +0 -1
  76. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/deltaformer/invcum.py +3 -4
  77. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/deltaformer/naive.py +2 -4
  78. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/deltaformer/parallel.py +22 -24
  79. fla_core-0.4.2/fla/ops/forgetting_attn/__init__.py +8 -0
  80. fla_core-0.4.2/fla/ops/forgetting_attn/naive.py +43 -0
  81. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/forgetting_attn/parallel.py +5 -7
  82. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/__init__.py +1 -1
  83. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/chunk.py +41 -16
  84. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/chunk_deltaproduct_h.py +21 -20
  85. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/chunk_deltaproduct_o.py +10 -11
  86. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/chunk_ref.py +1 -3
  87. fla_core-0.4.2/fla/ops/gated_delta_rule/__init__.py +10 -0
  88. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_rule/chunk.py +115 -20
  89. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_rule/fused_recurrent.py +69 -40
  90. fla_core-0.4.2/fla/ops/gated_delta_rule/naive.py +156 -0
  91. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_rule/wy_fast.py +56 -26
  92. fla_core-0.4.2/fla/ops/gated_oja_rule/__init__.py +7 -0
  93. fla_core-0.4.2/fla/ops/gated_oja_rule/chunk.py +338 -0
  94. fla_core-0.4.2/fla/ops/gated_oja_rule/chunk_h.py +807 -0
  95. fla_core-0.4.0/fla/ops/kda/chunk_intra.py → fla_core-0.4.2/fla/ops/gated_oja_rule/chunk_kkt.py +178 -197
  96. fla_core-0.4.2/fla/ops/gated_oja_rule/chunk_o.py +674 -0
  97. fla_core-0.4.2/fla/ops/gated_oja_rule/fused_recurrent.py +263 -0
  98. fla_core-0.4.2/fla/ops/gated_oja_rule/wy_fast.py +290 -0
  99. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/__init__.py +1 -1
  100. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/__init__.py +1 -1
  101. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk.py +145 -70
  102. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk_A_bwd.py +188 -15
  103. fla_core-0.4.2/fla/ops/generalized_delta_rule/dplr/chunk_A_fwd.py +368 -0
  104. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk_h_bwd.py +11 -12
  105. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk_h_fwd.py +11 -12
  106. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk_o_bwd.py +24 -21
  107. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/chunk_o_fwd.py +9 -10
  108. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/fused_recurrent.py +17 -20
  109. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/naive.py +0 -1
  110. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/wy_fast_bwd.py +10 -11
  111. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/dplr/wy_fast_fwd.py +25 -23
  112. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/iplr/__init__.py +1 -1
  113. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/iplr/chunk.py +46 -32
  114. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/iplr/fused_recurrent.py +13 -15
  115. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/iplr/naive.py +0 -1
  116. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/generalized_delta_rule/iplr/wy_fast.py +22 -21
  117. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gla/__init__.py +1 -2
  118. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gla/chunk.py +153 -99
  119. fla_core-0.4.2/fla/ops/gla/fused_chunk.py +5 -0
  120. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gla/fused_recurrent.py +8 -10
  121. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gla/naive.py +2 -4
  122. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gsa/__init__.py +1 -2
  123. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gsa/chunk.py +99 -79
  124. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gsa/fused_recurrent.py +28 -30
  125. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gsa/naive.py +4 -6
  126. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/hgrn/__init__.py +1 -2
  127. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/hgrn/chunk.py +12 -14
  128. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/hgrn/fused_recurrent.py +18 -20
  129. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/hgrn/naive.py +5 -7
  130. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/kda/__init__.py +1 -1
  131. fla_core-0.4.2/fla/ops/kda/chunk.py +338 -0
  132. fla_core-0.4.2/fla/ops/kda/chunk_bwd.py +583 -0
  133. fla_core-0.4.2/fla/ops/kda/chunk_fwd.py +132 -0
  134. fla_core-0.4.2/fla/ops/kda/chunk_intra.py +900 -0
  135. fla_core-0.4.2/fla/ops/kda/chunk_intra_token_parallel.py +169 -0
  136. fla_core-0.4.2/fla/ops/kda/fused_recurrent.py +434 -0
  137. fla_core-0.4.2/fla/ops/kda/gate.py +454 -0
  138. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/kda/naive.py +5 -7
  139. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/kda/wy_fast.py +49 -42
  140. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/lightning_attn/__init__.py +1 -2
  141. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/lightning_attn/chunk.py +8 -10
  142. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/lightning_attn/fused_recurrent.py +8 -10
  143. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/__init__.py +1 -2
  144. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/chunk.py +7 -9
  145. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/fused_chunk.py +5 -7
  146. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/fused_recurrent.py +4 -6
  147. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/naive.py +8 -10
  148. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/linear_attn/utils.py +0 -2
  149. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/log_linear_attn/__init__.py +0 -1
  150. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/log_linear_attn/chunk.py +61 -54
  151. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk.py +38 -27
  152. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_cg_solver_bwd.py +8 -8
  153. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_cg_solver_fwd.py +7 -7
  154. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_h_fwd.py +6 -8
  155. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_h_kk_intra_bwd.py +9 -9
  156. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_h_kv_intra_bwd.py +12 -10
  157. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/chunk_h_kv_intra_bwd_separate.py +12 -11
  158. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/decoding_one_step.py +3 -4
  159. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/naive.py +1 -2
  160. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/nsa/__init__.py +1 -2
  161. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/nsa/compression.py +31 -27
  162. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/nsa/naive.py +6 -8
  163. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/nsa/parallel.py +42 -43
  164. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/nsa/utils.py +0 -1
  165. fla_core-0.4.2/fla/ops/path_attn/__init__.py +8 -0
  166. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/cumprod_householder_bwd.py +5 -2
  167. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/cumprod_householder_fwd.py +6 -3
  168. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/intra_chunk_preprocess_bwd.py +7 -4
  169. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/intra_chunk_preprocess_bwd_prepare.py +11 -7
  170. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/intra_chunk_preprocess_fwd.py +9 -6
  171. fla_core-0.4.2/fla/ops/path_attn/naive.py +92 -0
  172. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/parallel.py +12 -14
  173. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/parallel_path_bwd_inter_dkv.py +14 -11
  174. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/parallel_path_bwd_inter_dqh.py +10 -7
  175. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/parallel_path_bwd_intra.py +7 -4
  176. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/parallel_path_fwd.py +7 -4
  177. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/prepare_k_cache.py +7 -5
  178. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/path_attn/transform_q.py +8 -6
  179. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rebased/__init__.py +1 -2
  180. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rebased/naive.py +1 -3
  181. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rebased/parallel.py +7 -8
  182. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/__init__.py +1 -2
  183. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/chunk.py +8 -10
  184. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/fused_chunk.py +7 -9
  185. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/fused_recurrent.py +4 -6
  186. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/naive.py +0 -1
  187. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/retention/parallel.py +7 -9
  188. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv4/__init__.py +1 -2
  189. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv4/fused_recurrent.py +1 -2
  190. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv6/__init__.py +1 -2
  191. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv6/chunk.py +96 -77
  192. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv6/chunk_naive.py +1 -2
  193. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv6/fused_recurrent.py +27 -29
  194. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv6/recurrent_naive.py +4 -7
  195. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/__init__.py +1 -2
  196. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/channel_mixing.py +15 -13
  197. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/chunk.py +20 -7
  198. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/fused_addcmul.py +9 -9
  199. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/fused_k_update.py +22 -21
  200. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/fused_recurrent.py +20 -22
  201. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/rwkv7/gate_output_correction.py +3 -4
  202. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/__init__.py +1 -2
  203. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/chunk.py +52 -39
  204. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/fused_chunk.py +7 -9
  205. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/fused_recurrent.py +7 -9
  206. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/naive.py +6 -8
  207. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/simple_gla/parallel.py +41 -32
  208. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/titans/__init__.py +1 -2
  209. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/titans/log_impl.py +4 -4
  210. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/titans/naive.py +6 -7
  211. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/ttt/__init__.py +1 -2
  212. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/ttt/chunk.py +89 -62
  213. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/ttt/fused_chunk.py +19 -21
  214. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/ttt/naive.py +1 -2
  215. fla_core-0.4.2/fla/ops/utils/__init__.py +56 -0
  216. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/constant.py +0 -1
  217. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/cumsum.py +48 -48
  218. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/index.py +36 -29
  219. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/logcumsumexp.py +4 -5
  220. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/logsumexp.py +6 -8
  221. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/matmul.py +6 -8
  222. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/op.py +18 -16
  223. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/pack.py +4 -6
  224. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/pooling.py +20 -18
  225. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/softmax.py +10 -13
  226. fla_core-0.4.2/fla/ops/utils/softplus.py +104 -0
  227. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/utils/solve_tril.py +35 -27
  228. {fla_core-0.4.0 → fla_core-0.4.2}/fla/utils.py +147 -57
  229. fla_core-0.4.0/README.md → fla_core-0.4.2/fla_core.egg-info/PKG-INFO +34 -3
  230. {fla_core-0.4.0 → fla_core-0.4.2}/fla_core.egg-info/SOURCES.txt +35 -1
  231. fla_core-0.4.2/fla_core.egg-info/requires.txt +2 -0
  232. {fla_core-0.4.0 → fla_core-0.4.2}/pyproject.toml +2 -2
  233. fla_core-0.4.0/fla/modules/convolution.py +0 -1168
  234. fla_core-0.4.0/fla/ops/attn/__init__.py +0 -7
  235. fla_core-0.4.0/fla/ops/comba/__init__.py +0 -7
  236. fla_core-0.4.0/fla/ops/common/__init__.py +0 -1
  237. fla_core-0.4.0/fla/ops/common/chunk_delta_h.py +0 -535
  238. fla_core-0.4.0/fla/ops/forgetting_attn/__init__.py +0 -7
  239. fla_core-0.4.0/fla/ops/gated_delta_rule/__init__.py +0 -7
  240. fla_core-0.4.0/fla/ops/generalized_delta_rule/dplr/chunk_A_fwd.py +0 -199
  241. fla_core-0.4.0/fla/ops/gla/fused_chunk.py +0 -642
  242. fla_core-0.4.0/fla/ops/kda/chunk.py +0 -351
  243. fla_core-0.4.0/fla/ops/kda/chunk_inter.py +0 -188
  244. fla_core-0.4.0/fla/ops/kda/fused_recurrent.py +0 -114
  245. fla_core-0.4.0/fla/ops/kda/gate.py +0 -349
  246. fla_core-0.4.0/fla/ops/path_attn/__init__.py +0 -7
  247. fla_core-0.4.0/fla/ops/utils/__init__.py +0 -58
  248. fla_core-0.4.0/fla_core.egg-info/requires.txt +0 -2
  249. {fla_core-0.4.0 → fla_core-0.4.2}/LICENSE +0 -0
  250. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/gated_delta_product/naive.py +0 -0
  251. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/log_linear_attn/naive.py +0 -0
  252. {fla_core-0.4.0 → fla_core-0.4.2}/fla/ops/mesa_net/__init__.py +0 -0
  253. {fla_core-0.4.0 → fla_core-0.4.2}/fla_core.egg-info/dependency_links.txt +0 -0
  254. {fla_core-0.4.0 → fla_core-0.4.2}/fla_core.egg-info/top_level.txt +0 -0
  255. {fla_core-0.4.0 → fla_core-0.4.2}/setup.cfg +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fla-core
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Core operations for flash-linear-attention
5
5
  Project-URL: Homepage, https://github.com/fla-org/flash-linear-attention
6
6
  Project-URL: Repository, https://github.com/fla-org/flash-linear-attention
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: torch>=2.5
10
+ Requires-Dist: torch
11
11
  Requires-Dist: einops
12
12
  Dynamic: license-file
13
13
 
@@ -42,7 +42,7 @@ This repo aims at providing a collection of efficient Triton-based implementatio
42
42
 
43
43
  ## News
44
44
 
45
- - **$\texttt{[2025-10]}$:** 🌑 Add Kimi Delta Attention implementation to `fla`.
45
+ - **$\texttt{[2025-10]}$:** 🌑 Add Kimi Delta Attention implementation to `fla` ([paper](https://arxiv.org/abs/2510.26692)).
46
46
  - **$\texttt{[2025-09]}$:** 🌲 Add DeltaFormer implementation to `fla` ([paper](https://arxiv.org/abs/2505.19488v1)).
47
47
  - **$\texttt{[2025-09]}$:** 🐻 Thrilled to announce that [GDN](fla/ops/gated_delta_rule) has been integrated into Qwen3-Next. Check out their [blog post](https://qwen.ai/blog?id=4074cca80393150c248e508aa62983f9cb7d27cd&from=research.latest-advancements-list) for more infos!
48
48
  - **$\texttt{[2025-08]}$:** 🌲 Add Log-Linear Attention implementation to `fla` ([paper](https://arxiv.org/abs/2506.04761)).
@@ -101,6 +101,7 @@ Roughly sorted according to the timeline supported in `fla`. The recommended tra
101
101
  | 2025 | | MoM | [MoM: Linear Sequence Modeling with Mixture-of-Memories](https://arxiv.org/abs/2502.13685) | [official](https://github.com/OpenSparseLLMs/MoM) | [fla](https://github.com/fla-org/flash-linear-attention/blob/main/fla/layers/mom.py) |
102
102
  | 2025 | | Log-Linear Attention | [Log-Linear Attention](https://arxiv.org/abs/2506.04761) | [official](https://github.com/HanGuo97/log-linear-attention) | [fla](https://github.com/fla-org/flash-linear-attention/tree/main/fla/ops/log_linear_attn) |
103
103
  | 2025 | | DeltaFormer | [Understanding Transformer from the Perspective of Associative Memory](https://arxiv.org/abs/2505.19488v1) | | [fla](https://github.com/fla-org/flash-linear-attention/blob/main/fla/layers/deltaformer.py) |
104
+ | 2025 | | KDA | [Kimi Linear: An Expressive, Efficient Attention Architecture](https://arxiv.org/abs/2510.26692) | | [fla](https://github.com/fla-org/flash-linear-attention/tree/main/fla/ops/kda) |
104
105
 
105
106
  ## Installation
106
107
 
@@ -141,6 +142,8 @@ pip uninstall fla-core flash-linear-attention -y && pip install -U --no-use-pep5
141
142
 
142
143
  ## Usage
143
144
 
145
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fla-org/flash-linear-attention)
146
+
144
147
  ### Token Mixing
145
148
 
146
149
  We provide ``token mixing'' linear attention layers in `fla.layers` for you to use.
@@ -532,9 +535,25 @@ If you find this repository helpful, please cite our work:
532
535
  year = {2024}
533
536
  }
534
537
 
538
+ @misc{zhang2025kda,
539
+ title = {Kimi Linear: An Expressive, Efficient Attention Architecture},
540
+ author = {Zhang, Yu and Lin, Zongyu and Yao, Xingcheng and Hu, Jiaxi and Meng, Fanqing and Liu, Chengyin and Men, Xin and Yang, Songlin and Li, Zhiyuan and Li, Wentao and Lu, Enzhe and Liu, Weizhou and Chen, Yanru and Xu, Weixin and Yu, Longhui and Wang, Yejie and Fan, Yu and Zhong, Longguang and Yuan, Enming and Zhang, Dehao and Zhang, Yizhi and T. Liu, Y. and Wang, Haiming and Fang, Shengjun and He, Weiran and Liu, Shaowei and Li, Yiwei and Su, Jianlin and Qiu, Jiezhong and Pang, Bo and Yan, Junjie and Jiang, Zhejun and Huang, Weixiao and Yin, Bohong and You, Jiacheng and Wei, Chu and Wang, Zhengtao and Hong, Chao and Chen, Yutian and Chen, Guanduo and Wang, Yucheng and Zheng, Huabin and Wang, Feng and Liu, Yibo and Dong, Mengnan and Zhang, Zheng and Pan, Siyuan and Wu, Wenhao and Wu, Yuhao and Guan, Longyu and Tao, Jiawen and Fu, Guohong and Xu, Xinran and Wang, Yuzhi and Lai, Guokun and Wu, Yuxin and Zhou, Xinyu and Yang, Zhilin and Du, Yulun},
541
+ year = {2025},
542
+ eprint = {2510.26692},
543
+ archivePrefix = {arXiv},
544
+ primaryClass = {cs.CL}
545
+ }
546
+
547
+ @inproceedings{yang2025path,
548
+ title = {PaTH Attention: Position Encoding via Accumulating Householder Transformations},
549
+ author = {Yang, Songlin and Shen, Yikang and Wen, Kaiyue and Tan, Shawn and Mishra, Mayank and Ren, Liliang and Panda, Rameswar and Kim, Yoon},
550
+ booktitle = {Proceedings of NeurIPS},
551
+ year = {2025}
552
+ }
553
+
535
554
  @inproceedings{yang2024gdn,
536
555
  title = {Gated Delta Networks: Improving Mamba2 with Delta Rule},
537
- author = {Songlin Yang and Jan Kautz and Ali Hatamizadeh},
556
+ author = {Yang, Songlin and Kautz, Jan and Hatamizadeh, Ali},
538
557
  booktitle = {Proceedings of ICLR},
539
558
  year = {2025}
540
559
  }
@@ -572,7 +591,6 @@ If you find this repository helpful, please cite our work:
572
591
 
573
592
  [![Stargazers repo roster for @fla-org/flash-linear-attention](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=fla-org&repo=flash-linear-attention)](https://github.com/fla-org/flash-linear-attention/stargazers)
574
593
 
575
-
576
594
  [![Star History Chart](https://api.star-history.com/svg?repos=fla-org/flash-linear-attention&type=Date)](https://star-history.com/#fla-org/flash-linear-attention&Date)
577
595
 
578
596
  ## Acknowledgements
@@ -1,16 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: fla-core
3
- Version: 0.4.0
4
- Summary: Core operations for flash-linear-attention
5
- Project-URL: Homepage, https://github.com/fla-org/flash-linear-attention
6
- Project-URL: Repository, https://github.com/fla-org/flash-linear-attention
7
- Requires-Python: >=3.10
8
- Description-Content-Type: text/markdown
9
- License-File: LICENSE
10
- Requires-Dist: torch>=2.5
11
- Requires-Dist: einops
12
- Dynamic: license-file
13
-
14
1
  <div align="center">
15
2
 
16
3
  # 💥 Flash Linear Attention
@@ -42,7 +29,7 @@ This repo aims at providing a collection of efficient Triton-based implementatio
42
29
 
43
30
  ## News
44
31
 
45
- - **$\texttt{[2025-10]}$:** 🌑 Add Kimi Delta Attention implementation to `fla`.
32
+ - **$\texttt{[2025-10]}$:** 🌑 Add Kimi Delta Attention implementation to `fla` ([paper](https://arxiv.org/abs/2510.26692)).
46
33
  - **$\texttt{[2025-09]}$:** 🌲 Add DeltaFormer implementation to `fla` ([paper](https://arxiv.org/abs/2505.19488v1)).
47
34
  - **$\texttt{[2025-09]}$:** 🐻 Thrilled to announce that [GDN](fla/ops/gated_delta_rule) has been integrated into Qwen3-Next. Check out their [blog post](https://qwen.ai/blog?id=4074cca80393150c248e508aa62983f9cb7d27cd&from=research.latest-advancements-list) for more infos!
48
35
  - **$\texttt{[2025-08]}$:** 🌲 Add Log-Linear Attention implementation to `fla` ([paper](https://arxiv.org/abs/2506.04761)).
@@ -101,6 +88,7 @@ Roughly sorted according to the timeline supported in `fla`. The recommended tra
101
88
  | 2025 | | MoM | [MoM: Linear Sequence Modeling with Mixture-of-Memories](https://arxiv.org/abs/2502.13685) | [official](https://github.com/OpenSparseLLMs/MoM) | [fla](https://github.com/fla-org/flash-linear-attention/blob/main/fla/layers/mom.py) |
102
89
  | 2025 | | Log-Linear Attention | [Log-Linear Attention](https://arxiv.org/abs/2506.04761) | [official](https://github.com/HanGuo97/log-linear-attention) | [fla](https://github.com/fla-org/flash-linear-attention/tree/main/fla/ops/log_linear_attn) |
103
90
  | 2025 | | DeltaFormer | [Understanding Transformer from the Perspective of Associative Memory](https://arxiv.org/abs/2505.19488v1) | | [fla](https://github.com/fla-org/flash-linear-attention/blob/main/fla/layers/deltaformer.py) |
91
+ | 2025 | | KDA | [Kimi Linear: An Expressive, Efficient Attention Architecture](https://arxiv.org/abs/2510.26692) | | [fla](https://github.com/fla-org/flash-linear-attention/tree/main/fla/ops/kda) |
104
92
 
105
93
  ## Installation
106
94
 
@@ -141,6 +129,8 @@ pip uninstall fla-core flash-linear-attention -y && pip install -U --no-use-pep5
141
129
 
142
130
  ## Usage
143
131
 
132
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fla-org/flash-linear-attention)
133
+
144
134
  ### Token Mixing
145
135
 
146
136
  We provide ``token mixing'' linear attention layers in `fla.layers` for you to use.
@@ -532,9 +522,25 @@ If you find this repository helpful, please cite our work:
532
522
  year = {2024}
533
523
  }
534
524
 
525
+ @misc{zhang2025kda,
526
+ title = {Kimi Linear: An Expressive, Efficient Attention Architecture},
527
+ author = {Zhang, Yu and Lin, Zongyu and Yao, Xingcheng and Hu, Jiaxi and Meng, Fanqing and Liu, Chengyin and Men, Xin and Yang, Songlin and Li, Zhiyuan and Li, Wentao and Lu, Enzhe and Liu, Weizhou and Chen, Yanru and Xu, Weixin and Yu, Longhui and Wang, Yejie and Fan, Yu and Zhong, Longguang and Yuan, Enming and Zhang, Dehao and Zhang, Yizhi and T. Liu, Y. and Wang, Haiming and Fang, Shengjun and He, Weiran and Liu, Shaowei and Li, Yiwei and Su, Jianlin and Qiu, Jiezhong and Pang, Bo and Yan, Junjie and Jiang, Zhejun and Huang, Weixiao and Yin, Bohong and You, Jiacheng and Wei, Chu and Wang, Zhengtao and Hong, Chao and Chen, Yutian and Chen, Guanduo and Wang, Yucheng and Zheng, Huabin and Wang, Feng and Liu, Yibo and Dong, Mengnan and Zhang, Zheng and Pan, Siyuan and Wu, Wenhao and Wu, Yuhao and Guan, Longyu and Tao, Jiawen and Fu, Guohong and Xu, Xinran and Wang, Yuzhi and Lai, Guokun and Wu, Yuxin and Zhou, Xinyu and Yang, Zhilin and Du, Yulun},
528
+ year = {2025},
529
+ eprint = {2510.26692},
530
+ archivePrefix = {arXiv},
531
+ primaryClass = {cs.CL}
532
+ }
533
+
534
+ @inproceedings{yang2025path,
535
+ title = {PaTH Attention: Position Encoding via Accumulating Householder Transformations},
536
+ author = {Yang, Songlin and Shen, Yikang and Wen, Kaiyue and Tan, Shawn and Mishra, Mayank and Ren, Liliang and Panda, Rameswar and Kim, Yoon},
537
+ booktitle = {Proceedings of NeurIPS},
538
+ year = {2025}
539
+ }
540
+
535
541
  @inproceedings{yang2024gdn,
536
542
  title = {Gated Delta Networks: Improving Mamba2 with Delta Rule},
537
- author = {Songlin Yang and Jan Kautz and Ali Hatamizadeh},
543
+ author = {Yang, Songlin and Kautz, Jan and Hatamizadeh, Ali},
538
544
  booktitle = {Proceedings of ICLR},
539
545
  year = {2025}
540
546
  }
@@ -572,7 +578,6 @@ If you find this repository helpful, please cite our work:
572
578
 
573
579
  [![Stargazers repo roster for @fla-org/flash-linear-attention](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=fla-org&repo=flash-linear-attention)](https://github.com/fla-org/flash-linear-attention/stargazers)
574
580
 
575
-
576
581
  [![Star History Chart](https://api.star-history.com/svg?repos=fla-org/flash-linear-attention&type=Date)](https://star-history.com/#fla-org/flash-linear-attention&Date)
577
582
 
578
583
  ## Acknowledgements
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  __path__ = __import__('pkgutil').extend_path(__path__, __name__)
4
- __version__ = '0.4.0'
4
+ __version__ = '0.4.2'
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
 
3
2
  from fla.modules.convolution import ImplicitLongConvolution, LongConvolution, ShortConvolution
4
3
  from fla.modules.fused_bitlinear import BitLinear, FusedBitLinear
@@ -11,7 +10,7 @@ from fla.modules.fused_norm_gate import (
11
10
  FusedLayerNormSwishGateLinear,
12
11
  FusedRMSNormGated,
13
12
  FusedRMSNormSwishGate,
14
- FusedRMSNormSwishGateLinear
13
+ FusedRMSNormSwishGateLinear,
15
14
  )
16
15
  from fla.modules.l2norm import L2Norm
17
16
  from fla.modules.layernorm import GroupNorm, GroupNormLinear, LayerNorm, LayerNormLinear, RMSNorm, RMSNormLinear
@@ -29,5 +28,5 @@ __all__ = [
29
28
  'FusedRMSNormGated', 'FusedRMSNormSwishGate', 'FusedRMSNormSwishGateLinear',
30
29
  'GatedMLP',
31
30
  'RotaryEmbedding',
32
- 'TokenShift'
31
+ 'TokenShift',
33
32
  ]