MCPcopy Create free account

hub / github.com/fla-org/flash-linear-attention / functions

Functions2,989 in github.com/fla-org/flash-linear-attention

Methodset_output_embeddings
(self, new_embeddings)
fla/models/gated_deltanet/modeling_gated_deltanet.py:377
Methodset_output_embeddings
(self, new_embeddings)
fla/models/retnet/modeling_retnet.py:369
Methodset_output_embeddings
(self, new_embeddings)
fla/models/mamba/modeling_mamba.py:279
Methodset_output_embeddings
(self, new_embeddings)
fla/models/path_attn/modeling_path_attention.py:375
Methodset_output_embeddings
(self, new_embeddings)
fla/models/samba/modeling_samba.py:371
Methodset_output_embeddings
(self, new_embeddings)
fla/models/raven/modeling_raven.py:378
Methodset_output_embeddings
(self, new_embeddings)
fla/models/forgetting_transformer/modeling_forgetting_transformer.py:376
Methodset_output_embeddings
(self, new_embeddings)
fla/models/parallax/modeling_parallax.py:353
Methodset_output_embeddings
(self, new_embeddings)
fla/models/rwkv6/modeling_rwkv6.py:364
Methodset_output_embeddings
(self, new_embeddings)
fla/models/gla/modeling_gla.py:367
Methodset_output_embeddings
(self, new_embeddings)
fla/models/log_linear_mamba2/modeling_log_linear_mamba2.py:424
Methodset_output_embeddings
(self, new_embeddings)
fla/models/mamba3/modeling_mamba3.py:263
Methodset_output_embeddings
(self, new_embeddings)
fla/models/lightnet/modeling_lightnet.py:360
Methodset_output_embeddings
(self, new_embeddings)
fla/models/transformer/modeling_transformer.py:369
Methodset_output_embeddings
(self, new_embeddings)
fla/models/comba/modeling_comba.py:376
Methodset_output_embeddings
(self, new_embeddings)
fla/models/nsa/modeling_nsa.py:369
Methodset_output_embeddings
(self, new_embeddings)
fla/models/kda/modeling_kda.py:394
Methodset_output_embeddings
(self, new_embeddings)
fla/models/gsa/modeling_gsa.py:369
Methodsetup
Use a fresh triton cache for each test to avoid stale compilations.
tests/context_parallel/test_cp_bwd_gk_offset.py:52
Functionsetup_distributed_torchrun
Initialize distributed environment for torchrun.
tests/context_parallel/test_cp_dplr.py:446
Functionsetup_distributed_torchrun
Initialize distributed environment for torchrun.
tests/context_parallel/test_cp_conv.py:561
Functionsetup_distributed_torchrun
Initialize distributed environment for torchrun.
tests/context_parallel/test_cp_kda.py:594
Functionsetup_distributed_torchrun
Initialize distributed environment for torchrun.
tests/context_parallel/test_cp_gdn.py:464
Functionshape_BTD
(B, T, H, D, **kw)
benchmarks/ops/registry.py:39
Functionshape_BTH
(B, T, H, D, **kw)
benchmarks/ops/registry.py:35
Functionshape_BTHD
(B, T, H, D, **kw)
benchmarks/ops/registry.py:31
Functionshape_D
(B, T, H, D, **kw)
benchmarks/ops/registry.py:51
Functionshape_H
(B, T, H, D, **kw)
benchmarks/ops/registry.py:43
Functionshape_HD
(B, T, H, D, **kw)
benchmarks/ops/registry.py:47
Functionshape_LBTD
AttnRes-style residuals stack: [L, B, T, D] where L is the number of residual sources.
benchmarks/ops/registry.py:55
Functionshort_conv_forward
Args: x (`torch.Tensor`): Tensor of shape `[B, T, D]`. `B` must be 1 if `seq_idx` is provided. residual (`Optional[to
benchmarks/cp/test_gdn_with_cp.py:269
Methodsigmoid_bwd
(self, x, dy, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:143
Functionsigmoid_bwd_kernel
( x, dy, dx, stride_x_row, stride_dy_row, stride_dx_row, T, D: tl.constexpr, B: tl
fla/modules/activations.py:126
Functionsigmoid_bwd_kernel
( x, dy, dx, T, D: tl.constexpr, stride_x_row, stride_dy_row, stride_dx_row, B: tl
fla/modules/backends/triton_ascend/activations.py:103
Methodsigmoid_fwd
(self, x, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:139
Functionsigmoid_fwd_kernel
( x, y, stride_x_row, stride_y_row, T, D: tl.constexpr, B: tl.constexpr, )
fla/modules/activations.py:98
Functionsigmoid_fwd_kernel
( x, y, T, D: tl.constexpr, stride_x_row, stride_y_row, B: tl.constexpr, )
fla/modules/backends/triton_ascend/activations.py:73
Functionsigmoid_transform
(t)
benchmarks/ops/registry.py:69
Functionsigmoidglu_fwd_kernel
( x, y, z, stride_x_row, stride_y_row, stride_z_row, T, D: tl.constexpr, B: tl.con
fla/modules/activations.py:772
Functionsigmoidglu_fwdbwd_kernel
( x, y, g, dx, dy, z, stride_x_row, stride_y_row, stride_g_row, stride_dx_row, stride_
fla/modules/activations.py:805
Functionsoftmax_bwd_kernel
( p, dp, ds, D: tl.constexpr, B: tl.constexpr, )
fla/ops/utils/softmax.py:54
Functionsoftmax_fwd_kernel
( x, p, D: tl.constexpr, B: tl.constexpr, )
fla/ops/utils/softmax.py:27
Functionsoftplus2_nv
(x)
fla/ops/utils/softplus.py:90
Functionsoftplus2_triton
(x)
fla/ops/utils/softplus.py:106
Functionsoftplus_nv
(x)
fla/ops/utils/softplus.py:69
Functionsoftplus_triton
(x)
fla/ops/utils/softplus.py:85
Functionsolve_tril_16x16_kernel
( A, Ai, cu_seqlens, chunk_indices, T, H: tl.constexpr, BT: tl.constexpr, USE_
fla/ops/utils/solve_tril.py:37
Methodstate_size
(self)
fla/modules/conv/short_conv.py:249
Methodstate_size
(self, **kwargs)
fla/layers/simple_gla.py:275
Methodstate_size
(self, seq_len: int = 2048)
fla/layers/abc.py:235
Methodstate_size
(self, **kwargs)
fla/layers/lightnet.py:240
Methodstate_size
(self, **kwargs)
fla/layers/hgrn.py:174
Methodswiglu_fwd
(self, x, y, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:163
Functionswiglu_fwd_kernel
( x, y, z, stride_x_row, stride_y_row, stride_z_row, T, D: tl.constexpr, B: tl.con
fla/modules/activations.py:571
Functionswiglu_fwd_kernel
( x, y, z, T, D: tl.constexpr, stride_x_row, stride_y_row, stride_z_row, B: tl.con
fla/modules/backends/triton_ascend/activations.py:275
Methodswiglu_fwdbwd
(self, x, y, g, use_weight=False, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:167
Functionswiglu_fwdbwd_kernel
( x, y, g, dx, dy, z, stride_x_row, stride_y_row, stride_g_row, stride_dx_row, stride_
fla/modules/activations.py:604
Functionswiglu_fwdbwd_kernel
( x, y, g, dx, dy, z, T, D: tl.constexpr, stride_x_row, stride_y_row, stride_g_row,
fla/modules/backends/triton_ascend/activations.py:312
Methodswish_bwd
(self, x, dy, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:159
Functionswish_bwd_kernel
( x, dy, dx, stride_x_row, stride_dy_row, stride_dx_row, T, D: tl.constexpr, B: tl
fla/modules/activations.py:369
Functionswish_bwd_kernel
( x, dy, dx, T, D: tl.constexpr, stride_x_row, stride_dy_row, stride_dx_row, B: tl
fla/modules/backends/triton_ascend/activations.py:241
Methodswish_fwd
(self, x, output_contiguous=False)
fla/modules/backends/triton_ascend/__init__.py:155
Functionswish_fwd_kernel
( x, y, stride_x_row, stride_y_row, T, D: tl.constexpr, B: tl.constexpr, )
fla/modules/activations.py:341
Functionswish_fwd_kernel
( x, y, T, D: tl.constexpr, stride_x_row, stride_y_row, B: tl.constexpr, )
fla/modules/backends/triton_ascend/activations.py:210
Functiontensor_cache
A decorator that memoizes the most recent results of a function call by argument identity. The decorator keeps a bounded queue of up to ``FL
fla/utils/_decorators.py:33
Methodtensorize
(example: dict[str, Any])
legacy/training/flame/data.py:193
Methodtensors
(self)
scripts/utils/autotune_generate.py:29
Functiontest_all_with_and_without_varlen
(B, T, H, cu_seqlens, split_at)
tests/modules/test_token_shift.py:137
Functiontest_assert_close_accepts_close_tensors_and_rejects_mismatch
()
tests/test_utils.py:16
Functiontest_attention_varlen_accepts_batched_layout_with_cu_seqlens
(B: int, T: int, H: int, D: int)
tests/layers/test_attn_varlen_pack_layout.py:22
Functiontest_attn_decoding_sink_empty_row_matches_reference
()
tests/ops/test_attn_sink.py:406
Functiontest_attn_decoding_sink_matches_reference
()
tests/ops/test_attn_sink.py:374
Functiontest_attn_decoding_sink_with_g_matches_reference
(do_gate_scale)
tests/ops/test_attn_sink.py:448
Functiontest_attn_sink_empty_row_ref_matches_gpt_oss_eager
()
tests/ops/test_attn_sink.py:121
Functiontest_attn_sink_ref_matches_gpt_oss_eager
(window_size)
tests/ops/test_attn_sink.py:74
Functiontest_attnres
( L: int, B: int, T: int, D: int, scale: float, fuse_output_norm: bool, dtype: tor
tests/ops/test_attnres.py:42
Functiontest_backward_matches_eager_reference
(B: int, T: int, H: int, HQ: int, K: int, V: int)
tests/ops/test_wall_attn.py:144
Functiontest_based
( B: int, T: int, H: int, D: int, dtype: torch.dtype, )
tests/ops/test_based.py:29
Functiontest_cache_decode_all_layers_see_same_past_length
Test that during decode, all layers see the same past length for RoPE offset. GitHub Issue #766: The cache implementation updates each layer
tests/models/test_cache.py:330
Functiontest_cache_from_legacy_preserves_seen_tokens
()
tests/models/test_cache.py:300
Functiontest_cache_get_seq_length_nonexistent_layer
Test that get_seq_length returns 0 for non-existent layers and handles None layer_idx correctly for populated caches.
tests/models/test_cache.py:153
Functiontest_cache_incremental_decode_consistency
Test that cache remains consistent across multiple decode steps. Simulates autoregressive generation where we do multiple decode steps,
tests/models/test_cache.py:493
Functiontest_cache_incremental_update
Test that FLACache correctly tracks incremental updates to each layer, simulating autoregressive generation where tokens are added one at a t
tests/models/test_cache.py:117
Functiontest_cache_per_layer_seq_length
Test that FLACache.get_seq_length returns per-layer sequence length, not a global counter. This is important for multi-layer models where
tests/models/test_cache.py:59
Functiontest_cache_requires_layer_idx
(builder, hidden_states)
tests/layers/test_layer_cache_layer_idx.py:182
Functiontest_cache_reset
(cache_cls)
tests/models/test_cache.py:278
Functiontest_cache_window_overflow_keeps_tail
(cache_cls, first_len: int, second_len: int, window_size: int)
tests/models/test_cache.py:208
Functiontest_cache_window_size_does_not_undercount
Test that window_size truncation doesn't undercount sequence length. When window_size is applied and input exceeds it, the full input size
tests/models/test_cache.py:175
Functiontest_channel_mixing_gradients
(B, T, n_embd, dim_ffn, dtype, inplace, xprevdim)
tests/ops/test_rwkv7.py:34
Functiontest_chunk
Full forward + gradient comparison of the chunkwise kernel vs autograd through the naive recurrent reference.
tests/ops/test_gdn2.py:237
Functiontest_chunk
( B: int, T: int, H: int, D: int, scale: float, dtype: torch.dtype, )
tests/ops/test_ttt.py:33
Functiontest_chunk
( B: int, T: int, H: int, D: int, dtype: torch.dtype, )
tests/ops/test_log_linear_attn.py:27
Functiontest_chunk
( B: int, T: int, H: int, D: int, scale: float, use_qk_l2norm_in_kernel: bool, dty
tests/ops/test_delta.py:34
Functiontest_chunk
( B: int, T: int, H: int, D: int, scale: float, gate_logit_normalizer: float, mask
tests/ops/test_comba.py:138
Functiontest_chunk
( B: int, T: int, H: int, D: int, scale: float, num_householder: int, use_qk_l2nor
tests/ops/test_delta_product.py:37
Functiontest_chunk
( B: int, T: int, H: int, D: int, dtype: torch.dtype, )
tests/ops/test_linear_attn.py:113
Functiontest_chunk
( B: int, T: int, H: int, D: int, mask_p: float, gate_logit_normalizer: float, saf
tests/ops/test_dplr_delta.py:288
Functiontest_chunk
( B: int, T: int, H: int, HV: int, D: int, scale: float, gate_logit_normalizer: fl
tests/ops/test_kda.py:532
Functiontest_chunk
( B: int, T: int, D: int, dtype: torch.dtype, )
tests/ops/test_hgrn.py:142
Functiontest_chunk
( B: int, T: int, H: int, D: int, M: int, gate_logit_normalizer: float, dtype: tor
tests/ops/test_gsa.py:218
← previousnext →2,501–2,600 of 2,989, ranked by callers