MCPcopy Create free account

hub / github.com/OpenSparseLLMs/MoM / functions

Functions861 in github.com/OpenSparseLLMs/MoM

↓ 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 callersFunctionreconstruct
Reconstruct and mix transformed outputs back into the original input sequence shape. Key operations: 1. Reshapes and transposes `transfo
mom_naive/layers/mom_gsa.py:122
↓ 2 callersFunctionreconstruct
Reconstruct and mix transformed outputs back into the original input sequence shape. Key operations: 1. Reshapes and transposes `transfo
mom_naive/layers/mom_gated_deltanet.py:129
↓ 2 callersFunctionsample_stddev
(arr)
lm-eval-harness/lm_eval/api/metrics.py:207
↓ 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 callersFunctionsizeof_fmt
(num, suffix='B')
benchmarks/benchmark_generation.py:15
↓ 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 callersFunctiontextsynth_completion
Query TextSynth API for completion. Retry with back-off until they respond.
lm-eval-harness/lm_eval/models/textsynth.py:28
↓ 2 callersFunctiontime_fwd_bwd
(func, *args, **kwargs)
benchmarks/ops/benchmark_delta_rule.py:18
↓ 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:726
↓ 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 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 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_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:471
↓ 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:572
↓ 1 callersFunction_download_metric
()
lm-eval-harness/lm_eval/tasks/scrolls/task.py:44
↓ 1 callersFunction_drop_duplicates_in_input
(untokenized_dataset)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:77
↓ 1 callersMethod_encode_pair
( self, context: str, continuation: str )
lm-eval-harness/lm_eval/models/vllm_causallms.py:197
↓ 1 callersMethod_encode_pair
(self, context, continuation)
lm-eval-harness/lm_eval/models/neuron_optimum.py:450
↓ 1 callersMethod_encode_pair
( self, context: str, continuation: str )
lm-eval-harness/lm_eval/models/openai_completions.py:180
↓ 1 callersMethod_encode_pair
( self, context: str, continuation: str, decode_mode="default" )
lm-eval-harness/lm_eval/models/huggingface.py:814
↓ 1 callersFunction_fn
(predictions, references)
lm-eval-harness/lm_eval/tasks/super_glue/cb/t5_utils.py:25
↓ 1 callersFunction_get_accelerate_args
Returns the kwargs needed to apply `accelerate` in `AutoModel.from_pretrained`.
lm-eval-harness/lm_eval/models/huggingface.py:44
↓ 1 callersMethod_get_backend
Helper method during initialization. Determines the backend ("causal" (decoder-only) or "seq2seq" (encoder-decoder)) model ty
lm-eval-harness/lm_eval/models/huggingface.py:407
↓ 1 callersMethod_get_config
( self, pretrained: str, revision: str = "main", trust_remote_code: bool = Fal
lm-eval-harness/lm_eval/models/huggingface.py:459
↓ 1 callersMethod_get_prune_text
(self, sample)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:154
↓ 1 callersMethod_get_task_and_group
Creates an dictionary of tasks index with the following metadata, - `type`, that can be either `task`, `python_task`, or `group`.
lm-eval-harness/lm_eval/tasks/__init__.py:265
↓ 1 callersMethod_load_individual_task_or_group
( self, name_or_config: Union[str, dict] = None, parent_name: str = None,
lm-eval-harness/lm_eval/tasks/__init__.py:132
↓ 1 callersMethod_make_compute_metrics
(self, value)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:196
↓ 1 callersMethod_model_call
get logits for the entire sequence :param input_ids: torch.Tensor A torch tensor of shape [batch, sequence_cont]
lm-eval-harness/lm_eval/models/neuron_optimum.py:389
↓ 1 callersMethod_model_generate
(self, context, max_length, stop, **generation_kwargs)
lm-eval-harness/lm_eval/models/neuron_optimum.py:416
↓ 1 callersMethod_name_is_group
(self, name)
lm-eval-harness/lm_eval/tasks/__init__.py:82
↓ 1 callersFunction_normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
lm-eval-harness/lm_eval/tasks/super_glue/record/t5_utils.py:53
↓ 1 callersMethod_parse_logprobs
Process logprobs and tokens. :param tokens: list Input tokens (potentially left-truncated) :param outputs: RequestOutput
lm-eval-harness/lm_eval/models/vllm_causallms.py:393
↓ 1 callersMethod_process_alias
(self, config, group=None)
lm-eval-harness/lm_eval/tasks/__init__.py:123
↓ 1 callersMethod_process_doc
(self, doc)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:377
↓ 1 callersMethod_select_cont_toks
(self, logits, contlen=None, inplen=None)
lm-eval-harness/lm_eval/models/neuron_optimum.py:440
↓ 1 callersMethod_select_cont_toks
(self, logits, contlen=None, inplen=None)
lm-eval-harness/lm_eval/models/huggingface.py:796
↓ 1 callersFunction_squad_metric
(predictions, references)
lm-eval-harness/lm_eval/tasks/based_squadv2/task.py:9
↓ 1 callersFunction_squad_metric
(predictions, references)
lm-eval-harness/lm_eval/tasks/based_triviaqa/task.py:11
↓ 1 callersFunction_wsc_inputs
(x)
lm-eval-harness/lm_eval/tasks/super_glue/wsc/t5_utils.py:9
↓ 1 callersMethodaggregation
:returns: {str: [metric_score] -> float} A dictionary where keys are the names of submetrics and values are functions
lm-eval-harness/lm_eval/api/task.py:524
↓ 1 callersFunctionanthropic_completion
Wrapper function around the Anthropic completion API client with exponential back-off in case of RateLimitError. params: client: anth
lm-eval-harness/lm_eval/models/anthropic_llms.py:14
↓ 1 callersMethodapply_filters
Iterates over FilterEnsembles and applies them to instances
lm-eval-harness/lm_eval/api/task.py:615
↓ 1 callersMethodbatchify
Split dataset into batches of exactly block_size length
evals/ppl.py:48
↓ 1 callersFunctionbootstrap_stderr
(f, xs, iters)
lm-eval-harness/lm_eval/api/metrics.py:383
↓ 1 callersMethodbuild_all_requests
Build a set of Instances for a task, and store them in task.instances
lm-eval-harness/lm_eval/api/task.py:434
↓ 1 callersMethodclean_cpp
(self, dirty_string: str)
lm-eval-harness/lm_eval/decontamination/janitor.py:200
↓ 1 callersMethodclean_python
(self, dirty_string: str)
lm-eval-harness/lm_eval/decontamination/janitor.py:218
↓ 1 callersFunctioncollect_results
()
lm-eval-harness/prompt_scripts/collect_results.py:37
↓ 1 callersMethodcommit
(self)
lm-eval-harness/lm_eval/decontamination/archiver.py:43
↓ 1 callersFunctioncompletion
()
lm-eval-harness/lm_eval/models/anthropic_llms.py:61
↓ 1 callersFunctioncompletion
()
lm-eval-harness/lm_eval/models/textsynth.py:43
↓ 1 callersFunctioncompletion
()
lm-eval-harness/lm_eval/models/openai_completions.py:68
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_squadv2/task.py:148
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_fda/task.py:102
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_triviaqa/task.py:165
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_swde/task.py:130
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_nq/task.py:112
↓ 1 callersFunctioncontains_score
(prediction: str, labels: List[str])
lm-eval-harness/lm_eval/tasks/based_drop/task.py:113
↓ 1 callersMethodcount_bytes
Used for byte-level perplexity metrics in rolling loglikelihood
lm-eval-harness/lm_eval/api/task.py:545
↓ 1 callersMethodcount_bytes
(cls, doc)
lm-eval-harness/lm_eval/api/task.py:1476
↓ 1 callersMethodcount_words
Downstream loglikelihood_rolling perplexity tasks with custom word boundaries should override this!
lm-eval-harness/lm_eval/api/task.py:550
↓ 1 callersMethodcount_words
Downstream tasks with custom word boundaries should override this!
lm-eval-harness/lm_eval/api/task.py:1480
↓ 1 callersMethodcreate_from_arg_string
Creates an instance of the LM class using the given argument string and additional config. Parameters: - arg_string: A strin
lm-eval-harness/lm_eval/api/model.py:118
↓ 1 callersFunctioncreate_input
()
lm-eval-harness/lm_eval/tasks/super_glue/wsc/t5_utils.py:19
↓ 1 callersMethodcu2pad
(self, x, cu_seqlens)
mom/layers/mom.py:699
↓ 1 callersFunctiondetect_nan_hook
(grad, name)
training/run.py:84
↓ 1 callersFunctiondivide
Divide the elements from *iterable* into *n* parts, maintaining order. >>> group_1, group_2 = divide([1, 2, 3, 4, 5, 6], 2) >>> l
lm-eval-harness/lm_eval/models/utils.py:264
↓ 1 callersFunctiondoc_to_choice
(doc)
lm-eval-harness/lm_eval/tasks/super_glue/copa/utils.py:20
↓ 1 callersFunctiondoc_to_target
(doc)
lm-eval-harness/lm_eval/tasks/super_glue/copa/utils.py:14
↓ 1 callersFunctiondoc_to_text
(doc)
lm-eval-harness/lm_eval/tasks/super_glue/copa/utils.py:5
↓ 1 callersMethoddoc_to_text
(self, doc)
lm-eval-harness/lm_eval/tasks/scrolls/task.py:186
↓ 1 callersMethoddownload
(self, dataset_kwargs=None)
lm-eval-harness/lm_eval/api/task.py:877
↓ 1 callersMethoddump_config
Returns the config as a dictionary.
lm-eval-harness/lm_eval/api/task.py:624
↓ 1 callersMethodelu
(x)
mom_naive/layers/mom_linear_attn.py:249
↓ 1 callersFunctionevaluate
Instantiate and evaluate a model on a list of tasks. :param lm: obj Language Model :param task_dict: dict[str, Task] Dictiona
lm-eval-harness/lm_eval/evaluator.py:255
↓ 1 callersMethodevaluate
Evaluate perplexity on the entire dataset
evals/ppl.py:114
↓ 1 callersFunctionexecute_config
( model: str, task: str, batch_size: int, limit: int, output_dir: str, context_length:
lm-eval-harness/launch_hf.py:19
↓ 1 callersFunctionexecute_config
( model: str, task: str, batch_size: int, limit: int, output_dir: str, num_fewshot: in
lm-eval-harness/launch_local.py:20
↓ 1 callersFunctionexecute_config
( model: str, task: str, batch_size: int, limit: int, output_dir: str, num_fewshot: in
lm-eval-harness/launch.py:19
↓ 1 callersFunctionexecute_config
( model: str, task: str, batch_size: int, limit: int, output_dir: str, num_fewshot: in
lm-eval-harness/launch_jrt.py:19
↓ 1 callersFunctionf
(*inputs, y, grad)
benchmarks/ops/benchmark.py:54
↓ 1 callersMethodfewshot_docs
:return: Iterable[obj] A iterable of any object, that doc_to_text can handle
lm-eval-harness/lm_eval/api/task.py:297
↓ 1 callersMethodfewshot_examples
(self, k, rnd)
lm-eval-harness/lm_eval/api/task.py:331
↓ 1 callersFunctionfind_test_root
Search upward in the directory tree to a maximum of three layers to find and return the package root (containing the 'tests' folder)
lm-eval-harness/lm_eval/utils.py:294
↓ 1 callersMethodfn
(requests)
lm-eval-harness/lm_eval/api/model.py:198
↓ 1 callersFunctionformat_answer
(query, entity)
lm-eval-harness/lm_eval/tasks/super_glue/record/util.py:15
↓ 1 callersMethodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
mom/layers/mom.py:425
↓ 1 callersFunctiongeneral_detokenize
(string)
lm-eval-harness/lm_eval/utils.py:112
↓ 1 callersMethodgenerate
(self, *args, **kwargs)
mom/models/mom/modeling_mom.py:393
↓ 1 callersFunctionget_aggregation
(name: str)
lm-eval-harness/lm_eval/api/registry.py:151
↓ 1 callersMethodget_cache_hook
(self)
lm-eval-harness/lm_eval/api/model.py:248
↓ 1 callersMethodget_context
(self, doc, num_fewshot)
lm-eval-harness/lm_eval/api/samplers.py:20
↓ 1 callersFunctionget_filter
(filter_name: str)
lm-eval-harness/lm_eval/filters/__init__.py:26
↓ 1 callersFunctionget_git_commit_hash
Gets the git commit hash of your current repo (if it exists). Source: https://github.com/EleutherAI/gpt-neox/blob/b608043be541602170bfcfb8ec9
lm-eval-harness/lm_eval/utils.py:334
← previousnext →101–200 of 861, ranked by callers