MCPcopy Create free account

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

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

Method__init__
(self, d_model, state_to_tensor, d_output)
train/src/tasks/decoders.py:171
Method__init__
(self, d_input, d_model, n_classes, nli=True, activation="relu")
train/src/tasks/decoders.py:181
Method__init__
( self, d_input, n_classes, d_model=None, nli=True, activation
train/src/tasks/decoders.py:228
Method__init__
If model_cfg is passed, it will take precedence over cfg.model
train/src/tasks/seq.py:22
Method__init__
If model_cfg is passed, it will take precedence over cfg.model
train/src/tasks/seq_hf.py:23
Method__init__
This Block has a slightly different structure compared to a regular prenorm Transformer block. The standard block is: LN -> M
train/src/models/block.py:316
Method__init__
( self, in_features, hidden_features=None, out_features=None, activati
train/src/models/mlp.py:55
Method__init__
( self, in_features, hidden_features=None, out_features=None, activati
train/src/models/mlp.py:100
Method__init__
( self, in_features, process_group, hidden_features=None, out_features
train/src/models/mlp.py:162
Method__init__
(self, *args, **kwargs)
train/src/models/gpt.py:70
Method__init__
(self, config, *inputs, **kwargs)
train/src/models/gpt.py:426
Method__init__
(self, config)
train/src/models/gpt.py:513
Method__init__
(self, config: GPT2Config, process_group=None, device=None, dtype=None)
train/src/models/gpt.py:751
Method__init__
(self, d_model, num_classes, pooling_mode='MEAN', batch_first=False, **kwargs)
train/src/models/modules/seq_common.py:52
Method__init__
(self, d_model, d_inner, num_classes, dropout=0.0, pooling_mode='MEAN', batch_first=False)
train/src/models/modules/seq_common.py:74
Method__init__
(self, d_model, d_inner, num_classes, dropout=0.0, pooling_mode='MEAN', batch_first=False, in
train/src/models/modules/seq_common.py:102
Method__init__
(self, d_model, num_classes, batch_first=True, bias=True)
train/src/models/modules/seq_common.py:136
Method__init__
(self, d_model, dropout=0.1, max_len=5000, batch_first=False, initializer=None)
train/src/models/modules/seq_common.py:178
Method__init__
Copied from Mlp above. If num_layers > 2, add more Mlp layers, doubling each time.
train/src/models/modules/seq_common.py:239
Method__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.Sigmoid, drop=0.)
train/src/models/modules/seq_common.py:266
Method__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, gate_layer=No
train/src/models/modules/seq_common.py:295
Method__init__
( self, in_features, hidden_features=None, out_features=None, act_layer=nn.ReLU, norm_layer=None,
train/src/models/modules/seq_common.py:324
Method__init__
(self, max_length: int=1024, batch_size: int=32, batch_size_eval: int=None,
train/src/datamodules/t5_data.py:14
Method__init__
(self, _name_, data_dir=None, **dataset_cfg)
train/src/datamodules/base.py:179
Method__init__
(self, max_length: int=1024, batch_size: int=32, batch_size_eval: int=None,
train/src/datamodules/language_modeling_neox.py:19
Method__init__
(self, *args, **kwargs)
train/src/datamodules/fault_tolerant_sampler.py:66
Method__init__
(self, dataset_name, tokenizer_name, dataset_config_name=None, max_length=1024, cache_dir=Non
train/src/datamodules/language_modeling_hf.py:42
Method__init__
tokens should be a numpy array
train/src/datamodules/datasets/lm_dataset.py:12
Method__init__
(self, path)
train/src/datamodules/datasets/indexed_dataset.py:228
Method__init__
(self, out_file, dtype=np.int32)
train/src/datamodules/datasets/indexed_dataset.py:290
Method__init__
(self, path, skip_warmup=False)
train/src/datamodules/datasets/indexed_dataset.py:404
Method__init__
(self, path, skip_warmup=False)
train/src/datamodules/datasets/indexed_dataset.py:472
Method__init__
(self, out_file, dtype=np.int64)
train/src/datamodules/datasets/indexed_dataset.py:572
Method__init_subclass__
(cls, **kwargs)
train/src/datamodules/base.py:175
Method__iter__
(self)
lm-eval-harness/lm_eval/models/utils.py:77
Method__iter__
(self)
train/src/datamodules/fault_tolerant_sampler.py:43
Method__iter__
(self)
train/src/datamodules/fault_tolerant_sampler.py:86
Method__len__
(self)
lm-eval-harness/lm_eval/models/utils.py:442
Method__len__
(self)
synthetic/zoology/data/utils.py:24
Method__len__
(self)
synthetic/zoology/data/utils.py:156
Method__len__
(self)
train/src/datamodules/language_modeling_neox.py:292
Method__len__
(self)
train/src/datamodules/datasets/lm_dataset.py:25
Method__len__
(self)
train/src/datamodules/datasets/indexed_dataset.py:207
Method__len__
(self)
train/src/datamodules/datasets/indexed_dataset.py:469
Method__len__
(self)
train/src/datamodules/datasets/indexed_dataset.py:506
Method__new__
(cls, input_array, shm=None)
train/src/datamodules/language_modeling_hf.py:31
Method__post_init__
(self)
lm-eval-harness/lm_eval/api/task.py:90
Method__post_init__
(self)
lm-eval-harness/lm_eval/api/instance.py:27
Method__post_init__
(self)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:214
Method__setitem__
(self, item, value)
lm-eval-harness/lm_eval/api/task.py:118
Method__setstate__
(self, state)
train/src/datamodules/datasets/indexed_dataset.py:484
Method__str__
(self)
train/src/datamodules/base.py:234
Method_batch_scheduler
(self, pos, n_reordered_requests)
lm-eval-harness/lm_eval/models/huggingface.py:935
Function_bwd_kernel_dav
(V, GV, A, O, DO, DA, DV, DGV, Z, H, stride
based/models/triton/kernels/intra_chunk_contribution/fn_only_gv.py:88
Function_bwd_kernel_dqk
(Q, K, GK, DA, DQ, DK, DGK, stride_q1, stride
based/models/triton/kernels/intra_chunk_contribution/fn_only_gk.py:83
Function_bwd_preprocess_cumsum_gk
( Q, K, GK, GK_cumsum, DQ_exp, DK_reduce, DGK_last_exp, DGK_cumsum, DQ, DK, DGK, NUM
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gk.py:85
Function_bwd_preprocess_cumsum_gv
( V, GV, GV_cumsum, DGV_cumsum_exp, DV_reduce, DGV_last_exp, DGV_cumsum, DV, DGV, NUM
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gv.py:76
Function_bwd_recurrence
( S, p2, DS, Dp2, NUM_BLOCK, NUM_SPLIT_K, NUM_SPLIT_V, D_MODEL_K: tl.constexpr, D_MODEL_V:
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gv.py:49
Function_bwd_recurrence
( S, DS, NUM_BLOCK, NUM_SPLIT_K, NUM_SPLIT_V, D_MODEL_K: tl.constexpr, D_MODEL_V: tl.const
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_no_decay.py:45
Function_bwd_recurrence
( S, p1, DS, Dp1, NUM_BLOCK, NUM_SPLIT_K, NUM_SPLIT_V, D_MODEL_K: tl.constexpr, D_MODEL_V
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gk.py:48
Function_bwd_recurrence
( S, p1, p2, DS, Dp1, Dp2, NUM_BLOCK, NUM_SPLIT_K, NUM_SPLIT_V, D_MODEL_K: tl.constexpr, D_
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_full.py:51
Method_cache_dir_name
(self)
train/src/datamodules/language_modeling_hf.py:250
Method_collate
(x)
lm-eval-harness/lm_eval/models/vllm_causallms.py:349
Method_collate
(x)
lm-eval-harness/lm_eval/models/neuron_optimum.py:537
Method_collate
(x)
lm-eval-harness/lm_eval/models/openai_completions.py:214
Method_collate
Defines the key for the sorted method
lm-eval-harness/lm_eval/models/huggingface.py:962
Method_collate_callback
(cls, x, resolution=None)
train/src/datamodules/base.py:107
Method_collate_callback
(cls, x, resolution=None, img_size=None, channels_last=True)
train/src/datamodules/base.py:136
Method_collate_fn
Default collate function. Generally accessed by the dataloader() methods to pass into torch DataLoader Arguments:
train/src/datamodules/base.py:71
Method_collate_gen
(_requests)
lm-eval-harness/lm_eval/models/vllm_causallms.py:267
Method_create_model
( self, pretrained: str, revision="main", dtype="auto", trust_remote_c
lm-eval-harness/lm_eval/models/optimum_lm.py:35
Method_create_model
( self, pretrained: str, dtype: Optional[Union[str, torch.dtype]] = "float16",
lm-eval-harness/lm_eval/models/mamba_lm.py:80
Function_decorator
input_ids a 2D array with batch_size on dim=0 makes sure the func runs with self.batch_size
lm-eval-harness/lm_eval/models/neuron_optimum.py:51
Function_deprecated
(*args, **kwargs)
train/src/datamodules/base.py:11
Method_eval_dataloader
(self, dataset, train_resolution=None, eval_resolutions=None, **kwargs)
train/src/datamodules/base.py:245
Function_exact_match_score
(prediction, target)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:85
Function_exception_callback
(e: Exception, sleep_time: float)
lm-eval-harness/lm_eval/models/anthropic_llms.py:51
Function_exception_callback
(e: Exception, sleep_time: float)
lm-eval-harness/lm_eval/models/textsynth.py:33
Function_exception_callback
(e: Exception, sleep_time: float)
lm-eval-harness/lm_eval/models/openai_completions.py:58
Function_f1_score
Computes token f1 score for a single target and prediction.
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:105
Method_filter
(sample)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:168
Method_forward_reduce_state_update
forward computation using single call to `update` to calculate the metric value on the current batch and accumulate global state. This
train/src/metrics/num_tokens.py:39
Function_fwd_compute_O
( A, V, GV, O, stride_a1, stride_a2, stride_a3, stride_a4, stride_v1, stride_v2, stride_v3, strid
based/models/triton/kernels/intra_chunk_contribution/fn_only_gv.py:18
Function_fwd_kernel_compute_A
( Q, K, GK, A, stride_q1, stride_q2, stride_q3, stride_q4, stride_a1, stride_a2, stride_a3,
based/models/triton/kernels/intra_chunk_contribution/fn_only_gk.py:18
Function_fwd_preprocess_cumsum_gk
( Q, K, GK, GK_cumsum, Q_exp, K_reduce, GK_last_exp, NUM_CHUNK, L, normalizer, clamp_min, D
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gk.py:21
Function_fwd_preprocess_cumsum_gv
( V, GV, GV_cumsum, GV_exp, V_reduce, GV_last_exp, NUM_CHUNK, L, normalizer, clamp_min, D_M
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gv.py:21
Function_fwd_recurrence
( S, p2, O, NUM_BLOCK, D_MODEL_K: tl.constexpr, D_MODEL_V: tl.constexpr, BLOCK_MODEL: t
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gv.py:10
Function_fwd_recurrence
( S, O, NUM_BLOCK, D_MODEL_K: tl.constexpr, D_MODEL_V: tl.constexpr, BLOCK_MODEL: tl.co
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_no_decay.py:10
Function_fwd_recurrence
( S, p1, O, NUM_BLOCK, D_MODEL_K: tl.constexpr, D_MODEL_V: tl.constexpr, BLOCK_MODEL: t
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_only_gk.py:9
Function_fwd_recurrence
( S, p1, p2, O, NUM_BLOCK, D_MODEL_K: tl.constexpr, D_MODEL_V: tl.constexpr, BLOCK_MODEL
based/models/triton/kernels/inter_chunk_contribution/chunk_scan_triton_full.py:9
Method_get_cache_path
(config: DataSegmentConfig)
synthetic/zoology/data/utils.py:54
Method_get_config
( self, checkpoint_name: str, **kwargs, )
lm-eval-harness/lm_eval/models/mamba_lm.py:65
Method_get_prune_text
(self, doc)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:383
Function_handle_non_serializable
(o)
lm-eval-harness/lm_eval/__main__.py:16
Function_init_weights
( module, n_layer, initializer_range=0.02, # Now only used for embedding layer. rescale_preno
based/models/mamba.py:84
Function_init_weights
( module, n_layer, initializer_range=0.02, mup_width_scale=1.0, rescale_prenorm_residual=True )
based/models/transformer/gpt.py:354
Function_init_weights
( module, n_layer, initializer_range=0.02, # Now only used for embedding layer. rescale_preno
based/models/mixers/mamba/modules/models/mixer_seq_simple.py:54
Function_init_weights
( module, n_layers, initializer_range=0.02, rescale_prenorm_residual=True, )
synthetic/zoology/model.py:74
Function_init_weights
(module, n_layer, initializer_range=0.02, rescale_prenorm_residual=True, use_weight_init=True)
train/src/models/gpt.py:487
Method_init_weights
general init strategy
synthetic/zoology/mixers/gla.py:224
← previousnext →801–900 of 1,739, ranked by callers