MCPcopy Create free account

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

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

Functionregex_replace
Implements the `re.sub` function as a custom Jinja filter.
lm-eval-harness/lm_eval/utils.py:415
Methodregister
Register a tensor with a configurable learning rate and 0 weight decay
based/models/mixers/optim.py:7
Functionregister_aggregation
(name: str)
lm-eval-harness/lm_eval/api/registry.py:139
Methodregister_contaminant
Register a string as contamination to be removed, e.g. a test set This breaks the dirt_string into ngrams to store for future cleaning
lm-eval-harness/lm_eval/decontamination/janitor.py:151
Functionregister_group
(name)
lm-eval-harness/lm_eval/api/registry.py:62
Functionregister_metric
(**args)
lm-eval-harness/lm_eval/api/registry.py:92
Functionregister_model
(*names)
lm-eval-harness/lm_eval/api/registry.py:13
Functionregister_task
(name)
lm-eval-harness/lm_eval/api/registry.py:48
Functionrelu_bwd
(g, x)
based/ops/activations.py:92
Functionrelu_grad
(x)
based/ops/triton/k_activations.py:83
Functionremap_state_dict_megatron
(state_dict, config)
based/models/transformer/gpt.py:961
Functionremove_prefix
(text: str, prefix: str)
lm-eval-harness/lm_eval/models/local_utils/jrt_utils.py:23
Methodreset
(self)
train/src/metrics/num_tokens.py:33
Functionresolve_user_path
(path: str)
lm-eval-harness/lm_eval/models/local_utils/jrt_utils.py:11
Methodrestrict
(x)
train/src/tasks/decoders.py:92
Functionretry_on_specific_exceptions
Retry on an LLM Provider's rate limit error with exponential backoff For example, to use for OpenAI, do the following: ``` from openai imp
lm-eval-harness/lm_eval/models/utils.py:315
Functionrms_norm_ref
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
based/ops/triton/layer_norm.py:74
Functionrms_norm_ref
(x, weight, bias, residual=None, eps=1e-6, prenorm=False, upcast=False)
based/models/mixers/mamba/ops/triton/layernorm.py:35
Functionrms_norm_ref
(x, weight, bias, residual=None, eps=1e-6, prenorm=False, upcast=False)
synthetic/zoology/mixers/mamba_ssm/triton/layernorm.py:35
Functionrms_norm_ref
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
train/src/ops/layer_norm.py:74
Functionrotary_kernel
( OUT, # Pointers to matrices X, COS, SIN, CU_SEQLENS, SEQLEN_OFFSETS, # this could
based/ops/triton/rotary.py:21
Functionrun
(new_input_ids, new_position_ids, seqlen)
based/generation.py:732
Functionrun
(new_input_ids, new_position_ids, seqlen)
based/models/mixers/mamba/utils/generation.py:366
Functionrun
(new_input_ids, new_position_ids, seqlen)
train/src/generation.py:815
Functionrun_inference_one_model
( model_args: dict, sampling_params, requests: List[List[int]] )
lm-eval-harness/lm_eval/models/vllm_causallms.py:30
Methodsameuntil_chunks
(xs, size)
lm-eval-harness/lm_eval/models/openai_completions.py:275
Methodsample
TODO: this should return approximately class-balanced samples from our fewshot examples. TODO: what order should they be in? maybe ra
lm-eval-harness/lm_eval/api/samplers.py:87
Methodsample
lm-eval-harness/lm_eval/api/samplers.py:97
Methodsave_checkpoint
Save model/training states as a checkpoint file through state-dump and file-write. Args: checkpoint: dict containing model and tra
based/utils/ddp_zero1.py:77
Methodsave_checkpoint
Save model/training states as a checkpoint file through state-dump and file-write. Args: checkpoint: dict containing model and tra
based/utils/ddp_zero2.py:114
Methodsave_checkpoint
Save model/training states as a checkpoint file through state-dump and file-write. Args: checkpoint: dict containing model and tra
train/src/utils/ddp_zero2.py:114
Methodsave_contamination_ngrams
(self, filename: str)
lm-eval-harness/lm_eval/decontamination/janitor.py:139
Methodsave_pretrained
Minimal implementation of save_pretrained for MambaLMHeadModel. Save the model and its configuration file to a directory.
based/models/mamba.py:290
Methodsave_pretrained
Minimal implementation of save_pretrained for MambaLMHeadModel. Save the model and its configuration file to a directory.
based/models/mixers/mamba/modules/models/mixer_seq_simple.py:248
Methodselect_majority
(resp)
lm-eval-harness/lm_eval/filters/selection.py:47
Functionselective_scan_ref
u: r(B D L) delta: r(B D L) A: c(D N) or r(D N) B: c(D N) or r(B N L) or r(B N 2L) or r(B G N L) or (B G N L) C: c(D N) or r(B N
based/models/mixers/mamba/ops/selective_scan_interface.py:91
Functionselective_scan_ref
u: r(B D L) delta: r(B D L) A: c(D N) or r(D N) B: c(D N) or r(B N L) or r(B N 2L) or r(B G N L) or (B G N L) C: c(D N) or r(B N
synthetic/zoology/mixers/mamba_ssm/selective_scan_interface.py:86
Functionselective_state_update
Argument: state: (batch, dim, dstate) x: (batch, dim) dt: (batch, dim) A: (dim, dstate) B: (batch, dstate
based/models/triton/based_updated.py:73
Functionselective_state_update
Argument: state: (batch, dim, dstate) x: (batch, dim) dt: (batch, dim) A: (dim, dstate) B: (batch, dstate
synthetic/zoology/mixers/mamba_ssm/triton/selective_state_update.py:99
Functionselective_state_update_ref
Argument: kv_state: (batch, d_model, dstate) k_state: (batch, d_state) q: (batch, d_model) k: (batch, d_model)
based/models/triton/based_updated.py:126
Functionselective_state_update_ref
Argument: state: (batch, dim, dstate) x: (batch, dim) dt: (batch, dim) A: (dim, dstate) B: (batch, dstate
based/models/mixers/mamba/ops/triton/selective_state_update.py:157
Functionselective_state_update_ref
Argument: state: (batch, dim, dstate) x: (batch, dim) dt: (batch, dim) A: (dim, dstate) B: (batch, dstate
synthetic/zoology/mixers/mamba_ssm/triton/selective_state_update.py:157
Functionset_affinity
(gpu_id, nproc_per_node, mode='socket')
based/utils/gpu_affinity.py:127
Functionset_affinity
(gpu_id, nproc_per_node, mode='socket')
train/src/utils/gpu_affinity.py:127
Methodset_doc_idx
(self, doc_idx_)
train/src/datamodules/datasets/indexed_dataset.py:557
Methodset_input_embeddings
(self, value)
synthetic/zoology/mixers/gla.py:247
Methodset_output_embeddings
(self, new_embeddings)
synthetic/zoology/mixers/gla.py:253
Methodsetup
(self, trainer: Trainer, pl_module: LightningModule, stage=None)
train/src/callbacks/gpu_affinity.py:39
Methodsetup
(self, stage=None)
train/src/datamodules/t5_data.py:90
Methodsetup
(self, stage=None)
train/src/datamodules/language_modeling_neox.py:90
Methodsetup
(self, stage=None)
train/src/datamodules/language_modeling_hf.py:86
Methodshared_step
(self, batch: Any, batch_idx: int, phase='train')
train/src/tasks/seq.py:252
Methodshared_step
(self, batch: Any, batch_idx: int, phase='train')
train/src/tasks/seq_hf.py:262
Methodshould_decontaminate
(self)
lm-eval-harness/lm_eval/api/task.py:984
Methodshould_decontaminate
(self)
lm-eval-harness/lm_eval/tasks/based_triviaqa/task.py:57
Methodshould_decontaminate
(self)
lm-eval-harness/lm_eval/tasks/based_nq/task.py:38
Methodshould_decontaminate
(self)
lm-eval-harness/lm_eval/tasks/based_drop/task.py:39
Methodshould_decontaminate
(self)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:140
Functionsimple_evaluate
Instantiate and evaluate a model on a list of tasks. :param model: Union[str, LM] Name of model or LM object, see lm_eval.models.get_mode
lm-eval-harness/lm_eval/evaluator.py:24
Methodsizes
(self)
train/src/datamodules/datasets/indexed_dataset.py:458
Methodsizes
(self)
train/src/datamodules/datasets/indexed_dataset.py:547
Functionsplit_answers
(doc)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:29
Methodsplit_train_val
Randomly split self.dataset_train into a new (self.dataset_train, self.dataset_val) pair.
train/src/datamodules/base.py:202
Functionsquad_em_agg
(items)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:84
Functionsquad_f1_agg
(items)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:104
Methodstate_dict
(self)
train/src/datamodules/fault_tolerant_sampler.py:26
Methodstate_dict
(self)
train/src/datamodules/fault_tolerant_sampler.py:72
Methodstate_size
(self, sequence_length: int)
synthetic/zoology/model.py:227
Methodstate_size
(self, sequence_length: int)
synthetic/zoology/mixers/slide_attn.py:64
Methodstate_size
(self, sequence_length: int)
synthetic/zoology/mixers/base_conv.py:66
Methodstate_size
(self, sequence_length: int=2048)
synthetic/zoology/mixers/mamba.py:264
Methodstate_size
(self, **kwargs)
synthetic/zoology/mixers/hybrid.py:38
Methodstate_size
(self, sequence_length: int=2048)
synthetic/zoology/mixers/hyena.py:360
Methodstate_size
(self, batch_size: int=1, sequence_length: int=2048)
synthetic/zoology/mixers/attention.py:77
Methodstate_size
(self, **kwargs)
synthetic/zoology/mixers/convolution.py:98
Methodstate_size
(self, sequence_length: int)
synthetic/zoology/mixers/convolution.py:145
Methodstate_size
(self, sequence_length: int)
synthetic/zoology/mixers/convolution.py:261
Methodstate_size
(self, sequence_length: int=2048)
synthetic/zoology/mixers/based.py:231
Methodstate_size
(self, sequence_length: int=2048)
synthetic/zoology/mixers/jrt_based.py:240
Functionstderr_for_metric
(metric, bootstrap_iters)
lm-eval-harness/lm_eval/api/metrics.py:412
Methodstep
(self, x, state=None)
train/src/tasks/decoders.py:139
Methodsupports_prefetch
(self)
train/src/datamodules/datasets/indexed_dataset.py:223
Methodsupports_prefetch
(self)
train/src/datamodules/datasets/indexed_dataset.py:234
Methodsupports_prefetch
(self)
train/src/datamodules/datasets/indexed_dataset.py:561
Functionsync_workers
Yields distributed rank and synchronizes all workers on exit.
based/utils/distributed.py:105
Functionsync_workers
Yields distributed rank and synchronizes all workers on exit.
train/src/utils/distributed.py:105
FunctionsystemGetDriverVersion
()
based/utils/gpu_affinity.py:12
FunctionsystemGetDriverVersion
()
train/src/utils/gpu_affinity.py:12
Methodtask_index
(self)
lm-eval-harness/lm_eval/tasks/__init__.py:64
Functionter
Translation Error Rate is an error metric for machine translation that measures the number of edits required to change a system output into one
lm-eval-harness/lm_eval/api/metrics.py:104
Functionter_fn
(items)
lm-eval-harness/lm_eval/api/metrics.py:272
Methodtest_dataloader
The test dataloader
train/src/datamodules/t5_data.py:103
Methodtest_dataloader
The test dataloader
train/src/datamodules/language_modeling_neox.py:105
Methodtest_dataloader
The test dataloader
train/src/datamodules/language_modeling_hf.py:276
Methodtest_step
(self, batch: Any, batch_idx: int)
train/src/tasks/seq.py:142
Methodtest_step
(self, batch: Any, batch_idx: int)
train/src/tasks/seq_hf.py:145
Methodto_dict
(self)
based/models/mamba.py:48
Methodtok_decode
(self, tokens: List[int])
lm-eval-harness/lm_eval/models/anthropic_llms.py:144
Methodtok_decode
(self, tokens)
lm-eval-harness/lm_eval/models/textsynth.py:94
Methodtok_decode
(self, tokens: List[int])
lm-eval-harness/lm_eval/models/openai_completions.py:177
← previousnext →1,601–1,700 of 1,739, ranked by callers