MCPcopy Create free account

hub / github.com/allenai/molmo / functions

Functions893 in github.com/allenai/molmo

↓ 119 callersMethodget
(self, item, rng)
olmo/data/dataset.py:30
↓ 39 callersFunctionget_global_rank
()
olmo/torch_util.py:50
↓ 35 callersFunctionget_world_size
()
olmo/torch_util.py:39
↓ 34 callersFunctionbarrier
()
olmo/torch_util.py:103
↓ 28 callersMethoddecode
(self, x: List[int], truncate_at_eos=True)
olmo/tokenizer.py:46
↓ 26 callersMethodload
Load from a YAML file.
olmo/config.py:124
↓ 24 callersMethod_check_results
( self, batch_size: int = 5, expected_top_k: Optional[np.array] = None, # type: ignor
tests/beam_search_test.py:118
↓ 24 callersMethodreset_parameters
(self)
olmo/model.py:1764
↓ 18 callersMethoddevice
(self)
olmo/model.py:1757
↓ 18 callersFunctionload_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:289
↓ 16 callersMethodget_lr
(self, initial_lr: float, step: int, max_steps: int, group_name: str=None)
olmo/optim.py:558
↓ 15 callersMethod__init__
(self, config: ModelConfig, init_params: bool = True)
olmo/model.py:1588
↓ 15 callersMethodbuild
(cls, layer_id: int, config: ModelConfig, cache: BufferCache)
olmo/model.py:768
↓ 14 callersMethodload
(self)
olmo/data/dataset.py:77
↓ 14 callersMethodreset_parameters
(self)
olmo/image_vit.py:172
↓ 13 callersFunctionflatten_dict
(d: Dict)
olmo/safetensors_util.py:35
↓ 13 callersFunctionresource_path
( folder: PathOrStr, fname: str, local_cache: Optional[PathOrStr] = None, progress: Optional[Progress] = N
olmo/util.py:325
↓ 12 callersFunction_get_s3_client
(scheme: str)
olmo/util.py:516
↓ 12 callersFunctioninit_weights
Initialize weights of a linear or embedding module. :param config: The model config. :param module: The linear or embedding submodule to
olmo/initialization.py:20
↓ 12 callersMethodsave
Save to a YAML file.
olmo/config.py:152
↓ 12 callersMethodsearch
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:751
↓ 11 callersMethod__init__
(self, split, multi_question=False)
olmo/data/academic_datasets.py:95
↓ 11 callersFunctionmean_metric
(v)
olmo/eval/evaluators.py:43
↓ 10 callersMethoddownload
(cls, n_procs=1)
olmo/data/dataset.py:17
↓ 10 callersFunctionget_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:61
↓ 10 callersFunctionget_local_rank
()
olmo/torch_util.py:57
↓ 10 callersMethodreset
(self)
olmo/train.py:131
↓ 10 callersMethodupdate_legacy_settings
Update the legacy config settings whose schemas have undergone backwards-incompatible changes.
olmo/config.py:106
↓ 9 callersFunctionget_default_device
()
olmo/torch_util.py:96
↓ 9 callersFunctionget_step_function
( transition_matrix: torch.Tensor, with_timestep: bool = False )
tests/beam_search_test.py:71
↓ 9 callersFunctionlistinstr
(lst, s, delimiter=None)
olmo/torch_util.py:152
↓ 9 callersFunctionpostprocess_prompt
Get a human-readable prompt by compressing the image tokens
olmo/html_utils.py:365
↓ 9 callersFunctionsave_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:247
↓ 8 callersMethod__init__
(self, config: ModelConfig)
olmo/image_vit.py:150
↓ 8 callersFunction_test_tokenization
(messages, n_at_start=None, preprocessor=None)
tests/data/test_preprocessor.py:16
↓ 8 callersFunctionlog_extra_field
(field_name: str, field_value: Any)
olmo/util.py:81
↓ 8 callersFunctionprepare_cli_environment
(log_filter_type: Optional[LogFilterType] = None)
olmo/util.py:210
↓ 8 callersMethodsave_checkpoint
( self, checkpoint_type: CheckpointType = CheckpointType.sharded )
olmo/train.py:671
↓ 7 callersFunctiondownload_pixmo_urls
Download urls from a PixMo dataset, return a map of urls->filename
olmo/data/download_urls.py:117
↓ 7 callersMethodencode
(self, x: str)
olmo/tokenizer.py:43
↓ 7 callersMethodeval
(self)
olmo/train.py:1177
↓ 7 callersFunctiongather_examples_as_html
Builds a HTML table visualization of the predictions
olmo/eval/evaluators.py:69
↓ 7 callersMethodget_lr
(self, initial_lr: float, step: int, max_steps: int, group_name=None)
olmo/optim.py:617
↓ 7 callersFunctionis_distributed
()
olmo/torch_util.py:31
↓ 7 callersFunctionsave_local_dataset
(dataset: datasets.Dataset, name: str, n_procs, n_val=None)
olmo/data/pixmo_datasets.py:59
↓ 7 callersFunctionunflatten_dict
(d: Dict[STKey, torch.Tensor])
olmo/safetensors_util.py:51
↓ 6 callersFunctionadd_cached_path_clients
()
olmo/util.py:739
↓ 6 callersFunctionclean_opt
(arg: str)
olmo/util.py:220
↓ 6 callersFunctiongc_cuda
()
olmo/torch_util.py:146
↓ 6 callersFunctioninit_normal
( module: Union[nn.Linear, nn.Embedding], std: float, init_cutoff_factor: Optional[float] = None,
olmo/initialization.py:64
↓ 6 callersMethodnum_params
Get the total number of parameters.
olmo/model.py:2151
↓ 6 callersFunctionupload
Upload source file to a target location on GCS or S3.
olmo/util.py:359
↓ 5 callersMethod_save_config
(self, dir: PathOrStr, *, upload_to: Optional[str] = None)
olmo/checkpoint.py:606
↓ 5 callersMethod_temporary_wd
(self, dir: PathOrStr)
olmo/checkpoint.py:552
↓ 5 callersMethodattention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, attention_b
olmo/model.py:684
↓ 5 callersFunctionextract_points
(text, image_w, image_h)
olmo/util.py:831
↓ 5 callersMethodget
(self, item, rng)
olmo/data/academic_datasets.py:116
↓ 5 callersFunctionget_dataset_by_name
(dataset_name, split)
olmo/data/__init__.py:214
↓ 5 callersMethodget_tokenizer
(self)
olmo/config.py:767
↓ 5 callersFunctionis_url
(path: PathOrStr)
olmo/util.py:304
↓ 5 callersFunctionselect_mc_option
Selects a multiple-choice option based on the model output The output is should exactly match one of the option, but contains some heuri
olmo/eval/vqa.py:118
↓ 5 callersFunctionwait_for
Wait for the condition function to return True.
olmo/util.py:295
↓ 4 callersMethod__init__
(self, split, select_answer="best", parts="both", weighted=False)
olmo/data/academic_datasets_manual.py:345
↓ 4 callersMethodclose
(self, exit_code: int = 0)
olmo/train.py:1576
↓ 4 callersFunctionfilter_and_group_data
Groups a pixmo datasets so each row contains all annotation for one image, and add images path using `url_to_path`, removing rows that do not
olmo/data/download_urls.py:179
↓ 4 callersFunctionfreeze_parameters_by_name
(model: torch.nn.Module, freeze_names: Tuple[str], warn=True)
olmo/torch_util.py:171
↓ 4 callersFunctionget_local_world_size
()
olmo/torch_util.py:46
↓ 4 callersMethodget_max_grad_norm
( self, initial_max_grad_norm: Optional[float], step: int, max_steps: int )
olmo/optim.py:576
↓ 4 callersMethodget_save_dir
Get directory to save the eval results
scripts/mm_eval.py:74
↓ 4 callersMethodlog_metrics_to_console
(self, prefix: str, metrics: Dict[str, float])
olmo/train.py:1106
↓ 4 callersFunctionopt_at
(opt, idx, key)
tests/checkpoint_test.py:16
↓ 4 callersFunctionpeak_gpu_memory
Get the peak GPU memory usage in MB across all ranks. Only rank 0 will get the final result.
olmo/torch_util.py:108
↓ 4 callersFunctionpreprocess_answer
(ans, cache={})
olmo/eval/vqa.py:89
↓ 4 callersMethodrun
(self)
scripts/mm_eval.py:210
↓ 3 callersMethod__init__
(self, cfg: TrainConfig, thread_count: Optional[int] = None)
olmo/checkpoint.py:504
↓ 3 callersMethod_cast_if_autocast_enabled
(self, tensor: torch.Tensor, dtype: Optional[torch.dtype] = None)
olmo/model.py:253
↓ 3 callersMethod_format_example
(self, message, example, is_training, for_inference, rng)
olmo/data/data_formatter.py:534
↓ 3 callersMethod_get_max_grad_norm_coeff
( self, initial_value: Optional[float], step: int, max_steps: int )
olmo/optim.py:561
↓ 3 callersMethod_linear_warmup
(self, initial_lr: float, step: int, warmup_steps: int = 2000)
olmo/optim.py:586
↓ 3 callersMethod_normalize
(self, image)
olmo/data/model_preprocessor.py:315
↓ 3 callersMethod_patch_sharded_tensor_load
Monkeypatch for torch's ShardedTensor, so we can unpickle without having torch.distributed set up.
olmo/checkpoint.py:1227
↓ 3 callersMethod_save_checkpoint
( self, checkpointer: Checkpointer, checkpoint_type: CheckpointType )
olmo/train.py:508
↓ 3 callersMethod_split_heads
(self, hidden_states, num_heads)
olmo/image_vit.py:92
↓ 3 callersFunction_wait_before_retry
(attempt: int)
olmo/util.py:526
↓ 3 callersFunctionactivation_checkpoint_function
(cfg: ModelConfig)
olmo/model.py:89
↓ 3 callersMethodasdict
(self, exclude: Optional[Iterable[str]] = None)
olmo/config.py:156
↓ 3 callersFunctionbuild_embedded_image
Turns an image into a string that can be used as a src in html images
olmo/html_utils.py:169
↓ 3 callersFunctionbuild_sharded_checkpointer
( cfg: TrainConfig, *, name: Optional[ShardedCheckpointerType] = None, use_shared_mem_impl: bool = False )
olmo/checkpoint.py:2011
↓ 3 callersFunctionbuild_tokenizer
( tokenizer_type, has_extra_token=True, tokenizer_dir="gs://mm-olmo/tokenizer", pad_tokenizer_to=N
olmo/tokenizer.py:69
↓ 3 callersFunctioncompute_area
(bbox: list, invalid: float=None)
olmo/eval/evaluators.py:914
↓ 3 callersFunctiondownload_file
(url, filename)
olmo/hf_datasets/a_okvqa.py:40
↓ 3 callersFunctionescape_html
(text)
olmo/html_utils.py:47
↓ 3 callersMethodformat_options
(self, example)
olmo/data/data_formatter.py:361
↓ 3 callersMethodget
(self, item, rng)
olmo/data/academic_datasets_manual.py:385
↓ 3 callersFunctionget_coco_image_file
(image_id, split)
olmo/data/academic_datasets_manual.py:32
↓ 3 callersMethodget_connector_parameters
()
olmo/model.py:1712
↓ 3 callersMethodget_llm_parameters
()
olmo/model.py:1732
↓ 3 callersMethodget_vit_parameters
()
olmo/model.py:1724
↓ 3 callersFunctioninterpolate_position_embeddings
( position_embeddings: torch.Tensor, num_patches: int, dim: int, patch_size: int, height:
scripts/convert_hf_to_molmo.py:18
↓ 3 callersMethodload
(self)
olmo/data/academic_datasets.py:146
next →1–100 of 893, ranked by callers