MCPcopy Create free account

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

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

↓ 1 callersFunctionlayer_norm_fn
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
based/ops/triton/layer_norm.py:859
↓ 1 callersFunctionload_checkpoint
(path, device='cpu')
train/src/eval.py:28
↓ 1 callersFunctionload_config
Load a config from a wandb run ID. Parameters: run_id (str): A full wandb run id like "hazy-research/attention/159o6asi"
lm-eval-harness/lm_eval/models/local_utils/jrt_utils.py:254
↓ 1 callersMethodload_config
(self, config: Dict)
lm-eval-harness/lm_eval/tasks/__init__.py:262
↓ 1 callersFunctionload_config_hf
(model_name)
train/src/utils/hf.py:9
↓ 1 callersFunctionload_hf_model
(model_name: str, device:str = 'cuda')
lm-eval-harness/lm_eval/models/local_utils/loading.py:79
↓ 1 callersFunctionload_model
Load a model from a wandb run ID. Parameters: run_id (str): A full wandb run id like "hazy-research/attention/159o6asi"
lm-eval-harness/lm_eval/models/local_utils/loading.py:18
↓ 1 callersMethodload_state_dict
(self, checkpoint)
train/src/datamodules/language_modeling_hf.py:293
↓ 1 callersFunctionload_state_dict_hf
(model_name, device=None, dtype=None)
train/src/utils/hf.py:13
↓ 1 callersMethodload_task_or_group
Loads a dictionary of task objects from a list :param task_list: Union[str, list] = None Single string or list of string of task
lm-eval-harness/lm_eval/tasks/__init__.py:240
↓ 1 callersFunctionload_tokenizer
(model_name: str, is_hf: bool=False)
lm-eval-harness/lm_eval/models/local_utils/loading.py:103
↓ 1 callersMethodlog_config
(self, config: TrainConfig)
synthetic/zoology/logger.py:26
↓ 1 callersMethodlog_model
( self, model: LanguageModel, config: TrainConfig )
synthetic/zoology/logger.py:31
↓ 1 callersFunctionlog_predictions
One issue is that this can only be run with trainer.devices=1 right now. So restart with that after training completes. Add resume=Tr
train/src/train.py:28
↓ 1 callersFunctionmain
( model: List[str], task: List[str], batch_size: int, limit: Optional[int], parallelize:
lm-eval-harness/launch_hf.py:72
↓ 1 callersFunctionmain
( model: List[str], task: List[str], batch_size: int, limit: Optional[int], parallelize:
lm-eval-harness/launch_local.py:82
↓ 1 callersFunctionmain
( model: List[str], task: List[str], batch_size: int, limit: Optional[int], parallelize:
lm-eval-harness/launch.py:83
↓ 1 callersFunctionmain
( model: List[str], task: List[str], batch_size: int, limit: Optional[int], parallelize:
lm-eval-harness/launch_jrt.py:81
↓ 1 callersFunctionmain
(python_file, outdir, name: str, parallelize: bool, gpus: str)
synthetic/zoology/launch.py:33
↓ 1 callersFunctionmain
(config: DictConfig)
train/run.py:34
↓ 1 callersFunctionmamba_inner_fn
( xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight, out_proj_weight, out_proj_bias,
based/models/mixers/mamba/ops/selective_scan_interface.py:311
↓ 1 callersFunctionmamba_inner_fn
( xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight, out_proj_weight, out_proj_bias,
synthetic/zoology/mixers/mamba_ssm/selective_scan_interface.py:300
↓ 1 callersMethodmatch_tasks
(self, task_list)
lm-eval-harness/lm_eval/tasks/__init__.py:67
↓ 1 callersFunctionmean_stderr
(arr)
lm-eval-harness/lm_eval/api/metrics.py:212
↓ 1 callersFunctionmini_multiquery_ar
( vocab_size: int, num_examples: int, num_queries: int, input_seq_len: int, seed: int,
synthetic/zoology/data/non_autoreg.py:20
↓ 1 callersMethodmodify_gen_kwargs
(kwargs: dict)
lm-eval-harness/lm_eval/models/vllm_causallms.py:436
↓ 1 callersFunctionmodify_logit_for_repetition_penalty
Apply repetition penalty. See https://arxiv.org/abs/1909.05858 logits: (batch_size, vocab_size) prev_output_tokens: (batch_size, seq_len)
based/models/mixers/mamba/utils/generation.py:63
↓ 1 callersMethodon_train_end
(self, trainer, pl_module)
train/src/callbacks/wandb_callbacks.py:123
↓ 1 callersMethodorthogonal_gaussian
Generate orthogonal Gaussian random features
synthetic/zoology/mixers/feature_maps/performer.py:123
↓ 1 callersMethodoverride_metric
Override the default metrics used for evaluation with custom metrics. Parameters: - metric_name (str): The name of the custo
lm-eval-harness/lm_eval/api/task.py:645
↓ 1 callersMethodparallel_forward
(self, x, q, k, v, k_enc=None, v_enc=None)
synthetic/zoology/mixers/jrt_based.py:209
↓ 1 callersFunctionparse_eval_args
()
lm-eval-harness/lm_eval/__main__.py:49
↓ 1 callersFunctionparse_value
(item)
lm-eval-harness/lm_eval/__main__.py:26
↓ 1 callersFunctionplot
( df: pd.DataFrame, max_seq_len: int = 512, )
synthetic/zoology/analysis/__init__.py:14
↓ 1 callersFunctionplot
( df: pd.DataFrame, metric: str="valid/accuracy", tag: str="", )
synthetic/zoology/analysis/jrt_plot.py:8
↓ 1 callersFunctionprepare_data
(config: DataConfig)
synthetic/zoology/data/utils.py:98
↓ 1 callersFunctionprint_tasks
(task_hierarchy, results, tab=0)
lm-eval-harness/lm_eval/evaluator.py:610
↓ 1 callersMethodprocess_qkv
Get Q, K, V tensors from hidden_states, e.g., by applying projections, positional embeddings, KV cache -> Follow the origina
synthetic/zoology/mixers/based.py:121
↓ 1 callersMethodprocess_qkv
Get Q, K, V tensors from hidden_states, e.g., by applying projections, positional embeddings, KV cache -> Follow the origina
synthetic/zoology/mixers/jrt_based.py:130
↓ 1 callersFunctionprofile_deepspeed
(model, input_size=(3, 224, 224), input_dtype=torch.float32, batch_size=1, detailed=Fals
train/src/utils/flops.py:20
↓ 1 callersFunctionprofile_fvcore
(model, input_size=(3, 224, 224), input_dtype=torch.float32, max_depth=4, batch_size=1, det
train/src/utils/flops.py:35
↓ 1 callersMethodprune
Create a pruned version of a SCROLLS task dataset containing only inputs that are less than `max_tokens` when tokenized by each tokenizer
lm-eval-harness/lm_eval/tasks/scrolls/task.py:157
↓ 1 callersMethodrandom_spans_noise_mask
This function is copy of `random_spans_helper <https://github.com/google-research/text-to-text-transfer-transformer/blob/84f8bcc14b5f2c03de51bd3587609
train/src/datamodules/t5_data.py:256
↓ 1 callersMethodread_index
(self, path)
train/src/datamodules/datasets/indexed_dataset.py:147
↓ 1 callersMethodread_tqdm
(self, update_frequency: int = 10000)
lm-eval-harness/lm_eval/decontamination/archiver.py:110
↓ 1 callersMethodread_tqdm
(self)
lm-eval-harness/lm_eval/decontamination/archiver.py:165
↓ 1 callersMethodrecurrent_forward
(self, x, kv_state, k_state, q, k, v)
based/models/mixers/prefix_linear_attention.py:243
↓ 1 callersMethodrecurrent_forward
Compute linear attention with recurrent view -> Assume q.shape is (b, h, 1, d); k and v.shape are (b, h, l, d)
based/models/mixers/linear_attention.py:275
↓ 1 callersMethodregister_contaminant_cpp
(self, dirt_string)
lm-eval-harness/lm_eval/decontamination/janitor.py:195
↓ 1 callersMethodregister_contaminant_python
(self, dirt_string: str)
lm-eval-harness/lm_eval/decontamination/janitor.py:213
↓ 1 callersFunctionrelu
ReLU_ activation function .. _ReLU: https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html
based/ops/triton/k_activations.py:72
↓ 1 callersFunctionremap_state_dict_hf_gpt2
(state_dict, config)
based/models/transformer/gpt.py:904
↓ 1 callersFunctionremove_articles
(s)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:56
↓ 1 callersFunctionremove_model_prefix
(state_dict)
based/utils/checkpoint.py:68
↓ 1 callersFunctionremove_model_prefix
(state_dict)
train/src/utils/checkpoint.py:68
↓ 1 callersFunctionremove_prefix
(text: str, prefix: str)
train/src/eval.py:22
↓ 1 callersFunctionreplace_punctuation
(s)
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:59
↓ 1 callersMethodreset
(self, max_seqlen, max_batch_size)
based/models/mixers/mamba/utils/generation.py:29
↓ 1 callersMethodreset_parameters
(self)
based/ops/rms_norm.py:133
↓ 1 callersMethodreset_parameters
(self)
based/ops/rms_norm.py:161
↓ 1 callersMethodreset_parameters
(self)
based/ops/layer_norm.py:786
↓ 1 callersMethodreset_parameters
(self)
based/ops/triton/layer_norm.py:940
↓ 1 callersMethodreset_parameters
(self)
based/models/mixers/mamba/ops/triton/layernorm.py:490
↓ 1 callersMethodreset_parameters
(self)
synthetic/zoology/mixers/mamba_ssm/triton/layernorm.py:490
↓ 1 callersMethodreset_parameters
(self)
train/src/ops/layer_norm.py:940
↓ 1 callersMethodrestore
Restore the parameters stored with the `store` method. Useful to validate the model with EMA parameters without affecting the
based/utils/ema.py:141
↓ 1 callersFunctionrms_norm
(x, weight, epsilon)
based/ops/rms_norm.py:14
↓ 1 callersFunctionrms_norm_fn
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
based/ops/triton/layer_norm.py:893
↓ 1 callersFunctionrms_norm_fn
(x, weight, bias, residual=None, prenorm=False, residual_in_fp32=False, eps=1e-6)
based/models/mixers/mamba/ops/triton/layernorm.py:477
↓ 1 callersFunctionrms_norm_fn
(x, weight, bias, residual=None, prenorm=False, residual_in_fp32=False, eps=1e-6)
synthetic/zoology/mixers/mamba_ssm/triton/layernorm.py:477
↓ 1 callersFunctionrms_norm_fn
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
train/src/ops/layer_norm.py:893
↓ 1 callersFunctionrun_task_tests
Find the package root and run the tests for the given tasks
lm-eval-harness/lm_eval/utils.py:312
↓ 1 callersFunctionsample
Sample from top-k logits. Arguments: logits: Tensor of shape (batch_size, vocab_size)
based/models/mixers/mamba/utils/generation.py:77
↓ 1 callersMethodsample
Draw `n` samples from our fewshot docs. This method should be overridden by subclasses.
lm-eval-harness/lm_eval/api/samplers.py:66
↓ 1 callersMethodsave_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_zero1.py:77
↓ 1 callersFunctionselective_state_update
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:99
↓ 1 callersFunctionset_affinity
(trainer)
train/src/callbacks/gpu_affinity.py:21
↓ 1 callersMethodset_cache_hook
(self, cache_hook)
lm-eval-harness/lm_eval/api/model.py:150
↓ 1 callersFunctionset_determinism
(seed: int)
synthetic/zoology/utils.py:26
↓ 1 callersFunctionset_single_affinity
(gpu_id)
based/utils/gpu_affinity.py:51
↓ 1 callersFunctionset_single_affinity
(gpu_id)
train/src/utils/gpu_affinity.py:51
↓ 1 callersFunctionset_single_unique_affinity
(gpu_id, nproc_per_node)
based/utils/gpu_affinity.py:57
↓ 1 callersFunctionset_single_unique_affinity
(gpu_id, nproc_per_node)
train/src/utils/gpu_affinity.py:57
↓ 1 callersFunctionset_socket_affinity
(gpu_id)
based/utils/gpu_affinity.py:45
↓ 1 callersFunctionset_socket_affinity
(gpu_id)
train/src/utils/gpu_affinity.py:45
↓ 1 callersFunctionshard_state_dict_tp
Convert the state_dict of a standard GPT model to the state_dict of a GPT model with tensor parallel. This function modifies state_dict in pl
based/models/transformer/gpt.py:672
↓ 1 callersFunctionshould_stop
(current_token, inference_params)
based/models/mixers/mamba/utils/generation.py:192
↓ 1 callersFunctionsimple_parse_args_string
Parses something like args1=val1,arg2=val2 Into a dictionary
lm-eval-harness/lm_eval/utils.py:69
↓ 1 callersFunctionsinusoidal_init_
tensor: (max_len, d_model)
based/models/modules/seq_common.py:148
↓ 1 callersFunctionsinusoidal_init_
tensor: (max_len, d_model)
train/src/models/modules/seq_common.py:148
↓ 1 callersFunctionsliding_window_additions
(value, config, layer_idx, process_group, device)
train/src/models/gpt.py:113
↓ 1 callersFunctionsplit_indices
Splits a string on whitespaces and records the indices of each in the original string. @:return generator((word, (start_idx, end_idx)), ...)
lm-eval-harness/lm_eval/decontamination/janitor.py:73
↓ 1 callersFunctionsqrelu_bwd
(g, x)
based/ops/activations.py:103
↓ 1 callersFunctionsquared_relu
Squared ReLU activation, as proposed in the Primer_ paper. .. _Primer: https://arxiv.org/abs/2109.08668
based/ops/triton/k_activations.py:93
↓ 1 callersFunctionsquared_relu_grad
(x)
based/ops/triton/k_activations.py:104
↓ 1 callersMethodstep
(self, epoch=None)
train/src/optim/timm_lr_scheduler.py:18
↓ 1 callersMethodstep
(self, batch: Any, is_train=True)
train/src/tasks/seq.py:112
↓ 1 callersMethodstep
(self, batch: Any, is_train=True, batch_idx=None)
train/src/tasks/seq.py:190
↓ 1 callersMethodstep
(self, batch: Any, is_train=True)
train/src/tasks/seq_hf.py:115
↓ 1 callersMethodstep
(self, batch: Any, is_train=True, batch_idx=None)
train/src/tasks/seq_hf.py:193
← previousnext →501–600 of 1,739, ranked by callers