MCPcopy Create free account

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

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

↓ 3 callersMethod__init__
(self, config: ParallaxConfig, layer_idx: int)
fla/models/parallax/modeling_parallax.py:46
↓ 3 callersMethod__init__
(self, config: GLAConfig, layer_idx: int)
fla/models/gla/modeling_gla.py:44
↓ 3 callersMethod__init__
(self, config: LightNetConfig, layer_idx: int)
fla/models/lightnet/modeling_lightnet.py:44
↓ 3 callersMethod__init__
(self, config: TransformerConfig, layer_idx: int)
fla/models/transformer/modeling_transformer.py:43
↓ 3 callersMethod__init__
(self, config: CombaConfig, layer_idx: int)
fla/models/comba/modeling_comba.py:44
↓ 3 callersMethod__init__
(self, config: NSAConfig, layer_idx: int)
fla/models/nsa/modeling_nsa.py:43
↓ 3 callersMethod__init__
(self, config: KDAConfig, layer_idx: int)
fla/models/kda/modeling_kda.py:43
↓ 3 callersMethod__init__
(self, config: GSAConfig, layer_idx: int)
fla/models/gsa/modeling_gsa.py:44
↓ 3 callersFunction_activate_g
Reference gate activation matching the kernel's use_gate_in_kernel path.
tests/ops/test_gdn2.py:42
↓ 3 callersFunction_decode_at
Decode at position `t` with the cache truncated to [0, t]. Decode has no intra-cache causal mask (the query is assumed to come after everythi
tests/ops/test_wall_attn.py:292
↓ 3 callersMethod_get_D
(self)
fla/layers/log_linear_mamba2.py:434
↓ 3 callersFunction_is_called_from_fla
Check if the call is from fla package.
tests/conftest.py:31
↓ 3 callersFunction_mark
(override)
benchmarks/benchmark_training_throughput.py:134
↓ 3 callersFunction_max_offset
(seqlen_offset: int | torch.Tensor)
fla/layers/raven.py:36
↓ 3 callersFunction_npu_tile_config
( T: int, BT: int, D: int, dtype: torch.dtype, initial_state: torch.Tensor | None, )
fla/modules/backends/triton_ascend/causal_conv1d.py:39
↓ 3 callersMethod_orthogonal_init
(weight, gain=1.0)
fla/layers/rwkv7.py:216
↓ 3 callersFunction_truncate_branch
Truncate a branch name to *max_len* chars, adding ``...`` if needed.
benchmarks/ops/run.py:363
↓ 3 callersFunctionbench
Benchmark function with CUDA events.
benchmarks/cp/benchmark_kda_cp8_vs_cp2tp.py:79
↓ 3 callersFunctioncheck_pytorch_version
(version_s: str = '2.4')
fla/utils/_device.py:77
↓ 3 callersFunctioncheckout_and_install
Checkout a ref and reinstall the package.
scripts/run_benchmark_compare.py:178
↓ 3 callersFunctionchunk_bwd_dv_local
( q: torch.Tensor, k: torch.Tensor, do: torch.Tensor, g: torch.Tensor | None = None, g_gam
fla/ops/common/chunk_o.py:607
↓ 3 callersFunctionchunk_comba
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/comba/chunk.py:294
↓ 3 callersFunctionchunk_dplr_delta_rule_ref
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Tensor, b: torch.Tensor,
tests/ops/test_dplr_delta.py:58
↓ 3 callersFunctionchunk_gated_delta_rule_bwd_dhu_pre_process
( q: torch.Tensor, k: torch.Tensor, w: torch.Tensor, do: torch.Tensor, dv: torch.Tensor,
fla/ops/cp/chunk_delta_h.py:820
↓ 3 callersFunctionchunk_gated_delta_rule_fwd_h_pre_process
( k: torch.Tensor, w: torch.Tensor, u: torch.Tensor, g: torch.Tensor | None = None, gk: to
fla/ops/cp/chunk_delta_h.py:736
↓ 3 callersFunctionchunk_gated_oja_rule
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, gv: torch.Tensor, beta: torch.Tensor,
fla/ops/gated_oja_rule/chunk.py:290
↓ 3 callersFunctionchunk_mesa_net
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]` k (torch.Tensor): keys of shape `[B, T, H, K]
fla/ops/mesa_net/chunk.py:307
↓ 3 callersFunctionchunk_retention
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/retention/chunk.py:14
↓ 3 callersFunctionchunk_rwkv6
r""" Args: r (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/rwkv6/chunk.py:1245
↓ 3 callersFunctionchunk_ttt_linear_ref
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/ttt/naive.py:77
↓ 3 callersFunctioncompress_h0
(h0: torch.Tensor, context: FLACPContext)
fla/ops/cp/chunk_delta_h.py:912
↓ 3 callersFunctioncount_unique_graphs
Compile `impl` and return how many distinct graphs Dynamo builds for the given shapes. `repeat_interleave` has a data-dependent output shape, so
tests/ops/utils/test_index.py:92
↓ 3 callersFunctioncreate_model_and_config
A helper function to create a model and its configuration.
tests/models/test_modeling_utils.py:38
↓ 3 callersFunctiondeltaformer_attn
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor | None = None, att
fla/ops/deltaformer/parallel.py:946
↓ 3 callersFunctionfn
(inputs=inputs)
benchmarks/ops/run.py:323
↓ 3 callersMethodfrom_dict
Parse and validate a raw JSON dict. Returns None (with a warning) if malformed.
fla/ops/utils/cache.py:198
↓ 3 callersFunctionfused_beta_sigmoid_bwd
(x: torch.Tensor, dy: torch.Tensor, scale: float = 1.0)
fla/ops/common/gate.py:71
↓ 3 callersFunctionfused_chunk_gla
( **kwargs, )
fla/ops/gla/fused_chunk.py:8
↓ 3 callersFunctionfused_chunk_retention
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/retention/fused_chunk.py:14
↓ 3 callersFunctionfused_recurrent_delta_rule
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/delta_rule/fused_recurrent.py:439
↓ 3 callersFunctionfused_recurrent_dplr_delta_rule
r""" This function computes the recurrence S_t = S_t @ (Diag(g_t) + a_t b_t^T) + v_t k_t^T in a recurrent manner. Args: q (torch.Tens
fla/ops/generalized_delta_rule/dplr/fused_recurrent.py:201
↓ 3 callersFunctiongdn_no_cp
()
benchmarks/cp/test_gdn_with_cp.py:704
↓ 3 callersFunctiongroup_norm
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor = None,
fla/modules/layernorm.py:844
↓ 3 callersFunctionhmamba_chunk_scan_combined
( x: torch.Tensor, dt: torch.Tensor, A: torch.Tensor, B: torch.Tensor, C: torch.Tensor,
fla/layers/log_linear_mamba2.py:43
↓ 3 callersFunctionis_compiling
()
tests/conftest.py:17
↓ 3 callersFunctionkda_gate_bwd
( g: torch.Tensor, A_log: torch.Tensor, dt_bias: torch.Tensor | None = None, dyg: torch.Tensor
fla/ops/kda/gate.py:241
↓ 3 callersFunctionlayer_norm
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor = None,
fla/modules/layernorm.py:822
↓ 3 callersFunctionlayer_norm_linear_quant_fn
( x, norm_weight, norm_bias, linear_weight, linear_bias, residual=None, eps=1e-6,
fla/modules/fused_bitlinear.py:480
↓ 3 callersFunctionnaive_attn_decoding
Reference PyTorch implementation of packed-varlen decoding attention, mirroring `attn_decoding_one_step`. A single query per sequence attends
fla/ops/attn/naive.py:95
↓ 3 callersFunctionnaive_chunk_comba
Reference PyTorch implementation of chunk COMBA. Args: q: [B, T, H, K] k: [B, T, H, K] v: [B, T, H, V] p: [B
fla/ops/comba/naive.py:70
↓ 3 callersFunctionnaive_forgetting_attn
Reference PyTorch implementation of forgetting attention. Args: q: [B, T, HQ, D] k: [B, T, H, D] v: [B, T, H, D]
fla/ops/forgetting_attn/naive.py:13
↓ 3 callersFunctionnaive_log_linear_attn
(q, k, v, g, level_scales)
fla/ops/log_linear_attn/naive.py:54
↓ 3 callersFunctionnaive_parallax
r""" Reference PyTorch implementation of Parallax (parameterized local linear attention, Algorithm 1 of https://arxiv.org/abs/2605.29157).
fla/ops/parallax/naive.py:11
↓ 3 callersFunctionnaive_recurrent_gsa
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Tensor, g: torch.Tensor | No
fla/ops/gsa/naive.py:12
↓ 3 callersFunctionnaive_recurrent_linear_attn
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, scale: float | None = None, initial_s
fla/ops/linear_attn/naive.py:12
↓ 3 callersFunctionnormalize_with_z_state
Apply running normalization Z_t = sum_{s<=t} k_s (or sum_{s>=t} for reverse). z_init carries the cumulative key from prior chunks; the returned z
fla/ops/linear_attn/utils.py:91
↓ 3 callersFunctionparallax_decode
r""" Forward-only Parallax decode/prefill over a cached KV (inference; no autograd). The ``Sq`` query tokens are treated as the *last* ``Sq``
fla/ops/parallax/decode.py:124
↓ 3 callersFunctionparallel_nsa
r""" Args: q (torch.Tensor): queries of shape `[B, T, HQ, K]`. k (torch.Tensor): keys of shape `[B, T, H,
fla/ops/nsa/parallel.py:781
↓ 3 callersFunctionparallel_simple_gla
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/simple_gla/parallel.py:670
↓ 3 callersFunctionparse_file
(file_path)
scripts/find_dependent_tests.py:21
↓ 3 callersFunctionprepare_inputs
( batch_size: int, seq_len: int, context_len: int, varlen: bool, vocab_size: int, devi
benchmarks/benchmark_training_throughput.py:62
↓ 3 callersFunctionprepare_split_cu_seqlens
Sub-split a (optionally packed) batch along the token axis. Two calling modes: - **Rectangular batch**: pass `batch_size` and `seq_len`, le
fla/ops/utils/index.py:67
↓ 3 callersFunctionpython_env
()
scripts/smoke_test_split_packages.py:49
↓ 3 callersFunctionrecompute_w_u_fwd
( k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, A: torch.Tensor, gk: torch.Tensor,
fla/ops/kda/wy_fast.py:248
↓ 3 callersFunctionrequire_cache_layer_idx
(module, past_key_values)
fla/layers/utils.py:205
↓ 3 callersFunctionrms_norm_linear
( x: torch.Tensor, norm_weight: torch.Tensor, norm_bias: torch.Tensor, linear_weight: torch.Te
fla/modules/layernorm.py:917
↓ 3 callersFunctionsafe_dot
(a, b, allow_tf32: tl.constexpr = None)
fla/ops/utils/op.py:53
↓ 3 callersMethodserialize
(key: Any)
fla/ops/utils/cache.py:129
↓ 3 callersMethodset_bias_value
Set bias to a specific value (for v0, w0 etc.)
fla/layers/rwkv6.py:284
↓ 3 callersFunctionsigmoid
(x)
fla/ops/utils/matmul.py:163
↓ 3 callersMethodstate_dict
(self)
legacy/training/flame/data.py:143
↓ 2 callersMethod__init__
Initializes the LongConvolution module. Args: hidden_size (int): The number of expected features in the input and output.
fla/modules/conv/long_conv.py:52
↓ 2 callersMethod__init__
(self, config, layer_idx)
fla/models/mamba2/modeling_mamba2.py:75
↓ 2 callersMethod__init__
(self, config, layer_idx)
fla/models/mamba/modeling_mamba.py:47
↓ 2 callersMethod__init__
(self, config, layer_idx)
fla/models/samba/modeling_samba.py:43
↓ 2 callersMethod__init__
(self, config: LogLinearMamba2Config, layer_idx: int)
fla/models/log_linear_mamba2/modeling_log_linear_mamba2.py:27
↓ 2 callersMethod__init__
(self, config: Mamba3Config, layer_idx: int)
fla/models/mamba3/modeling_mamba3.py:34
↓ 2 callersFunction_base_requirement_names
(wheel: Path)
tests/test_split_package_release.py:86
↓ 2 callersFunction_branch
(git_label)
benchmarks/ops/run.py:376
↓ 2 callersMethod_build_conv_state
(self, hidden_states: torch.Tensor)
fla/layers/mamba.py:169
↓ 2 callersFunction_build_ptr_table
(tensors: Sequence[torch.Tensor])
fla/ops/attnres/fused.py:300
↓ 2 callersFunction_clamp_bd_for_grid
(B: int, NT: int, D: int, BD: int)
fla/modules/backends/triton_ascend/causal_conv1d.py:33
↓ 2 callersMethod_compute_inv_freq
(self, device=None)
fla/modules/rotary.py:400
↓ 2 callersFunction_contiguous_if_needed
(arg: Any, skip: bool)
fla/utils/_decorators.py:91
↓ 2 callersFunction_conv_ref_compute_dtype
(*tensors)
tests/modules/test_conv.py:25
↓ 2 callersFunction_cpu_device_warning
()
fla/utils/_device.py:72
↓ 2 callersFunction_create_yoco_config_kwargs
( L: int, H: int, D: int, vocab_size: int = 1000, self_decoder_attn_type: str = 'gated_del
tests/models/test_modeling_yoco.py:16
↓ 2 callersFunction_export_public_api
(module)
fla/__init__.py:29
↓ 2 callersFunction_find_project_root
Walk up from this file to find the git root.
benchmarks/ops/run.py:493
↓ 2 callersFunction_flashkda_gold
(q, k, v, g, beta_raw, A_log, dt_bias, scale, initial_state, lower_bound=-5.0, cu_seqlens=N
tests/ops/test_kda.py:1199
↓ 2 callersFunction_flashkda_make_gate_params
(H, D)
tests/ops/test_kda.py:1187
↓ 2 callersFunction_flashkda_run
(monkeypatch, **kwargs)
tests/ops/test_kda.py:1193
↓ 2 callersMethod_forward_impl
( qo: torch.Tensor, ko: torch.Tensor, vo: torch.Tensor, betao: torch.Tensor |
fla/ops/deltaformer/parallel.py:825
↓ 2 callersMethod_from_causal_conv_layout
(self, hidden_states: torch.Tensor)
fla/layers/mamba.py:166
↓ 2 callersMethod_get_affected_modules
Get set of module paths for affected files.
scripts/find_dependent_tests.py:178
↓ 2 callersMethod_get_sorted_backends
Get backends sorted by priority (lower number = higher priority). Backends with the same priority are sorted by registration order.
fla/ops/backends/__init__.py:117
↓ 2 callersFunction_gpt_oss_eager_sink_reference
Mirrors the sink path in GPT-OSS eager attention: concat sink logits as an extra column, softmax once, then drop the sink column.
tests/ops/test_attn_sink.py:28
↓ 2 callersFunction_import_optional_public_module
(module_name: str)
fla/__init__.py:17
↓ 2 callersMethod_init_yoco_xavier
(module: nn.Linear, gain: float)
fla/models/yoco/modeling_yoco.py:327
↓ 2 callersFunction_l_cell
(r, blank=False)
benchmarks/ops/run.py:446
← previousnext →201–300 of 2,989, ranked by callers