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
↓ 1 callers
Method
_remove_articles
(self, text)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:238
↓ 1 callers
Method
_remove_articles
(self, text)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:238
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/triviaqa.py:66
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/webqs.py:70
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/triviaqa.py:66
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/webqs.py:70
↓ 1 callers
Method
_remove_punc
(self, text)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:244
↓ 1 callers
Method
_remove_punc
(self, text)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:244
↓ 1 callers
Method
_replace_module
(self, parent_module, child_name, new_module, old_module)
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/peft_utils.py:151
↓ 1 callers
Method
_replace_module
(self, parent_module, child_name, new_module, old_module)
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/peft_utils.py:293
↓ 1 callers
Method
_resize_attention_mask
(attention_mask: List[torch.LongTensor])
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:161
↓ 1 callers
Method
_resize_position_ids
(position_ids: List[torch.LongTensor])
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:165
↓ 1 callers
Function
_revert_data_mounts
(cfg: TrainConfig, mounts: List[Tuple[str, str]])
scripts/inspect_train_data.py:41
↓ 1 callers
Function
_s3_find_latest_checkpoint
(scheme: str, bucket_name: str, prefix: str)
olmo/util.py:668
↓ 1 callers
Function
_s3_get_bytes_range
( scheme: str, bucket_name: str, key: str, bytes_start: int, num_bytes: int, max_attempts: int = 3 )
olmo/util.py:629
↓ 1 callers
Function
_s3_upload
( source: Path, scheme: str, bucket_name: str, key: str, save_overwrite: bool = False, max_attempts: int =
olmo/util.py:582
↓ 1 callers
Method
_save_metadata
(self, dir: PathOrStr, *, upload_to: Optional[str] = None)
olmo/checkpoint.py:1563
↓ 1 callers
Method
_scaled_dot_product_attention
Computes scaled dot product attention on query, key and value tensors, using an optional attention mask if passed, and applying dropo
olmo/model.py:527
↓ 1 callers
Method
_set_blocking
(self, block_until_read_num_batches: int = None)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/stdio_wrapper.py:55
↓ 1 callers
Method
_set_blocking
(self, block_until_read_num_batches: int = None)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/stdio_wrapper.py:55
↓ 1 callers
Function
_setup_cached_path
(temp_dir: str)
scripts/storage_cleaner.py:1309
↓ 1 callers
Method
_setup_module_output_save_hooks
(self, micro_batch_idx: int)
olmo/train.py:657
↓ 1 callers
Function
_should_delete_run
(storage: StorageAdapter, run_dir_or_archive: str, config: DeleteBadRunsConfig)
scripts/storage_cleaner.py:714
↓ 1 callers
Function
_simplify_evaluator
(evaluator)
scripts/compare_wandb_configs.py:121
↓ 1 callers
Method
_skip_process
(self)
inference/compression/dependencies/AutoGPTQ/examples/benchmark/generation_speed.py:45
↓ 1 callers
Method
_split_cloud_path
Split a full s3 path into the bucket name and path.
olmo/util.py:862
↓ 1 callers
Method
_split_heads
Splits hidden dim into attn_head_size and num_attention_heads
inference/compression/dependencies/AutoGPTQ/auto_gptq/nn_modules/fused_gptj_attn.py:80
↓ 1 callers
Function
_squad_metric
(predictions, references)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/squad.py:35
↓ 1 callers
Function
_squad_metric
(predictions, references)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/squad.py:35
↓ 1 callers
Function
_step_function
( last_predictions: torch.Tensor, state: dict[str, torch.Tensor] )
tests/beam_search_test.py:74
↓ 1 callers
Method
_tensor_args
Annoyingly, torchmetrics only supports tensors as input, not raw values. So we have to convert raw values into tensors. From
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/steps.py:216
↓ 1 callers
Method
_tensor_args
Annoyingly, torchmetrics only supports tensors as input, not raw values. So we have to convert raw values into tensors. From
inference/efficiency/dependencies/previous_version/efficiency_benchmark/steps.py:208
↓ 1 callers
Method
_tokenize
(self, text)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:254
↓ 1 callers
Method
_tokenize
(self, text)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:254
↓ 1 callers
Method
_truncate
( self, input_ids: List[int], truncate_to: Optional[int], direction: TruncationDirection )
olmo/tokenizer.py:159
↓ 1 callers
Method
_try_power_monitor
(self)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/efficiency/profiler.py:51
↓ 1 callers
Method
_try_power_monitor
(self)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/efficiency/profiler.py:51
↓ 1 callers
Method
_unshard
(self, input_dir: PathOrStr, device: torch.device, skip_keys: Optional[Set[str]] = None)
olmo/checkpoint.py:1327
↓ 1 callers
Function
_unshard_checkpoint
( sharded_checkpoint_dir: str, dest_dir: str, run_dir: str, unsharding_config: UnshardCheckpointsConfig )
scripts/storage_cleaner.py:851
↓ 1 callers
Function
_unshard_checkpoints
( run_storage: StorageAdapter, run_dir_or_archive: str, checkpoints_dest_dir: str, config: Uns
scripts/storage_cleaner.py:942
↓ 1 callers
Method
_unshard_object
(self, os: List[Any], device: torch.device)
olmo/checkpoint.py:1361
↓ 1 callers
Method
_unshard_state_using_shared_mem
( self, state: Any, world_size: int, device: torch.device, key: Tuple )
olmo/checkpoint.py:1153
↓ 1 callers
Method
_unshard_tensor_using_shared_mem
( self, sharded_tensor: ShardedTensor, world_size: int, device: torch.device, key: Tuple )
olmo/checkpoint.py:1173
↓ 1 callers
Method
_unshard_using_sharded_mem
( self, state: Any, world_size: int, device: torch.device, shard_dir: PathOrStr )
olmo/checkpoint.py:1148
↓ 1 callers
Method
_unshard_using_shared_memory
This unsharding implementation consists of: 1. Loading each shard on a separate process and copying their sharded tensors to shared
olmo/checkpoint.py:1258
↓ 1 callers
Method
_unsqueeze_args
Further, torchmetrics can't handle single-instance calls when given tensors. It always needs the first dimension of the tensors to be
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/steps.py:232
↓ 1 callers
Method
_unsqueeze_args
Further, torchmetrics can't handle single-instance calls when given tensors. It always needs the first dimension of the tensors to be
inference/efficiency/dependencies/previous_version/efficiency_benchmark/steps.py:224
↓ 1 callers
Method
_update_initial_state
Expand tensors in a state dictionary from `(batch_size, *)` to `(batch_size * beam_size, *)`.
olmo/beam_search.py:1047
↓ 1 callers
Method
_update_state
( self, state: ConstraintStateType, last_prediction: torch.Tensor, )
olmo/beam_search.py:585
↓ 1 callers
Method
_update_state
(self, state: StateType, backpointer: torch.Tensor)
olmo/beam_search.py:1062
↓ 1 callers
Method
_update_task_metrics
(cls, task_dict: Dict)
evaluation/steps/run_catwalk.py:54
↓ 1 callers
Method
_update_unconditioned_prompt
(cls, task_dict: Dict)
evaluation/steps/run_catwalk.py:70
↓ 1 callers
Method
_validate_instance
(self, input_ids: torch.Tensor)
olmo/data/memmap_dataset.py:236
↓ 1 callers
Function
_verify_non_run_deletion
(run_dir_or_archive: str, run_entries: List[str], config: DeleteBadRunsConfig)
scripts/storage_cleaner.py:668
↓ 1 callers
Method
_white_space_fix
(self, text)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:241
↓ 1 callers
Method
_white_space_fix
(self, text)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/drop.py:241
↓ 1 callers
Method
_write_batch
(self, batch: Sequence[Dict[str, Any]])
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/stdio_wrapper.py:59
↓ 1 callers
Method
_write_batch
(self, batch: Sequence[Dict[str, Any]])
inference/efficiency/dependencies/previous_version/efficiency_benchmark/stdio_wrapper.py:59
↓ 1 callers
Function
_write_tokenizer
( output_path: Path, config: OlmoConfig, checkpoint_dir: str, input_tokenizer_path: Path | Non
scripts/convert_olmo_to_hf_new.py:198
↓ 1 callers
Function
_write_tokenizer
( output_path: Path, config: Olmo2Config, checkpoint_dir: str, input_tokenizer_path: Path | No
scripts/convert_olmo2_to_hf.py:221
↓ 1 callers
Function
accumulators_f
(nu, tu, gs=False)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/generate.py:414
↓ 1 callers
Method
add_batch
(name)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:343
↓ 1 callers
Method
add_metric
(self, name: str, metric: Callable[[], torchmetrics.Metric])
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/task.py:168
↓ 1 callers
Method
add_metric
(self, name: str, metric: Callable[[], torchmetrics.Metric])
inference/efficiency/dependencies/previous_version/efficiency_benchmark/task.py:168
↓ 1 callers
Method
add_special_tokens
Add special tokens in-place (if not already present) to the given token IDs.
olmo/tokenizer.py:148
↓ 1 callers
Function
alibi_attention_bias
(seq_len: int, config: ModelConfig, device: torch.device)
olmo/model.py:392
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/winogrande.py:100
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/wsc273.py:139
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/winogrande.py:100
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/wsc273.py:139
↓ 1 callers
Method
apply
( self, state: ConstraintStateType, class_log_probabilities: torch.Tensor, )
olmo/beam_search.py:604
↓ 1 callers
Method
batch_start
( self, global_total_tokens: int, device_batch_num_tokens: int, num_fwd_flops:
olmo/train.py:74
↓ 1 callers
Function
benchmark_generation_speed
(model, tokenizer, examples, generation_config)
inference/compression/dependencies/AutoGPTQ/examples/benchmark/generation_speed.py:181
↓ 1 callers
Method
bleu
Returns `t5` style BLEU scores. See the related implementation: https://github.com/google-research/text-to-text-transfer-transformer/
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/truthfulqa.py:344
↓ 1 callers
Method
bleu
Returns `t5` style BLEU scores. See the related implementation: https://github.com/google-research/text-to-text-transfer-transformer/
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/truthfulqa.py:344
↓ 1 callers
Method
block_for_outputs
(self)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/stdio_wrapper.py:132
↓ 1 callers
Method
block_for_outputs
(self)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/stdio_wrapper.py:132
↓ 1 callers
Method
block_for_prediction
(self)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/stdio_wrapper.py:124
↓ 1 callers
Method
block_for_prediction
(self)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/stdio_wrapper.py:124
↓ 1 callers
Function
bootstrap_stderr
(f, xs, iters)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/metrics.py:207
↓ 1 callers
Function
bootstrap_stderr
(f, xs, iters)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/metrics.py:207
↓ 1 callers
Function
build_eval_dataloader
( train_config: TrainConfig, data_config: DataConfig, batch_size: int, shuffle: bool = True, )
olmo/data/__init__.py:51
↓ 1 callers
Function
build_evaluator
( train_config: TrainConfig, eval_config: EvaluatorConfig, tokenizer: Tokenizer, device: torch.device )
olmo/eval/__init__.py:71
↓ 1 callers
Function
build_evaluators
(cfg: TrainConfig, device: torch.device)
olmo/eval/__init__.py:109
↓ 1 callers
Method
calculate_metrics
From catwalk. https://github.com/allenai/catwalk/blob/main/catwalk/model.py
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/steps.py:257
↓ 1 callers
Method
calculate_perplexity
Calculates the perplexity of the language model. Parameters ---------- n_ctx : int The context size.
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/perplexity_utils.py:91
↓ 1 callers
Function
categorise_answer
(answer_blob)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/tasks/qasper.py:65
↓ 1 callers
Function
categorise_answer
(answer_blob)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/tasks/qasper.py:65
↓ 1 callers
Function
causal_attention_bias
(seq_len: int, device: torch.device)
olmo/model.py:371
↓ 1 callers
Method
check
(self)
olmo/train.py:98
↓ 1 callers
Method
check
(self)
olmo/train.py:118
↓ 1 callers
Method
check_if_cancelled
(self)
olmo/train.py:1045
↓ 1 callers
Method
clean_cpp
(self, dirty_string)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:189
↓ 1 callers
Method
clean_cpp
(self, dirty_string)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:189
↓ 1 callers
Method
clean_python
(self, dirty_string)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:205
↓ 1 callers
Method
clean_python
(self, dirty_string)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/janitor.py:205
↓ 1 callers
Function
collate_data
(blocks: List[Dict[str, List[List[int]]]], pad_token_id: int)
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/data_utils.py:145
↓ 1 callers
Function
compare_model_param
( base_model: Any, compare_model: Any, param_name: str, *, norm_order: int = 1, includ
scripts/compare_model_state.py:23
↓ 1 callers
Function
compare_model_state
( base_model_folder: Path, compare_model_folder: Path, *, norm_order: int = 1, include_non
scripts/compare_model_state.py:50
↓ 1 callers
Function
compare_module_output
( base_traces_folder: Path, compare_traces_folder: Path, module_name: str, *, include_non_
scripts/compare_module_outputs.py:55
← previous
next →
601–700 of 3,821, ranked by callers