MCPcopy Create free account

hub / github.com/HazyResearch/prefix-linear-attention / functions

Functions1,739 in github.com/HazyResearch/prefix-linear-attention

Methodforward
(self, x)
based/ops/fused_dense.py:193
Methodforward
We're doing Tensor Parallel with sequence parallelism: we do the matmul and then a reduce_scatter of the result.
based/ops/fused_dense.py:239
Methodforward
If process_group is not None and sequence_parallel=True, we're doing Tensor Parallel with sequence parallelism: we do an all_gather o
based/ops/fused_dense.py:252
Methodforward
(self, x, process_group=None)
based/ops/fused_dense.py:580
Methodforward
(self, x)
based/ops/fused_dense.py:664
Methodforward
( ctx, x0, residual, gamma, beta, rowscale, colscale,
based/ops/layer_norm.py:313
Methodforward
( ctx, x0, residual, gamma, beta, colscale, x0_subset,
based/ops/layer_norm.py:418
Methodforward
( ctx, x0, x1, residual, gamma0, beta0, gamma1,
based/ops/layer_norm.py:533
Methodforward
(self, x0, residual=None)
based/ops/layer_norm.py:790
Methodforward
( ctx, logits, labels, smoothing=0.0, logit_scale=1.0, lse_squ
based/ops/triton/cross_entropy.py:146
Methodforward
checkpoint_lvl: 0: no recomputation in the bwd 1: recompute gelu_out in the bwd 2: recompute act_input and gelu_out in the bwd
based/ops/triton/mlp.py:16
Methodforward
(self, x)
based/ops/triton/mlp.py:145
Methodforward
( ctx, x, weight, bias, residual=None, x1=None, weight
based/ops/triton/layer_norm.py:701
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
based/ops/triton/layer_norm.py:943
Methodforward
( ctx, x, norm_weight, norm_bias, linear_weight, linear_bias,
based/ops/triton/layer_norm.py:959
Methodforward
(self, input_ids, inference_params=None)
based/models/mamba.py:183
Methodforward
"position_ids" is just to be compatible with Transformer generation. We don't use it. num_last_tokens: if > 0, only return the logits
based/models/mamba.py:263
Methodforward
hidden_states: (B, S, D) if batch_first else (S, B, D)
based/models/modules/seq_common.py:60
Methodforward
hidden_states: (B, S, D) if batch_first else (S, B, D)
based/models/modules/seq_common.py:84
Methodforward
hidden_states: (B, S, D) if batch_first else (S, B, D)
based/models/modules/seq_common.py:114
Methodforward
hidden_states: (B, S, D) if batch_first else (S, B, D)
based/models/modules/seq_common.py:140
Methodforward
r"""Inputs of forward function Args: x: the sequence fed to the positional encoder model (required). Shape: x:
based/models/modules/seq_common.py:192
Methodforward
(self, x)
based/models/modules/seq_common.py:227
Methodforward
(self, x)
based/models/modules/seq_common.py:259
Methodforward
(self, x)
based/models/modules/seq_common.py:282
Methodforward
(self, x)
based/models/modules/seq_common.py:311
Methodforward
(self, x)
based/models/modules/seq_common.py:335
Methodforward
(ctx, A, v, gv, chunk_size=16)
based/models/triton/kernels/intra_chunk_contribution/fn_only_gv.py:227
Methodforward
(ctx, q, k, gk)
based/models/triton/kernels/intra_chunk_contribution/fn_only_gk.py:267
Methodforward
(ctx, decay_value_last, to_add)
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gv.py:116
Methodforward
(ctx, to_add)
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_no_decay.py:93
Methodforward
(ctx, q, k, gk, normalizer_gk=8, clamp_min=-3)
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gk.py:184
Methodforward
(ctx, decay_key_last, to_add)
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gk.py:105
Methodforward
(ctx, decay_key_last, decay_value_last, to_add)
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_full.py:114
Methodforward
(ctx, v, gv, normalizer_gv=8, clamp_min=-3)
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gv.py:169
Methodforward
(self, input_ids, position_ids=None, inference_params=None)
based/models/transformer/gpt.py:488
Methodforward
input_ids: (batch, seqlen) int tensor inference_params: for generation. Adapted from Megatron-LM (and Apex) https://github.co
based/models/transformer/gpt.py:609
Methodforward
Implements the multihead softmax attention. Arguments --------- qkv: The tensor containing the query, key, and value.
based/models/mixers/mha.py:83
Methodforward
Implements the multihead softmax attention. Arguments --------- q: The tensor containing the query. (B, Sq, H, D)
based/models/mixers/mha.py:161
Methodforward
Implements the multihead softmax attention. Arguments --------- qkv: The tensor containing the query, key, and value. (B,
based/models/mixers/mha.py:243
Methodforward
Implements the multihead softmax attention. Arguments --------- q: The tensor containing the query. (B, Sq, H, D)
based/models/mixers/mha.py:295
Methodforward
(self, input: torch.Tensor)
based/models/mixers/mha.py:343
Methodforward
Arguments: x: (batch, seqlen, hidden_dim) (where hidden_dim = num heads * head dim) if seqlen=None. If seqlen is
based/models/mixers/mha.py:933
Methodforward
Implements the multihead softmax attention. Arguments --------- qkv: The tensor containing the query, key, and value.
based/models/mixers/slide_attention.py:59
Methodforward
Implements the multihead softmax attention. Arguments --------- q: The tensor containing the query. (B, Sq, H, D)
based/models/mixers/slide_attention.py:150
Methodforward
(self, input: torch.Tensor)
based/models/mixers/slide_attention.py:251
Methodforward
Arguments: x: (batch, seqlen, hidden_dim) (where hidden_dim = num heads * head dim) if cu_seqlens is None and max
based/models/mixers/slide_attention.py:484
Methodforward
(self, x: torch.Tensor)
based/models/mixers/prefix_linear_attention.py:41
Methodforward
( self, x, inference_params: InferenceParams = None, **kwargs, )
based/models/mixers/prefix_linear_attention.py:105
Methodforward
Assume x.shape is (batch_size, n_heads, seq_len, head_dim)
based/models/mixers/linear_attention.py:54
Methodforward
(self, x: torch.Tensor)
based/models/mixers/linear_attention.py:75
Methodforward
x (torch.Tensor): tensor of shape (b, d, l) y (torch.Tensor): tensor of shape (b, d, l)
based/models/mixers/linear_attention.py:134
Methodforward
Args: x: (b, l, d) tensor Returns: y: (b, l, d) tensor
based/models/mixers/convolution.py:45
Methodforward
Args: u: (b, l, d) tensor Returns: y: (b, l, d) tensor
based/models/mixers/convolution.py:193
Methodforward
(ctx, u, delta, A, B, C, D=None, z=None, delta_bias=None, delta_softplus=False, return_last_st
based/models/mixers/mamba/ops/selective_scan_interface.py:22
Methodforward
xz: (batch, dim, seqlen)
based/models/mixers/mamba/ops/selective_scan_interface.py:164
Methodforward
( ctx, x, weight, bias, residual=None, eps=1e-6, preno
based/models/mixers/mamba/ops/triton/layernorm.py:382
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
based/models/mixers/mamba/ops/triton/layernorm.py:493
Methodforward
( ctx, x, norm_weight, norm_bias, linear_weight, linear_bias,
based/models/mixers/mamba/ops/triton/layernorm.py:508
Methodforward
hidden_states: (B, L, D) Returns: same shape as hidden_states
based/models/mixers/mamba/modules/mamba_simple.py:118
Methodforward
r"""Pass the input through the encoder layer. Args: hidden_states: the sequence to the encoder layer (required). resi
based/models/mixers/mamba/modules/mamba_simple.py:321
Methodforward
(self, input_ids, inference_params=None)
based/models/mixers/mamba/modules/models/mixer_seq_simple.py:151
Methodforward
"position_ids" is just to be compatible with Transformer generation. We don't use it. num_last_tokens: if > 0, only return the logits
based/models/mixers/mamba/modules/models/mixer_seq_simple.py:228
Methodforward
input_ids: (batch, seqlen) position_ids: (batch, seqlen)
synthetic/zoology/model.py:52
Methodforward
(self, hidden_states, residual=None)
synthetic/zoology/model.py:145
Methodforward
(self, input_ids, position_ids=None)
synthetic/zoology/model.py:187
Methodforward
( self, input_ids, position_ids=None, state=None )
synthetic/zoology/model.py:221
Methodforward
(self, x, hidden_states=None)
synthetic/zoology/mixers/gla.py:47
Methodforward
(self, x)
synthetic/zoology/mixers/gla.py:86
Methodforward
(self, x, hidden_states=None)
synthetic/zoology/mixers/gla.py:157
Methodforward
( self, input_ids: torch.LongTensor = None, hidden_states: torch.Tensor = None, )
synthetic/zoology/mixers/gla.py:190
Methodforward
( self, input_ids: torch.LongTensor = None, labels: Optional[torch.LongTensor] = None,
synthetic/zoology/mixers/gla.py:256
Methodforward
(self, qkv)
synthetic/zoology/mixers/slide_attn.py:13
Methodforward
Args: x: (b, l, d) tensor
synthetic/zoology/mixers/slide_attn.py:54
Methodforward
Args: u: (b, l, d) tensor Returns: y: (b, l, d) tensor
synthetic/zoology/mixers/base_conv.py:51
Methodforward
hidden_states: (B, L, D) Returns: same shape as hidden_states
synthetic/zoology/mixers/mamba.py:114
Methodforward
Bidirectional-enabled forward pass hidden_states: (B, L, D) Returns: same shape as hidden_states
synthetic/zoology/mixers/mamba.py:244
Methodforward
r"""Pass the input through the encoder layer. Args: hidden_states: the sequence to the encoder layer (required). resi
synthetic/zoology/mixers/mamba.py:309
Methodforward
Args: u: (b, l, d) tensor Returns: y: (b, l, d) tensor
synthetic/zoology/mixers/hybrid.py:29
Methodforward
(self, x)
synthetic/zoology/mixers/hyena.py:60
Methodforward
(self, L)
synthetic/zoology/mixers/hyena.py:85
Methodforward
(self, t, x)
synthetic/zoology/mixers/hyena.py:107
Methodforward
(self, x, L, k=None, bias=None, *args, **kwargs)
synthetic/zoology/mixers/hyena.py:198
Methodforward
Args: u: (b, l, d) tensor Returns: y: (b, l, d) tensor
synthetic/zoology/mixers/hyena.py:303
Methodforward
Implements the multihead softmax attention. Arguments --------- qkv: The tensor containing the query, key, and value. (B,
synthetic/zoology/mixers/attention.py:15
Methodforward
(self, x: torch.Tensor)
synthetic/zoology/mixers/attention.py:67
Methodforward
Args: x: (b, l, d) tensor Returns: y: (b, l, d) tensor
synthetic/zoology/mixers/convolution.py:79
Methodforward
Applies the LongConvolution operation on the input tensor. Args: x: (b, l, d) tensor Returns: y: (b,
synthetic/zoology/mixers/convolution.py:132
Methodforward
(self, L)
synthetic/zoology/mixers/convolution.py:169
Methodforward
Args: x: (b, l, d) tensor Returns: y: (b, l, d) tensor
synthetic/zoology/mixers/convolution.py:239
Methodforward
(self, x)
synthetic/zoology/mixers/mlp.py:21
Methodforward
x (torch.Tensor): tensor of shape (b, d, l) y (torch.Tensor): tensor of shape (b, d, l)
synthetic/zoology/mixers/based.py:166
Methodforward
Args: u (torch.Tensor): Float tensor of shape (batch_size, seq_len, d_model) Return: y (torch.Tensor): Float
synthetic/zoology/mixers/listing.py:28
Methodforward
(self, L)
synthetic/zoology/mixers/listing.py:55
Methodforward
Args: u (torch.Tensor): Float tensor of shape (batch_size, seq_len, d_model) Return: y (torch.Tensor): Float
synthetic/zoology/mixers/listing.py:79
Methodforward
x (torch.Tensor): tensor of shape (b, d, l) y (torch.Tensor): tensor of shape (b, d, l)
synthetic/zoology/mixers/jrt_based.py:176
Methodforward
(ctx, u, delta, A, B, C, D=None, z=None, delta_bias=None, delta_softplus=False, return_last_st
synthetic/zoology/mixers/mamba_ssm/selective_scan_interface.py:17
Methodforward
xz: (batch, dim, seqlen)
synthetic/zoology/mixers/mamba_ssm/selective_scan_interface.py:159
Methodforward
( ctx, x, weight, bias, residual=None, eps=1e-6, preno
synthetic/zoology/mixers/mamba_ssm/triton/layernorm.py:382
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
synthetic/zoology/mixers/mamba_ssm/triton/layernorm.py:493
← previousnext →1,201–1,300 of 1,739, ranked by callers