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
↓ 152 callers
Method
to
(self, device: Union[str, torch.device])
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:447
↓ 145 callers
Method
add_metrics
(self, metrics: Mapping[str, Callable[[], torchmetrics.Metric]])
inference/efficiency/dependencies/previous_version/efficiency_benchmark/task.py:178
↓ 144 callers
Method
add_metrics
(self, metrics: Mapping[str, Callable[[], torchmetrics.Metric]])
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/task.py:178
↓ 88 callers
Method
load
Load from a YAML file.
olmo/config.py:127
↓ 77 callers
Method
add_instance_conversion
(self, format: InstanceFormat, conversion: InstanceConversion)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/task.py:183
↓ 77 callers
Method
add_instance_conversion
(self, format: InstanceFormat, conversion: InstanceConversion)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/task.py:183
↓ 68 callers
Method
loglikelihood
(self, requests)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/models/dummy.py:14
↓ 68 callers
Method
loglikelihood
(self, requests)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/models/dummy.py:14
↓ 58 callers
Function
check_distribution
( module: torch.nn.Module, mean: float, std: float, max_val: Optional[float] = None, min_v
tests/initialization_test.py:13
↓ 57 callers
Method
encode
Encode a string into token IDs.
olmo/tokenizer.py:169
↓ 51 callers
Method
from_pretrained
(cls, save_dir: str, **kwargs)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:70
↓ 44 callers
Method
decode
Decode a list of token IDs to a string.
olmo/tokenizer.py:194
↓ 44 callers
Function
mc_metrics
(num_classes: int)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/task.py:50
↓ 44 callers
Function
mc_metrics
(num_classes: int)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/task.py:50
↓ 42 callers
Method
write
Write a list of token IDs to the memmap file; if only a subset of the values can be written, return the rest. Args: value
scripts/prepare_memmap_dataset.py:141
↓ 37 callers
Function
classification_metrics
(num_classes: int)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/task.py:57
↓ 37 callers
Function
classification_metrics
(num_classes: int)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/task.py:57
↓ 36 callers
Method
from_pretrained
Initialize a tokenizer from a pretrained tokenizer on the HuggingFace Hub. :param identifier: The identifier of a model on the Hub t
olmo/tokenizer.py:85
↓ 34 callers
Method
is_dir
Returns whether the given path corresponds to an existing directory.
scripts/storage_cleaner.py:86
↓ 34 callers
Method
is_file
Returns whether the given path corresponds to an existing file.
scripts/storage_cleaner.py:76
↓ 33 callers
Function
get_global_rank
()
olmo/torch_util.py:46
↓ 32 callers
Function
barrier
()
olmo/torch_util.py:99
↓ 27 callers
Function
_add_ps
(to, a, b)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:52
↓ 27 callers
Method
update
(self, batch: Dict[str, Any], lm_logits: torch.Tensor, dc_lm_logits=None)
olmo/eval/downstream.py:42
↓ 24 callers
Method
_check_results
( self, batch_size: int = 5, expected_top_k: Optional[np.array] = None, # type: ignor
tests/beam_search_test.py:118
↓ 23 callers
Method
device
(self)
olmo/model.py:1160
↓ 23 callers
Method
save
Save to a YAML file.
olmo/config.py:149
↓ 23 callers
Function
tokenizer
()
conftest.py:58
↓ 22 callers
Function
get_from_dict
(d: Union[Mapping[str, Any], Sequence[Any]], field: str, missing_ok: bool = False)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/huggingface.py:11
↓ 22 callers
Function
get_from_dict
(d: Union[Mapping[str, Any], Sequence[Any]], field: str, missing_ok: bool = False)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/huggingface.py:11
↓ 21 callers
Function
load_state_dict
Load a regular state dict from the file ``fname`` within ``checkpoint_dir`` using :func:`torch.load()`. This can be used during distributed t
olmo/checkpoint.py:287
↓ 20 callers
Method
__init__
( self, tokenizer, dataset_path="glue", dataset_name="rte", )
olmo/eval/downstream.py:995
↓ 20 callers
Method
eval
(self)
olmo/train.py:999
↓ 19 callers
Function
move_to_device
(obj: Union[torch.Tensor, nn.Module], device: torch.device)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_utils.py:22
↓ 18 callers
Method
generate
shortcut for model.generate
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:453
↓ 18 callers
Method
update
(self, output: str, target: str)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/metrics/bleu.py:21
↓ 17 callers
Function
_get_s3_client
(scheme: str)
olmo/util.py:568
↓ 17 callers
Method
from_quantized
( cls, model_name_or_path: Optional[str], device_map: Optional[Union[str, Dict[str, Un
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/auto.py:67
↓ 16 callers
Function
_get_storage_adapter_for_path
(path: str)
scripts/storage_cleaner.py:634
↓ 16 callers
Method
extend
(self, values: Iterable[Any])
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tango_utils/sequences.py:337
↓ 16 callers
Function
get_world_size
()
olmo/torch_util.py:35
↓ 16 callers
Function
hfqa_conversion
( *, context_field: str = "context", question_field: str = "question", answers_field: str = "a
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/huggingface.py:88
↓ 16 callers
Function
hfqa_conversion
( *, context_field: str = "context", question_field: str = "question", answers_field: str = "a
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/huggingface.py:88
↓ 16 callers
Method
save_pretrained
(self, save_dir: str, **kwargs)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:65
↓ 16 callers
Function
seed_all
Seed all rng objects.
olmo/torch_util.py:11
↓ 14 callers
Function
hfmc_conversion
( **kwargs, )
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/huggingface.py:186
↓ 14 callers
Function
hfmc_conversion
( **kwargs, )
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/huggingface.py:186
↓ 14 callers
Method
run
(self, model_name, task_set, task, metrics: Tuple)
evaluation/steps/wandb_metrics.py:11
↓ 13 callers
Method
device
(self)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:440
↓ 12 callers
Method
from_train_config
(cls, config: TrainConfig)
olmo/tokenizer.py:58
↓ 12 callers
Method
get_lr
(self, initial_lr: float, step: int, max_steps: int)
olmo/optim.py:659
↓ 12 callers
Function
prepare_cli_environment
(log_filter_type: Optional[LogFilterType] = None)
olmo/util.py:204
↓ 12 callers
Method
search
Given a starting state and a step function, apply beam search to find the most likely target sequences. Returns a tuple of `
olmo/beam_search.py:749
↓ 12 callers
Method
step
( last_predictions: torch.Tensor, state: dict[str, torch.Tensor] )
olmo/model.py:1670
↓ 11 callers
Method
build
(cls, layer_id: int, config: ModelConfig, cache: BufferCache)
olmo/model.py:663
↓ 11 callers
Function
efficiency_benchmark_raft_conversion
( **kwargs, )
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/efficiency_benchmark.py:218
↓ 11 callers
Function
efficiency_benchmark_raft_conversion
( **kwargs, )
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/efficiency_benchmark.py:218
↓ 11 callers
Function
get_fs_local_rank
Get the local rank per filesystem, meaning that, regardless of the number of nodes, if all ranks share the same filesystem then `get_fs_local_rank
olmo/torch_util.py:57
↓ 11 callers
Function
init_normal
( module: Union[nn.Linear, nn.Embedding], std: float, init_cutoff_factor: Optional[float] = None,
olmo/initialization.py:8
↓ 11 callers
Method
read
(self, file, get_meta=False, autojoin_paragraphs=True, para_joiner="\n\n")
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/decontamination/archiver.py:48
↓ 11 callers
Method
reset_parameters
(self)
olmo/model.py:1167
↓ 10 callers
Method
asdict
(self, exclude: Optional[Iterable[str]] = None)
olmo/config.py:153
↓ 10 callers
Method
backward
(ctx, grad_output)
inference/compression/dependencies/AutoGPTQ/auto_gptq/nn_modules/triton_utils/kernels.py:359
↓ 10 callers
Method
from_file
Initialize a tokenizer from a file. You can create those files with ``BaseTokenizer.save()``. :param filename: The name of
olmo/tokenizer.py:98
↓ 10 callers
Method
save_quantized
save quantized model and configs to local disk
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:534
↓ 10 callers
Method
to_dict
(self)
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_base.py:105
↓ 9 callers
Function
_256castps256_ps128
(to, a)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:48
↓ 9 callers
Function
_256extractf128_ps
(to, a, imm)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:44
↓ 9 callers
Method
__init__
(self, config: ModelConfig, init_params: bool = True)
olmo/model.py:1065
↓ 9 callers
Function
_cvtss_f32
(to, a)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:64
↓ 9 callers
Function
_movehl_ps
(to, a, b)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:56
↓ 9 callers
Function
_shuffle_ps
(to, a, b, imm)
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/intrin.py:60
↓ 9 callers
Function
format_example
(df, idx, include_answer=True)
inference/eval/mmlu/run_eval.py:27
↓ 9 callers
Function
get_step_function
( transition_matrix: torch.Tensor, with_timestep: bool = False )
tests/beam_search_test.py:71
↓ 9 callers
Method
greedy_until
(self, requests)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/models/gpt3.py:165
↓ 9 callers
Method
greedy_until
(self, requests)
inference/efficiency/dependencies/previous_version/efficiency_benchmark/dependencies/lm_eval/models/gpt3.py:165
↓ 9 callers
Function
save_state_dict
Save a regular state dict to the file ``fname`` within ``checkpoint_dir`` using :func:`torch.save()`. This can be used during distributed tra
olmo/checkpoint.py:245
↓ 9 callers
Method
token_encode
(self, string: str)
olmo/eval/downstream.py:369
↓ 8 callers
Method
_get_bucket_name_and_key
(path: str)
scripts/storage_cleaner.py:409
↓ 8 callers
Function
dynamically_import_QuantLinear
( use_triton: bool, desc_act: bool, group_size: int, bits: int, disable_exllama: bool = False )
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/import_utils.py:32
↓ 8 callers
Function
efficiency_benchmark_classification_conversion
( **kwargs, )
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/efficiency_benchmark.py:189
↓ 8 callers
Function
efficiency_benchmark_classification_conversion
( **kwargs, )
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/efficiency_benchmark.py:189
↓ 8 callers
Function
get_default_device
()
olmo/torch_util.py:92
↓ 8 callers
Function
get_local_rank
()
olmo/torch_util.py:53
↓ 8 callers
Function
hfclassification_conversion
( **kwargs, )
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/tasks/huggingface.py:224
↓ 8 callers
Function
hfclassification_conversion
( **kwargs, )
inference/efficiency/dependencies/previous_version/efficiency_benchmark/tasks/huggingface.py:224
↓ 8 callers
Function
is_distributed
()
olmo/torch_util.py:27
↓ 8 callers
Function
log_extra_field
(field_name: str, field_value: Any)
olmo/util.py:75
↓ 8 callers
Method
num_params
Get the total number of parameters.
olmo/model.py:1556
↓ 8 callers
Function
pack
(values: Iterable[int])
tests/data/iterable_dataset_test.py:10
↓ 8 callers
Function
qforward
( nu, mu, tu, p, unroll, bits, n=0, m=0, t=0, nb=0, mb=0, tb=0, tt=0, cutoff=-1, gs=False, gs_val=-1, modu
inference/compression/dependencies/AutoGPTQ/autogptq_extension/qigen/generate.py:454
↓ 8 callers
Function
resource_path
( folder: PathOrStr, fname: str, local_cache: Optional[PathOrStr] = None, progress: Optional[Progress] = N
olmo/util.py:319
↓ 8 callers
Method
save_checkpoint
( self, checkpoint_type: CheckpointType = CheckpointType.sharded )
olmo/train.py:599
↓ 8 callers
Method
softmax
Static method for applying the softmax function. Parameters ---------- logits : np.ndarray The input to
inference/compression/dependencies/AutoGPTQ/auto_gptq/utils/perplexity_utils.py:74
↓ 8 callers
Function
unpack
(dataset: IterableDataset)
tests/data/iterable_dataset_test.py:14
↓ 8 callers
Method
update
(self, output: str, target: str)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/metrics/bleu.py:21
↓ 7 callers
Function
clean_opt
(arg: str)
olmo/util.py:214
↓ 7 callers
Method
close
Close the memmap file and optionally upload it to the destination (in the case of a remote path).
scripts/prepare_memmap_dataset.py:190
↓ 7 callers
Method
commit
(self)
inference/efficiency/dependencies/efficiency-pentathlon/efficiency_benchmark/dependencies/lm_eval/decontamination/archiver.py:37
↓ 7 callers
Function
get_device
(obj: Union[torch.Tensor, nn.Module])
inference/compression/dependencies/AutoGPTQ/auto_gptq/modeling/_utils.py:16
next →
1–100 of 3,821, ranked by callers