MCPcopy Create free account

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

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

↓ 2 callersMethodfilter_rev
(self, l: int, *args, **kwargs)
synthetic/zoology/mixers/convolution.py:234
↓ 2 callersMethodfit
(self)
synthetic/zoology/train.py:150
↓ 2 callersFunctionflatten
Flatten a multi-level nested collection of dictionaries and lists into a flat dictionary. The function traverses nested dictionaries and
synthetic/zoology/utils.py:39
↓ 2 callersFunctionflatten
Flatten a multi-level nested collection of dictionaries and lists into a flat dictionary. The function traverses nested dictionaries and
synthetic/zoology/analysis/utils.py:7
↓ 2 callersFunctionflatten_dict
Flatten a multi-level nested collection of dictionaries and lists into a flat dictionary. The function traverses nested dictionaries and
lm-eval-harness/lm_eval/models/local_utils/jrt_utils.py:51
↓ 2 callersFunctionform_ngrams
(sequence: Iterator[T], n: int)
lm-eval-harness/lm_eval/decontamination/janitor.py:24
↓ 2 callersMethodfrom_config
Loads a data segment. This function checks if a cache directory is available and if the data is already cached. If the data
synthetic/zoology/data/utils.py:29
↓ 2 callersFunctionfused_mlp_func
( x: Tensor, weight1: Tensor, weight2: Tensor, bias1: Optional[Tensor] = None, bias2: Opti
based/ops/fused_dense.py:475
↓ 2 callersFunctionget_alibi_slopes
(nheads)
based/models/mixers/mha.py:37
↓ 2 callersMethodget_chunks
Divides an iterable into chunks of specified size or based on a given function. Useful for batching Parameters: - it
lm-eval-harness/lm_eval/models/utils.py:478
↓ 2 callersMethodget_config
(self, key: str)
lm-eval-harness/lm_eval/api/task.py:541
↓ 2 callersFunctionget_dtype
Converts `dtype` from `str` to torch.dtype when possible. Does not use an instantiated HF AutoConfig
lm-eval-harness/lm_eval/models/utils.py:196
↓ 2 callersMethodget_grouped
(self)
lm-eval-harness/lm_eval/models/utils.py:107
↓ 2 callersFunctionget_logits
(input_ids, inference_params)
based/generation.py:144
↓ 2 callersFunctionget_logits
(input_ids, inference_params)
train/src/generation.py:151
↓ 2 callersFunctionget_overlaps_dump_path
(task_name, task_set, ngrams_n_size, limit)
lm-eval-harness/lm_eval/decontamination/decontaminate.py:50
↓ 2 callersFunctionget_slopes_power_of_2
(nheads)
based/models/mixers/mha.py:38
↓ 2 callersFunctionget_target_sample_len
train/src/datamodules/neox_utils/helpers.cpp:262
↓ 2 callersFunctionget_thread_siblings_list
()
based/utils/gpu_affinity.py:113
↓ 2 callersFunctionget_thread_siblings_list
()
train/src/utils/gpu_affinity.py:113
↓ 2 callersMethodgguf_completion
( self, context, continuation=None, stop=None, retries=3, delay=5, **kwargs )
lm-eval-harness/lm_eval/models/gguf.py:46
↓ 2 callersFunctiongroup_parameters_for_optimizer
Set weight_decay=0.0 for parameters in model.no_weight_decay, for parameters with attribute _no_weight_decay==True, for bias parameters if bias_we
train/src/optim/param_grouping.py:15
↓ 2 callersMethodhas_test_docs
(self)
lm-eval-harness/lm_eval/api/task.py:897
↓ 2 callersMethodhas_training_docs
Whether the task has a training set
lm-eval-harness/lm_eval/api/task.py:262
↓ 2 callersMethodhas_validation_docs
(self)
lm-eval-harness/lm_eval/api/task.py:891
↓ 2 callersFunctionkey_mapping_attn
(key)
based/models/transformer/gpt.py:949
↓ 2 callersFunctionkey_mapping_ln
(key)
based/models/transformer/gpt.py:920
↓ 2 callersFunctionkey_mapping_mlp
(key)
based/models/transformer/gpt.py:934
↓ 2 callersFunctionkey_mapping_pos_emb
(key)
based/models/transformer/gpt.py:906
↓ 2 callersFunctionlast_modification_time
Including files / directory 1-level below the path
train/src/train.py:98
↓ 2 callersFunctionload_checkpoint
(path, device='cpu')
train/src/utils/checkpoint.py:8
↓ 2 callersFunctionload_state_dict_hf
(model_name, device=None, dtype=None)
based/models/mixers/mamba/utils/hf.py:14
↓ 2 callersFunctionmake_table
Generate table of results.
lm-eval-harness/lm_eval/utils.py:217
↓ 2 callersFunctionmodify_logits_for_top_k_filtering
Set the logits for none top-k values to -inf. Done in-place.
based/generation.py:40
↓ 2 callersFunctionmodify_logits_for_top_k_filtering
Set the logits for none top-k values to -inf. Done in-place.
train/src/generation.py:45
↓ 2 callersFunctionmodify_logits_for_top_p_filtering
Set the logits for none top-p values to -inf. Done in-place.
based/models/mixers/mamba/utils/generation.py:47
↓ 2 callersMethodparallel_forward
(self, x, q, k, v, k_enc=None, v_enc=None, mask=None)
based/models/mixers/prefix_linear_attention.py:193
↓ 2 callersMethodparallel_forward
(self, x: torch.Tensor, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, decay: torch.Tensor=None, impl_choi
based/models/mixers/linear_attention.py:185
↓ 2 callersMethodpost_init
(self)
synthetic/zoology/mixers/gla.py:38
↓ 2 callersMethodprocess_dataset
(self)
train/src/datamodules/language_modeling_hf.py:97
↓ 2 callersMethodprocess_results
Take a single document and the LM results and evaluates, returning a dict where keys are the names of submetrics and values are the values of
lm-eval-harness/lm_eval/api/task.py:511
↓ 2 callersMethodread_data
(self, path)
train/src/datamodules/datasets/indexed_dataset.py:168
↓ 2 callersFunctionsample
Sample from top-k logits. Arguments: logits: Tensor of shape (batch_size, vocab_size)
based/generation.py:64
↓ 2 callersFunctionsample
Sample from top-k logits. Arguments: logits: Tensor of shape (batch_size, vocab_size)
train/src/generation.py:69
↓ 2 callersFunctionsample_speculative
Algorithm 1 from [1] [1] Fast Inference from Transformers via Speculative Decoding Yaniv Leviathan, Matan Kalman, Yossi Matias https://arx
based/generation.py:208
↓ 2 callersFunctionsample_speculative
Algorithm 1 from [1] [1] Fast Inference from Transformers via Speculative Decoding Yaniv Leviathan, Matan Kalman, Yossi Matias https://arx
train/src/generation.py:219
↓ 2 callersFunctionsample_stddev
(arr)
lm-eval-harness/lm_eval/api/metrics.py:207
↓ 2 callersFunctionsample_tokens
(logits, inference_params)
based/generation.py:168
↓ 2 callersFunctionsample_tokens
(logits, inference_params)
based/models/mixers/mamba/utils/generation.py:184
↓ 2 callersFunctionsample_tokens
(logits, inference_params)
train/src/generation.py:175
↓ 2 callersFunctionselective_scan_fn
if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state is
based/models/mixers/mamba/ops/selective_scan_interface.py:82
↓ 2 callersFunctionselective_scan_fn
if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state is
synthetic/zoology/mixers/mamba_ssm/selective_scan_interface.py:77
↓ 2 callersMethodserialize_function
Serializes a given function or string. If 'keep_callable' is True, the original callable is returned. Otherwise, attempts to return t
lm-eval-harness/lm_eval/api/task.py:148
↓ 2 callersMethodset_config
Set or update the configuration for a given key.
lm-eval-harness/lm_eval/api/task.py:630
↓ 2 callersFunctionset_socket_unique_affinity
(gpu_id, nproc_per_node, mode)
based/utils/gpu_affinity.py:80
↓ 2 callersFunctionset_socket_unique_affinity
(gpu_id, nproc_per_node, mode)
train/src/utils/gpu_affinity.py:80
↓ 2 callersFunctionshard_gatedmlp_fc1_dim
(state_dict, key)
based/models/transformer/gpt.py:707
↓ 2 callersFunctionshard_qkv_headdim
(state_dict, key)
based/models/transformer/gpt.py:716
↓ 2 callersFunctionshould_stop
(current_token, inference_params)
based/generation.py:176
↓ 2 callersFunctionshould_stop
(current_token, inference_params)
train/src/generation.py:183
↓ 2 callersFunctionstable_log_sigmoid
(x)
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gk.py:14
↓ 2 callersFunctionstable_log_sigmoid
(x)
based/models/triton/kernels/inter_chunk_contribution/preprocess_cumsum_gv.py:14
↓ 2 callersMethodstep
(self, x: torch.Tensor, state: torch.Tensor)
based/models/mixers/convolution.py:84
↓ 2 callersMethodstep
(self, hidden_states, conv_state, ssm_state)
based/models/mixers/mamba/modules/mamba_simple.py:207
↓ 2 callersFunctionstop_sequences_criteria
( tokenizer: transformers.PreTrainedTokenizer, stop_sequences: List[str], initial_decoder_input_le
lm-eval-harness/lm_eval/models/utils.py:246
↓ 2 callersFunctiontanh
(x)
based/ops/triton/k_activations.py:56
↓ 2 callersMethodtest_dataloader
(self, **kwargs)
train/src/datamodules/base.py:226
↓ 2 callersFunctiontextsynth_completion
Query TextSynth API for completion. Retry with back-off until they respond.
lm-eval-harness/lm_eval/models/textsynth.py:28
↓ 2 callersMethodtie_weights
(self)
train/src/models/gpt.py:636
↓ 2 callersFunctionto_float_maybe
(x)
based/utils/ema.py:13
↓ 2 callersFunctionto_float_maybe
(x)
train/src/utils/ema.py:13
↓ 2 callersMethodtok_decode
(self, tokens)
lm-eval-harness/lm_eval/models/neuron_optimum.py:385
↓ 2 callersMethodtok_decode
(self, tokens)
lm-eval-harness/lm_eval/models/huggingface.py:724
↓ 2 callersMethodtraining_docs
:return: Iterable[obj] A iterable of any object, that doc_to_text can handle
lm-eval-harness/lm_eval/api/task.py:276
↓ 2 callersFunctiontriton_linear_act
Compute e = activation(x @ weight.T + bias). This wrapper kicks the `kernel_fwd` Triton kernel :param x: input tensor :param weight:
based/ops/triton/linear.py:258
↓ 2 callersMethodupdate
Update currently maintained parameters. Call this every time the parameters are updated, such as the result of the `optimizer
based/utils/ema.py:76
↓ 2 callersFunctionweighted_mean
(items)
lm-eval-harness/lm_eval/api/metrics.py:328
↓ 2 callersFunctionword_ngrams
Splits a string into ngram words
lm-eval-harness/lm_eval/decontamination/janitor.py:41
↓ 1 callersFunction__best_fitting_dtype
(vocab_size=None)
train/src/datamodules/datasets/indexed_dataset.py:28
↓ 1 callersMethod__init__
:param engine: str OpenAI API engine (e.g. gpt-3.5-turbo-instruct) :param truncate: bool Truncate input if t
lm-eval-harness/lm_eval/models/openai_completions.py:81
↓ 1 callersMethod__init__
(self, hidden_size, eps=1e-5, device=None, dtype=None)
based/ops/rms_norm.py:125
↓ 1 callersMethod__init__
( self, d_model: int, n_layer: int, vocab_size: int, ssm_cfg=None,
based/models/mamba.py:117
↓ 1 callersMethod__init__
( self, input_dim: int, scale_dim: Optional[int] = None, ep
based/models/mixers/prefix_linear_attention.py:22
↓ 1 callersMethod__init__
( self, d_model: int, l_max: int, kernel_size: int=3, layer_idx: int=N
based/models/mixers/convolution.py:167
↓ 1 callersMethod__init__
( self, d_model, d_state=16, d_conv=4, expand=2, dt_rank="auto
based/models/mixers/mamba/modules/mamba_simple.py:30
↓ 1 callersMethod__init__
( self, d_model: int, n_layer: int, vocab_size: int, ssm_cfg=None,
based/models/mixers/mamba/modules/models/mixer_seq_simple.py:87
↓ 1 callersMethod__init__
( self, d_model: int, block_size=256, bias=True,
synthetic/zoology/mixers/slide_attn.py:36
↓ 1 callersMethod__init__
( self, d_model: int, num_heads: int=1, bias: bool=True, dropout: floa
synthetic/zoology/mixers/attention.py:43
↓ 1 callersMethod__init__
( self, input_dim: int, output_dim: int=None, init: str="randn", lea
synthetic/zoology/mixers/feature_maps/all_poly.py:14
↓ 1 callersMethod__init__
(self, log: str = "gradients", log_freq: int = 100)
train/src/callbacks/wandb_callbacks.py:40
↓ 1 callersMethod__init__
For prenorm=True, this Block has a slightly different structure compared to a regular prenorm Transformer block. The standard
train/src/models/block.py:37
↓ 1 callersMethod__init__
( self, name, data_prefix, documents, indexed_dataset, num_sam
train/src/datamodules/language_modeling_neox.py:234
↓ 1 callersMethod__init__
(self, *args, generator=None, **kwargs)
train/src/datamodules/fault_tolerant_sampler.py:11
↓ 1 callersFunction_build_doc_idx
Build an array with length = number-of-epochs * number-of-documents. Each index is mapped to a corresponding document.
train/src/datamodules/language_modeling_neox.py:509
↓ 1 callersFunction_build_index_mappings
Build doc-idx, sample-idx, and shuffle-idx. doc-idx: is an array (ordered) of documents to be used in training. sample-idx: is the start docum
train/src/datamodules/language_modeling_neox.py:387
↓ 1 callersFunction_build_shuffle_idx
Build the range [0, size) and shuffle.
train/src/datamodules/language_modeling_neox.py:520
↓ 1 callersMethod_config_is_group
(self, config)
lm-eval-harness/lm_eval/tasks/__init__.py:97
↓ 1 callersMethod_create_model
Initializes an HF or HF-compatible PreTrainedModel from scratch inside HFLM, using the kwargs passed into self.__init__(). A
lm-eval-harness/lm_eval/models/huggingface.py:469
↓ 1 callersMethod_create_tokenizer
Helper method during initialization. Create a tokenizer object corresponding to the correct tokenizer for value of `pretrain
lm-eval-harness/lm_eval/models/huggingface.py:570
↓ 1 callersFunction_download_metric
()
lm-eval-harness/lm_eval/tasks/scrolls/task.py:44
← previousnext →201–300 of 1,739, ranked by callers