Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/allenai/OLMo
/ functions
Functions
3,821 in github.com/allenai/OLMo
⨍
Functions
3,821
◇
Types & classes
799
↳
Endpoints
9
↓ 2 callers
Method
_get_path
(self, bucket_name: str, key: str)
scripts/storage_cleaner.py:415
↓ 2 callers
Method
_get_shard_placement_and_rank_sizes
( self, shards_metadata: List[ShardMetadata], world_size: int )
olmo/checkpoint.py:1082
↓ 2 callers
Function
_get_wandb_path
(checkpoint_dir: str, run_dir: str)
scripts/storage_cleaner.py:1074
↓ 2 callers
Function
_get_wandb_path_from_run
(wandb_run)
scripts/storage_cleaner.py:1030
↓ 2 callers
Method
_guess_label
(self, instance: Dict[str, Any])
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/eleuther.py:104
↓ 2 callers
Method
_guess_label
(self, instance: Dict[str, Any])
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/eleuther.py:104
↓ 2 callers
Function
_init_model_and_optim
(config: TrainConfig)
tests/checkpoint_test.py:20
↓ 2 callers
Function
_init_model_and_optim
(config: TrainConfig)
tests/ddp_checkpoint_test.py:20
↓ 2 callers
Method
_is_file
(self, bucket_name: str, key: str)
scripts/storage_cleaner.py:266
↓ 2 callers
Method
_list_entries
( self, directory: PathOrStr, include_files: bool = True, max_file_size: Optional[int] = None )
scripts/storage_cleaner.py:157
↓ 2 callers
Method
_list_entries
( self, directory: str, include_files: bool = True, max_file_size: Optional[int] = None )
scripts/storage_cleaner.py:321
↓ 2 callers
Method
_list_entries
( self, directory: str, include_files: bool = True, max_file_size: Optional[int] = None )
scripts/storage_cleaner.py:468
↓ 2 callers
Function
_lm_loss
(logits, labels)
tests/grad_norm_test.py:17
↓ 2 callers
Method
_load_metadata
( self, load_path: PathOrStr, *, local_cache: Optional[PathOrStr] = None )
olmo/checkpoint.py:1573
↓ 2 callers
Method
_loglikelihood_tokens
(self, requests, disable_tqdm=False)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:224
↓ 2 callers
Method
_loglikelihood_tokens
(self, requests, disable_tqdm=False)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:224
↓ 2 callers
Method
_prepare_fsdp_model
(self, fsdp_model: FSDP)
olmo/checkpoint.py:1504
↓ 2 callers
Method
_process_doc
Given a `doc`, flatten it out so that each JSON blob contains exactly one question and one answer. Logic taken from the reference impl
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/qasper.py:146
↓ 2 callers
Method
_process_doc
(cls, doc)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/superglue.py:308
↓ 2 callers
Method
_process_doc
(self, doc)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_ethics.py:312
↓ 2 callers
Method
_process_doc
Given a `doc`, flatten it out so that each JSON blob contains exactly one question and one answer. Logic taken from the reference impl
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/qasper.py:146
↓ 2 callers
Method
_process_doc
(cls, doc)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/superglue.py:308
↓ 2 callers
Method
_process_doc
(self, doc)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_ethics.py:312
↓ 2 callers
Method
_read_chunk_from_memmap
(self, path: PathOrStr, index: int, dtype=None)
olmo/data/memmap_dataset.py:157
↓ 2 callers
Method
_register_resolvers
(cls, validate_paths: bool = True)
olmo/config.py:68
↓ 2 callers
Method
_remove_sharded_checkpoint
(self, idx: int, checkpoints: List[Path])
olmo/train.py:522
↓ 2 callers
Function
_run_olmo_optim_againt_torch_optim
( max_iterations: int, max_norm: float, device: str, )
tests/grad_norm_test.py:226
↓ 2 callers
Function
_s3_file_size
(scheme: str, bucket_name: str, key: str, max_attempts: int = 3)
olmo/util.py:612
↓ 2 callers
Method
_search
( self, start_predictions: torch.Tensor, start_state: StateType, step: StepFun
olmo/beam_search.py:813
↓ 2 callers
Function
_simplify_evaluators
(evaluators)
scripts/compare_wandb_configs.py:127
↓ 2 callers
Method
_split_chunks
(self, dirty_string, dirty_parts)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:163
↓ 2 callers
Method
_split_chunks
(self, dirty_string, dirty_parts)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:163
↓ 2 callers
Method
_upload_file
(self, local_filepath: str, bucket_name: str, key: str)
scripts/storage_cleaner.py:579
↓ 2 callers
Method
_write_model_dict
(self, model_state_dict, checkpoint_dir, upload_to, save_overwrite)
olmo/checkpoint.py:792
↓ 2 callers
Method
_write_optim_dict
(self, optim_state_dict, checkpoint_dir, upload_to, save_overwrite)
olmo/checkpoint.py:807
↓ 2 callers
Method
aggregation
:returns: {str: [metric_score] -> float} A dictionary where keys are the names of submetrics and values are functions
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:493
↓ 2 callers
Method
aggregation
:returns: {str: [metric_score] -> float} A dictionary where keys are the names of submetrics and values are functions
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:493
↓ 2 callers
Method
apply_rotary_pos_emb
(self, pos_sin: torch.Tensor, pos_cos: torch.Tensor, t: torch.Tensor)
olmo/model.py:300
↓ 2 callers
Method
attention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, attention_b
olmo/model.py:582
↓ 2 callers
Function
autogptq_post_init
(model, use_act_order: bool)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_utils.py:203
↓ 2 callers
Function
build_downstream_evaluator
( train_config: TrainConfig, eval_cfg: EvaluatorConfig, tokenizer: Tokenizer, device: torch.de
olmo/eval/__init__.py:24
↓ 2 callers
Method
calculate_metrics
From catwalk. https://github.com/allenai/catwalk/blob/main/catwalk/model.py
inference/efficiency/dependencies/previous_version/efficiency_benchmark/steps.py:249
↓ 2 callers
Function
check_and_get_model_type
(model_dir, trust_remote_code=False)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_utils.py:157
↓ 2 callers
Method
clear
Clears the entire sequence
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tango_utils/sequences.py:361
↓ 2 callers
Method
clip_grads_and_collect_metrics
Clips gradients for every group that has the field `max_grad_norm`. At the same time collect metrics for each parameter and its gradi
olmo/optim.py:49
↓ 2 callers
Function
compare_pytorch_version
(version: str = "v2.0.0", op: str = "eq")
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/import_utils.py:61
↓ 2 callers
Function
compare_transformers_version
(version: str = "v4.28.0", op: str = "eq")
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/import_utils.py:53
↓ 2 callers
Method
compute
(self)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/metrics/bleu.py:25
↓ 2 callers
Method
compute
(self)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/metrics/bleu.py:25
↓ 2 callers
Method
compute
(self)
olmo/eval/downstream.py:98
↓ 2 callers
Function
compute_reduction
(p)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/generate.py:1396
↓ 2 callers
Method
construct_requests
Uses RequestFactory to construct Requests and returns an iterable of Requests which will be sent to the LM. :param doc: T
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:466
↓ 2 callers
Method
construct_requests
Uses RequestFactory to construct Requests and returns an iterable of Requests which will be sent to the LM. :param doc: T
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:466
↓ 2 callers
Method
copy_into
(self, full_tensor: torch.Tensor)
olmo/checkpoint.py:1465
↓ 2 callers
Method
dataset
(self, split: str)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/efficiency_benchmark.py:114
↓ 2 callers
Method
dataset
(self, split: str)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/efficiency_benchmark.py:114
↓ 2 callers
Function
default_thread_count
()
olmo/util.py:792
↓ 2 callers
Method
delete_path
(self, path: str)
scripts/storage_cleaner.py:179
↓ 2 callers
Function
dir_is_empty
(dir: PathOrStr)
olmo/util.py:302
↓ 2 callers
Function
dispatch_openai_chat_requesets
Dispatches requests to OpenAI chat completion API asynchronously. Args: messages_list: List of messages to be sent to OpenAI chat complet
inference/eval/dispatch_openai_requests.py:12
↓ 2 callers
Function
dispatch_openai_prompt_requesets
Dispatches requests to OpenAI text completion API asynchronously. Args: prompt_list: List of prompts to be sent to OpenAI text completion
inference/eval/dispatch_openai_requests.py:37
↓ 2 callers
Method
doc_to_text
(self, doc)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:458
↓ 2 callers
Method
doc_to_text
(self, doc)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_ethics.py:253
↓ 2 callers
Method
doc_to_text
(self, doc)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:458
↓ 2 callers
Method
doc_to_text
(self, doc)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_ethics.py:253
↓ 2 callers
Method
download_folder
Downloads the content from the directory path to the local FS destination folder.
scripts/storage_cleaner.py:90
↓ 2 callers
Method
enable_trainable_mode
(self, enabled: bool = True)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:999
↓ 2 callers
Function
ensure_finite_
Modify ``x`` in place to replace ``float("-inf")`` with the minimum value of the dtype when ``check_neg_inf`` is ``True`` and to replace ``fl
olmo/torch_util.py:81
↓ 2 callers
Method
fewshot_context
Returns a fewshot context string that is made up of a prepended description (if provided), the `num_fewshot` number of examples, and an append
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:521
↓ 2 callers
Method
fewshot_context
Returns a fewshot context string that is made up of a prepended description (if provided), the `num_fewshot` number of examples, and an append
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:521
↓ 2 callers
Function
find_end_first_consecutive_true
Function to find the end position of the first consecutive sequence of True in an array.
olmo/data/util.py:7
↓ 2 callers
Function
fixed_pos_embedding
(x, seq_dim=1, seq_len=None)
inference/compression/dependencies/AutoGPTQ/auto_gptq/nn_modules/fused_gptj_attn.py:12
↓ 2 callers
Method
fn
(requests)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:727
↓ 2 callers
Method
fn
(requests)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:727
↓ 2 callers
Function
form_ngrams
(sequence, n)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:22
↓ 2 callers
Function
form_ngrams
(sequence, n)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:22
↓ 2 callers
Method
format_answer
(cls, query, entity)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/superglue.py:324
↓ 2 callers
Method
format_answer
(cls, query, entity)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/superglue.py:324
↓ 2 callers
Method
generate
Generate token IDs using beam search. Note that by default ``beam_size`` is set to 1, which is greedy decoding. :param inpu
olmo/model.py:1597
↓ 2 callers
Method
get_alibi_attention_bias
(self, seq_len: int, device: torch.device)
olmo/model.py:1234
↓ 2 callers
Function
get_closest_label
(pred: Sequence, classes: List[Sequence])
inference/compression/dependencies/AutoGPTQ/auto_gptq/eval_tasks/_utils/classification_utils.py:26
↓ 2 callers
Function
get_diff
(a, ref)
inference/compression/dependencies/AutoGPTQ/tests/test_q4.py:14
↓ 2 callers
Function
get_overlaps_dump_path
(task_name, task_set, ngrams_n_size, limit)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/decontaminate.py:50
↓ 2 callers
Function
get_overlaps_dump_path
(task_name, task_set, ngrams_n_size, limit)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/decontaminate.py:50
↓ 2 callers
Method
get_rotary_embedding
(self, seq_len: int, device: torch.device)
olmo/model.py:266
↓ 2 callers
Method
gumbel_with_max
Sample `Gumbel(phi)` conditioned on the maximum value being equal to `T`. `phi` should have shape `(batch_size, num_classes)` and `T
olmo/beam_search.py:403
↓ 2 callers
Method
init_state
( self, start_class_log_probabilities: torch.Tensor, batch_size: int, num_classes: int )
olmo/beam_search.py:82
↓ 2 callers
Method
instance_as_eleuther_requests
(self, instance: Dict[str, Any], *, num_fewshot: int = 0)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/eleuther.py:100
↓ 2 callers
Method
instance_as_eleuther_requests
(self, instance: Dict[str, Any], *, num_fewshot: int = 0)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/eleuther.py:100
↓ 2 callers
Function
is_data_file
(data_rel_path: str)
olmo_data/data.py:17
↓ 2 callers
Method
last_boxed_only_string
(self, string)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_math.py:117
↓ 2 callers
Method
last_boxed_only_string
(self, string)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/hendrycks_math.py:117
↓ 2 callers
Function
list_s3_paths
Lists all paths in an S3 bucket with given prefix and extension, along with their sizes. Args: bucket_name (str): Name of the S3 buc
scripts/microanneal_config_maker.py:54
↓ 2 callers
Function
list_s3_paths
Lists all paths in an S3 bucket with given prefix and extension, along with their sizes. Args: bucket_name (str): Name of the S3 buc
scripts/peteish7_config_maker.py:56
↓ 2 callers
Function
load_hf_dataset
Loads a HuggingFace dataset. The dataset is assumed to be saved using `save_hf_dataset_to_disk` and located in `olmo_data/hf_datasets`.
olmo/util.py:743
↓ 2 callers
Function
load_oe_eval_requests
Loads an oe-eval request file from `olmo_data/oe_eval_tasks`. TODO: Add support from loading from S3 instead?
olmo/util.py:757
↓ 2 callers
Method
load_trainer_state_dict
(self, state_dict: Dict[str, Any])
olmo/train.py:339
↓ 2 callers
Method
loglikelihood
Compute log-likelihood of generating a continuation from a context. Downstream tasks should attempt to use loglikelihood instead of other
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/base.py:30
↓ 2 callers
Method
loglikelihood
Compute log-likelihood of generating a continuation from a context. Downstream tasks should attempt to use loglikelihood instead of other
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/base.py:30
↓ 2 callers
Function
macros
()
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/generate.py:90
← previous
next →
301–400 of 3,821, ranked by callers