MCPcopy Create free account

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

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

Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/lightnet/modeling_lightnet.py:95
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: Optional[torch.Tens
fla/models/lightnet/modeling_lightnet.py:254
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/lightnet/modeling_lightnet.py:385
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/transformer/modeling_transformer.py:90
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: torch.Tensor | None
fla/models/transformer/modeling_transformer.py:255
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/transformer/modeling_transformer.py:379
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/comba/modeling_comba.py:97
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: Optional[torch.Tens
fla/models/comba/modeling_comba.py:271
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/comba/modeling_comba.py:401
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/nsa/modeling_nsa.py:91
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: Optional[torch.Tens
fla/models/nsa/modeling_nsa.py:260
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/nsa/modeling_nsa.py:394
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/kda/modeling_kda.py:105
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: Optional[torch.Tens
fla/models/kda/modeling_kda.py:286
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/kda/modeling_kda.py:419
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/models/gsa/modeling_gsa.py:103
Methodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: Optional[torch.Tens
fla/models/gsa/modeling_gsa.py:263
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: torch.Tensor | None = None
fla/models/gsa/modeling_gsa.py:394
Methodforward
(ctx, x, stages, group, async_op)
benchmarks/cp/test_gdn_with_cp.py:107
Methodforward
(ctx, inp, weight, bias)
benchmarks/cp/test_gdn_with_cp.py:210
Functionforward_inplace
(u, w)
fla/ops/deltaformer/invcum.py:20
Methodforward_reference
x (torch.Tensor): tensor of shape (b, d, t) y (torch.Tensor): tensor of shape (b, d, t)
fla/layers/based.py:73
Methodforward_reference
x (torch.Tensor): tensor of shape (b, d, t) y (torch.Tensor): tensor of shape (b, d, t)
fla/layers/rebased.py:119
Functionfp32_grad_linear_forward
(input, self)
benchmarks/cp/test_gdn_with_cp.py:255
Methodfrom_file
Read and validate a config file. Returns None if the file is missing or malformed.
fla/ops/utils/cache.py:233
Methodfrom_legacy_cache
Converts a cache in the legacy cache format into an equivalent `Cache`.
fla/models/utils.py:341
Methodfrom_state
(cls, state)
legacy/training/flame/logging.py:121
Functionfused_addcmul_fwd_kernel
( hidden, delta, ixr, ixw, ixk, ixv, ixa, ixg, oxr, oxw, oxk, oxv, oxa, oxg, use_xg: tl.co
fla/ops/rwkv7/fused_addcmul.py:55
Functionfused_beta_sigmoid_bwd_kernel
( x, dy, dx, scale, n_elements, BLOCK_SIZE: tl.constexpr, )
fla/ops/common/gate.py:34
Functionfused_beta_sigmoid_fwd_kernel
( x, y, scale, n_elements, BLOCK_SIZE: tl.constexpr, )
fla/ops/common/gate.py:18
Functionfused_chunk_based_bwd_kernel
( # NV: number of split in the V dimension. NK: number of split in the K dimension q, k, v,
fla/ops/based/fused_chunk.py:114
Functionfused_chunk_based_fwd_kernel
( q, k, v, o, z, scale, # K ** -0.5 T, B: tl.constexpr, H: tl.constexpr,
fla/ops/based/fused_chunk.py:16
Functionfused_chunk_bwd_kernel
( q, k, v, g, g_gamma, do, dq, dk, dv, dg, h0, dht, dh0,
fla/ops/common/fused_chunk.py:180
Functionfused_chunk_delta_rule
( **kwargs, )
fla/ops/delta_rule/fused_chunk.py:8
Functionfused_chunk_fwd_kernel
( q, k, v, g, g_gamma, o, h0, ht, cu_seqlens, scale, T, B: tl.
fla/ops/common/fused_chunk.py:46
Functionfused_chunk_ttt_linear_bwd_kernel_dh
( q, k, v, v2, x, y, r, w, b, eta, h, dht, dhbt, dh0,
fla/ops/ttt/fused_chunk.py:277
Functionfused_chunk_ttt_linear_bwd_kernel_h
( k, v, v2, x, y, r, w, b, eta, h0, hb0, h, do, dq,
fla/ops/ttt/fused_chunk.py:157
Functionfused_chunk_ttt_linear_fwd_kernel
( q, k, v, eta, w, b, o, scale, eps, h0, hb0, ht, hbt,
fla/ops/ttt/fused_chunk.py:34
Methodfused_grpo_loss
( self, logits, ref_logp, input_ids, advantages, beta=0.1,
fla/modules/backends/triton_ascend/__init__.py:254
Methodfused_kl_div_backward
(self, do, dx, dw)
fla/modules/backends/triton_ascend/__init__.py:194
Methodfused_kl_div_forward
( self, x, target_x, weight, target_weight, reduction='batchme
fla/modules/backends/triton_ascend/__init__.py:175
Methodfused_linear_cross_entropy_backward
( self, do, dx, dw, db, )
fla/modules/backends/triton_ascend/__init__.py:127
Methodfused_linear_cross_entropy_forward
( self, x, target, weight, bias=None, ignore_index=-100,
fla/modules/backends/triton_ascend/__init__.py:92
Functionfused_recurrent_bwd_kernel
( # B: batch_size, H: n_heads, T: seq_len, D: b_dhead # NV: number of split in the V dimension. NK: nu
fla/ops/generalized_delta_rule/iplr/fused_recurrent.py:122
Functionfused_recurrent_bwd_kernel
( q, k, v, g, g_gamma, gk, gv, o, h0, do, dq, dk, dv,
fla/ops/common/fused_recurrent.py:163
Functionfused_recurrent_comba_fwd_kernel
( q, k, p, v, g, beta, o, h0, ht, cu_seqlens, scale, T, B:
fla/ops/comba/fused_recurrent.py:22
Functionfused_recurrent_delta_rule_bwd_kernel
( q, k, v, beta, h0, dh0, dht, do, dq, dk, dv, db, cu_seql
fla/ops/delta_rule/fused_recurrent.py:109
Functionfused_recurrent_delta_rule_fwd_kernel
( q, k, v, u, beta, o, h0, ht, cu_seqlens, scale, T, B: tl.con
fla/ops/delta_rule/fused_recurrent.py:22
Functionfused_recurrent_dplr_delta_rule_fwd_kernel
( q, k, v, a, b, gk, o, h0, ht, cu_seqlens, scale, T, B: t
fla/ops/generalized_delta_rule/dplr/fused_recurrent.py:33
Functionfused_recurrent_fwd_kernel
( q, # query [B, H, L, K] k, # key [B, H, L, V] v, # value [B, H, L, V]. a, # a [B, H, L,
fla/ops/generalized_delta_rule/iplr/fused_recurrent.py:31
Functionfused_recurrent_fwd_kernel
( q, k, v, g, g_gamma, gk, gv, o, h0, ht, cu_seqlens, scale,
fla/ops/common/fused_recurrent.py:30
Functionfused_recurrent_gated_delta_rule_fwd_kernel
( q, k, v, g, gk, gv, beta, A_log, dt_bias, o, h0, ht, cu_
fla/ops/gated_delta_rule/fused_recurrent.py:30
Functionfused_recurrent_gdn2_fwd_kernel
( q, k, v, g, b, w, A_log, dt_bias, o, h0, ht, cu_seqlens,
fla/ops/gdn2/fused_recurrent.py:60
Functionfused_recurrent_gsa_inference_kernel
( q, k, v, s, g, o, hk0, hv0, hkt, hvt, scale, K: tl.constexpr
fla/ops/gsa/fused_recurrent.py:18
Functionfused_recurrent_hgrn_bwd_kernel
( g, o, h0, dx, dg, do, dht, dh0, cu_seqlens, T, D: tl.constexpr,
fla/ops/hgrn/fused_recurrent.py:93
Functionfused_recurrent_hgrn_fwd_kernel
( x, g, o, h0, ht, cu_seqlens, T, D: tl.constexpr, BD: tl.constexpr, U
fla/ops/hgrn/fused_recurrent.py:31
Functionfused_recurrent_kda_fwd_kernel
( q, k, v, g, beta, A_log, dt_bias, o, h0, ht, cu_seqlens, ssm
fla/ops/kda/fused_recurrent.py:33
Functionfused_recurrent_lightning_attn
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/lightning_attn/fused_recurrent.py:13
Functionfused_recurrent_oja_fwd_kernel
( q, k, v, gv, beta, o, h0, ht, cu_seqlens, scale, T, B: tl.co
fla/ops/gated_oja_rule/fused_recurrent.py:23
Functionfused_recurrent_rwkv4
(w: Tensor, u: Tensor, k: Tensor, v: Tensor, state: Tensor)
fla/ops/rwkv4/fused_recurrent.py:475
Functionfused_recurrent_rwkv4_backward_kernel
( # W w_ptr, w_s_c, # U u_ptr, u_s_c, # K k_ptr, k_s_b, k_s_t, k_s
fla/ops/rwkv4/fused_recurrent.py:180
Functionfused_recurrent_rwkv4_forward_kernel
( # W w_ptr, w_s_c, # U u_ptr, u_s_c, # K k_ptr, k_s_b, k_s_t, k_s
fla/ops/rwkv4/fused_recurrent.py:29
Functionfused_recurrent_rwkv6_bwd_kernel_dkv
( q, # query [B, H, T, K]/[B, T, H, K] k, # key [B, H, T, V]/[B, T, H, V] v, # value [B, H, T,
fla/ops/rwkv6/fused_recurrent.py:207
Functionfused_recurrent_rwkv6_bwd_kernel_dq
( k, # key [B, H, T, V]/[B, T, H, V] v, # value [B, H, T, V]/[B, T, H, V] w, # log gate [B, H,
fla/ops/rwkv6/fused_recurrent.py:117
Functionfused_recurrent_rwkv6_bwd_kernel_dw
( q, k, dq, dk, dw, cu_seqlens, scale, T, H: tl.constexpr, K: tl.const
fla/ops/rwkv6/fused_recurrent.py:305
Functionfused_recurrent_rwkv6_fwd_kernel
( q, # query [B, H, T, K]/[B, T, H, K] k, # key [B, H, T, K]/[B, T, H, K] v, # value [B, H, T,
fla/ops/rwkv6/fused_recurrent.py:30
Functionfused_recurrent_rwkv7
Args: r (torch.Tensor): r of shape `[B, T, H, K]`. w (torch.Tensor): log decay of shape `[B, T, H, K]`.
fla/ops/rwkv7/fused_recurrent.py:183
Functionfused_recurrent_rwkv7_fwd_kernel
( r, w, k, v, kk, a, o, h0, ht, cu_seqlens, scale, T, B: t
fla/ops/rwkv7/fused_recurrent.py:34
Methodfwd_inner
(q, k, v, z, B, H, T, K, V, BT, BK, BV, NT, normk=False, h0=None, ht=None)
fla/ops/abc/chunk.py:860
Methodfwd_pre
(s, B, H, T, S)
fla/ops/abc/chunk.py:850
Functiongate_output_correction_backward_ref
Reference backward pass implementation in pure PyTorch.
fla/ops/rwkv7/gate_output_correction.py:37
Functiongate_output_correction_bwd_kernel
( grad_output_ptr, o_ptr, r_ptr, k_ptr, r_k_ptr, v_ptr, g_ptr, grad_o_ptr, grad_r_ptr, grad_k_ptr, gra
fla/ops/rwkv7/gate_output_correction.py:126
Functiongate_output_correction_fwd_kernel
( o_ptr, r_ptr, k_ptr, r_k_ptr, v_ptr, g_ptr, output_ptr, o_b_stride, o_t_stride, r_b_stride, r_t_
fla/ops/rwkv7/gate_output_correction.py:74
Functiongdn_forward
( hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None, past_key_values: Cache
benchmarks/cp/test_gdn_with_cp.py:351
Functiongdn_gate_bwd_kernel
( g, A_log, dt_bias, dyg, dg, dA, T, H: tl.constexpr, BT: tl.constexpr,
fla/ops/gated_delta_rule/gate.py:118
Functiongdn_gate_chunk_cumsum_scalar_kernel
( g, A_log, dt_bias, o, scale, cu_seqlens, chunk_indices, T, H: tl.constex
fla/ops/gated_delta_rule/gate.py:62
Functiongdn_gate_fwd_kernel
( g, A_log, dt_bias, yg, T, H: tl.constexpr, BT: tl.constexpr, HAS_BIAS: tl.co
fla/ops/gated_delta_rule/gate.py:237
Methodgenerate
(self, *args, **kwargs)
fla/models/abc/modeling_abc.py:374
Methodgenerate
(self, *args, **kwargs)
fla/models/moba/modeling_moba.py:343
Methodgenerate
(self, *args, **kwargs)
fla/models/linear_attn/modeling_linear_attn.py:376
Methodgenerate
(self, *args, **kwargs)
fla/models/mom/modeling_mom.py:481
Methodgenerate
(self, *args, **kwargs)
fla/models/delta_net/modeling_delta_net.py:374
Methodgenerate
(self, *args, **kwargs)
fla/models/yoco/modeling_yoco.py:624
Methodgenerate
(self, *args, **kwargs)
fla/models/hgrn2/modeling_hgrn2.py:379
Methodgenerate
(self, *args, **kwargs)
fla/models/mesa_net/modeling_mesa_net.py:372
Methodgenerate
(self, *args, **kwargs)
fla/models/gated_deltaproduct/modeling_gated_deltaproduct.py:376
Methodgenerate
(self, *args, **kwargs)
fla/models/rodimus/modeling_rodimus.py:486
Methodgenerate
(self, *args, **kwargs)
fla/models/rwkv7/modeling_rwkv7.py:467
Methodgenerate
(self, *args, **kwargs)
fla/models/deltaformer/modeling_deltaformer.py:332
Methodgenerate
(self, *args, **kwargs)
fla/models/hgrn/modeling_hgrn.py:378
Methodgenerate
(self, *args, **kwargs)
fla/models/gated_deltanet/modeling_gated_deltanet.py:386
Methodgenerate
(self, *args, **kwargs)
fla/models/retnet/modeling_retnet.py:378
Methodgenerate
(self, *args, **kwargs)
fla/models/raven/modeling_raven.py:387
Methodgenerate
(self, *args, **kwargs)
fla/models/rwkv6/modeling_rwkv6.py:373
Methodgenerate
(self, *args, **kwargs)
fla/models/gla/modeling_gla.py:376
Methodgenerate
(self, *args, **kwargs)
fla/models/lightnet/modeling_lightnet.py:369
Methodgenerate
(self, *args, **kwargs)
fla/models/comba/modeling_comba.py:385
Methodgenerate
(self, *args, **kwargs)
fla/models/nsa/modeling_nsa.py:378
Methodgenerate
(self, *args, **kwargs)
fla/models/kda/modeling_kda.py:403
Methodgenerate
(self, *args, **kwargs)
fla/models/gsa/modeling_gsa.py:378
← previousnext →1,901–2,000 of 2,989, ranked by callers