MCPcopy Create free account

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

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

Methodforward
( ctx, x, norm_weight, norm_bias, linear_weight, linear_bias,
fla/modules/fused_bitlinear.py:391
Methodforward
Overrides the forward pass to include quantization. Args: x: An input tensor with shape [n, d]. Returns:
fla/modules/fused_bitlinear.py:586
Methodforward
(self, x)
fla/modules/fused_bitlinear.py:630
Methodforward
( ctx, logits, target, label_smoothing=0.0, logit_scale=1.0, l
fla/modules/fused_cross_entropy.py:257
Methodforward
Arguments: input: (batch, vocab_size) target: (batch,) Returns: losses: (batch,) if reduction is
fla/modules/fused_cross_entropy.py:419
Methodforward
(ctx, x: torch.Tensor, cu_seqlens: torch.Tensor | None = None, cache: torch.Tensor | None = No
fla/modules/token_shift.py:511
Methodforward
If z is not None, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z))
fla/modules/layernorm_gated.py:400
Methodforward
If z is not None, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z))
fla/modules/layernorm_gated.py:498
Methodforward
If z is not None, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z))
fla/modules/layernorm_gated.py:531
Methodforward
( ctx, x: torch.Tensor, target_x: torch.Tensor, weight: torch.Tensor,
fla/modules/fused_kl_div.py:245
Methodforward
Args: x (`torch.Tensor`): Tensor of shape `[batch_size * seq_len, hidden_size]`. target_x (`torch.Ten
fla/modules/fused_kl_div.py:342
Methodforward
( ctx, x, eps=1e-6, output_dtype=None, )
fla/modules/l2norm.py:246
Methodforward
(self, x: torch.Tensor)
fla/modules/l2norm.py:287
Methodforward
( ctx, x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor, bias: t
fla/modules/fused_norm_gate.py:637
Methodforward
( ctx, x: torch.Tensor, g: torch.Tensor, norm_weight: torch.Tensor, no
fla/modules/fused_norm_gate.py:726
Methodforward
( self, x: torch.Tensor, g: torch.Tensor, residual: torch.Tensor | None = None
fla/modules/fused_norm_gate.py:971
Methodforward
( self, x: torch.Tensor, g: torch.Tensor, residual: torch.Tensor | None = None
fla/modules/fused_norm_gate.py:1034
Methodforward
( self, x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor | None = None,
fla/modules/fused_norm_gate.py:1129
Methodforward
( self, x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor | None = None,
fla/modules/fused_norm_gate.py:1206
Methodforward
(ctx, logits, ref_logp, input_ids, advantages, beta, completion_mask, save_kl, inplace=True)
fla/modules/grpo.py:225
Methodforward
Forward pass for L2 penalty. Args: loss (torch.Tensor): The loss tensor. logits (torch.Tensor): Shape[B, T, V
fla/modules/l2warp.py:19
Methodforward
(ctx, x)
fla/modules/activations.py:188
Methodforward
(ctx, x, temperature)
fla/modules/activations.py:315
Methodforward
(ctx, x)
fla/modules/activations.py:431
Methodforward
(ctx, input, bias)
fla/modules/activations.py:478
Methodforward
(ctx, input)
fla/modules/activations.py:515
Methodforward
(ctx, input)
fla/modules/activations.py:548
Methodforward
(ctx, x, y)
fla/modules/activations.py:710
Methodforward
(ctx, x, y, weight, bias)
fla/modules/activations.py:734
Methodforward
(ctx, x, y)
fla/modules/activations.py:908
Methodforward
(ctx, x, y, weight, bias)
fla/modules/activations.py:932
Methodforward
(ctx, x, y, power)
fla/modules/activations.py:1138
Methodforward
(ctx, x, y, weight, bias, power)
fla/modules/activations.py:1164
Methodforward
( self, x: torch.Tensor, **kwargs: Unpack[Any], )
fla/modules/mlp.py:66
Methodforward
(self, x, y, weight, bias)
fla/modules/mlp.py:83
Methodforward
Fusing the last linear layer with cross-entropy loss Reference: https://github.com/mgmalek/efficient_cross_entropy Handl
fla/modules/fused_linear_cross_entropy.py:462
Methodforward
Args: x (torch.Tensor): [batch_size, seq_len, hidden_size] target (torch.LongTensor): [batch_size, seq_len]
fla/modules/fused_linear_cross_entropy.py:680
Methodforward
( ctx, x: torch.Tensor, cu_seqlens: torch.Tensor | None, chunk_indices: torch.
fla/modules/token_shift_cp.py:126
Methodforward
( ctx, x, cos, sin, interleaved=False, inplace=False,
fla/modules/rotary.py:222
Methodforward
q: [B, T, H, D] k: [B, T, H, D] seqlen_offset: [N] or int. Each sequence in x is shifted by this amou
fla/modules/rotary.py:455
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:65
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:97
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:116
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:133
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:149
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:182
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:205
Methodforward
(self, x: torch.Tensor, flatten: bool | None = True)
fla/modules/feature_map.py:233
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:259
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:270
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:281
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:292
Methodforward
(self, x: torch.Tensor)
fla/modules/feature_map.py:303
Methodforward
( ctx, logits, target, label_smoothing=0.0, logit_scale=1.0, l
fla/modules/backends/triton_ascend/fused_cross_entropy.py:283
Methodforward
(ctx, logits, ref_logp, input_ids, advantages, beta, completion_mask, save_kl, inplace=True)
fla/modules/backends/triton_ascend/grpo.py:160
Methodforward
(ctx, x, y, weight, bias)
fla/modules/backends/triton_ascend/activations.py:504
Methodforward
Args: x (`torch.Tensor`): Tensor of shape `[B, T, D]`. `B` must be 1 if `cu_seqlens` is provided. res
fla/modules/conv/short_conv.py:119
Methodforward
Applies the LongConvolution operation on the input tensor. Args: x: [batch_size, seq_len, hidden_size] tensor Ret
fla/modules/conv/long_conv.py:68
Methodforward
(self, L)
fla/modules/conv/long_conv.py:102
Methodforward
Args: x: [batch_size, seq_len, hidden_size] tensor Returns: y: [batch_size, seq_len, hidden_size] tensor
fla/modules/conv/long_conv.py:159
Methodforward
( ctx, x: torch.Tensor, weight: torch.Tensor | None = None, bias: torch.Tensor
fla/modules/conv/triton/ops.py:367
Methodforward
( ctx, x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor | None,
fla/modules/conv/cp/ops.py:121
Methodforward
( ctx, x, weight, bias=None, residual: torch.Tensor | None = None,
fla/modules/conv/cuda/ops.py:54
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/gla.py:177
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/path_attn.py:89
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/linear_attn.py:126
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/gsa.py:132
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/deltaformer.py:100
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/attn.py:84
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/gdn2.py:200
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/hgrn2.py:104
Methodforward
(ctx, x, indices)
fla/layers/utils.py:23
Methodforward
(ctx, x, indices, first_axis_dim)
fla/layers/utils.py:57
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/nsa.py:71
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/rwkv7.py:222
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None, past
fla/layers/mla.py:126
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/mom.py:425
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/parallax.py:109
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/log_linear_mamba2.py:720
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/mesa_net.py:128
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/multiscale_retention.py:171
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/mamba.py:400
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/gated_deltaproduct.py:164
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/simple_gla.py:163
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/wall_attn.py:132
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/bitattn.py:75
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/forgetting_attn.py:82
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/abc.py:139
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/mamba3.py:399
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/raven.py:226
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/rodimus.py:129
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/rodimus.py:292
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/delta_net.py:170
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/lightnet.py:112
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/moba.py:157
Methodforward
( self, states: torch.Tensor, seqlen_offset: int | torch.Tensor = 0, cu_seqlen
fla/layers/yoco.py:63
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/yoco.py:264
Methodforward
( self, hidden_states: torch.Tensor, shared_k: torch.Tensor, shared_v: torch.T
fla/layers/yoco.py:361
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/mamba2.py:672
Methodforward
(self, hidden_states: torch.Tensor, **kwargs)
fla/layers/based.py:55
← previousnext →1,701–1,800 of 2,989, ranked by callers