MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 215 callersMethodget
(self, item, rng)
olmo/data/dataset.py:41
↓ 86 callersFunctionmean_metric
(v)
olmo/eval/evaluators.py:67
↓ 73 callersFunctionresource_path
( folder: PathOrStr, fname: str=None, local_cache: Optional[PathOrStr] = None, progress: Optional[Prog
olmo/util.py:431
↓ 63 callersMethodupdate
( self, batch: Dict[str, torch.Tensor], model_out, cross_entropy_loss: torch.T
olmo/eval/loss_evaluator.py:101
↓ 48 callersMethoddecode
(self, x: List[int], truncate_at_eos=True)
olmo/tokenizer.py:78
↓ 45 callersFunctionget_global_rank
()
olmo/torch_util.py:84
↓ 39 callersFunctionget_world_size
Get the world size of the given process group. .. warning:: This will always return 1 if a distributed group has not been initialize
olmo/torch_util.py:67
↓ 39 callersMethodmax
(*other: 'TensorSpec')
olmo/preprocessing/preprocessor_utils.py:83
↓ 38 callersMethod__init__
(self, split, task, use_resize=False)
olmo/data/academic_video_datasets.py:924
↓ 35 callersFunctionnormalize_path
Normalize a path/URL. :param path: The path/URL to normalize.
olmo/io.py:40
↓ 33 callersFunctionbarrier
()
olmo/torch_util.py:166
↓ 32 callersMethodget
(self, idx, rng)
olmo/data/academic_video_datasets.py:1025
↓ 30 callersFunctionis_url
Check if a path is a URL. :param path: Path-like object to check.
olmo/io.py:77
↓ 29 callersFunctionis_pixmo_point_and_count_question
Could this question be counting question that the model should use pointing for? This check is conservative, so it will have a high recall b
olmo/preprocessing/detect_counting_question.py:85
↓ 29 callersMethodsearch
Given a starting state and a step function, apply beam search to find the most likely target sequences. Returns a tuple of `
olmo/nn/beam_search.py:1003
↓ 28 callersFunctiongather_examples_as_html
Builds a HTML table visualization of the predictions
olmo/eval/evaluators.py:110
↓ 27 callersFunctionfile_exists
Check if a local or remote file exists. :param path: Path/URL to a file.
olmo/io.py:340
↓ 27 callersMethodpad
( self, x: torch.Tensor, seq_dim: int, value: Union[int, float], lengt
olmo/nn/cp_load_balancer.py:323
↓ 27 callersMethodrun
(self)
olmo/eval/model_evaluator.py:370
↓ 26 callersMethodextend
(self, n, dim=0)
olmo/preprocessing/preprocessor_utils.py:58
↓ 25 callersMethoddevice
(self)
olmo/models/model.py:155
↓ 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 callersMethodload
(self)
olmo/data/academic_video_datasets.py:945
↓ 24 callersFunctionread_file
(path: PathOrStr, mode="r")
olmo/io.py:113
↓ 23 callersFunctionapply_keyword_prompt
(prompts, example, rng, keywords=None, dbg=False)
olmo/preprocessing/data_formatter.py:642
↓ 22 callersMethodencode
(self, x: str)
olmo/tokenizer.py:75
↓ 22 callersFunctionmaybe_download_and_unzip
(location, url, expected_dir=None)
olmo/data/utils.py:40
↓ 21 callersMethodload
(self)
olmo/data/dataset.py:93
↓ 19 callersMethod_check_videos
After download, check that all videos referenced in annotations exist.
olmo/data/academic_video_track_datasets.py:317
↓ 19 callersMethod_load_all_dataset_and_fps
Load/cache annotations across all tasks/splits, return {(data_split, video_name): fps}. video_name is the video identifier without file exten
olmo/data/academic_video_track_datasets.py:259
↓ 18 callersMethod_get_video_dir
(cls, data_split)
olmo/data/academic_video_track_datasets.py:1445
↓ 18 callersMethodreset_parameters
(self)
olmo/nn/llm.py:730
↓ 18 callersFunctionselect_checkpoint
returns the latest is checkpoint directory in `checkpoint`, returns `checkpoint` if it is already a checkpoint dir
olmo/util.py:606
↓ 17 callersMethod_create_videos
Convert frame dirs to videos, optionally in parallel.
olmo/data/academic_video_track_datasets.py:291
↓ 17 callersMethodapply
( self, state: ConstraintStateType, class_log_probabilities: torch.Tensor, )
olmo/nn/beam_search.py:672
↓ 16 callersFunctionparse_timestamp
(time_value: Union[str, float])
olmo/util.py:675
↓ 16 callersFunctionsplit_into_groups
partition `lst` into that the mininal number of groups that as evenly sized as possible and are at most `max_group_size` in size
olmo/util.py:229
↓ 16 callersFunctionwrite_file
Write something to a file in a local or remote directory. :param dir: The path/URL of the directory to write the file to. :param fname:
olmo/io.py:194
↓ 15 callersMethod__init__
(self, dim: int, hidden_dim: int, hidden_act: str, device: Union[str, torch.device] = None)
olmo/hf_model/modeling_molmo2.py:87
↓ 15 callersFunction_load_hf_dataset
Load an HF dataset, caching locally under VIDEO_DATA_HOME. If a local copy exists at VIDEO_DATA_HOME/{local_name}, loads from disk. Otherwise
olmo/data/molmo2_datasets.py:50
↓ 15 callersMethodget_lr
(self, initial_lr: float, step: int, max_steps: int, group_name: str=None)
olmo/train/optim.py:302
↓ 14 callersFunctionget_world_size
Get the world size of the default distributed process group. .. warning:: This will always return 1 if a distributed group has not b
olmo/dist_util.py:396
↓ 14 callersMethodreset_parameters
(self)
olmo/nn/image_vit.py:292
↓ 14 callersFunctionsave_local_dataset
(dataset: datasets.Dataset, location: str, n_procs, n_val=None)
olmo/data/utils.py:26
↓ 13 callersMethodbuild
(self, cache, device=None)
olmo/nn/llm.py:649
↓ 13 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:122
↓ 13 callersFunctionmaybe_download_file
(url, filename)
olmo/data/utils.py:121
↓ 12 callersFunction_load_hf_dataset
(hf_source, split, local_name=None, config=None, overwrite_cache=False)
olmo/data/academic_video_track_datasets.py:93
↓ 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/nn/llm.py:209
↓ 12 callersMethodsave
Save model, optim, and other training state to a local or remote directory.
olmo/train/checkpointer.py:176
↓ 11 callersMethod__init__
(self, config: LlmConfig, cache, device)
olmo/nn/llm.py:694
↓ 11 callersFunction_flatten_batch_dim
(x: torch.Tensor)
olmo/nn/flash_attention_api.py:19
↓ 11 callersFunction_get_s3_client
(scheme: str)
olmo/io.py:781
↓ 11 callersFunction_test_tokenization
(messages, n_at_start=None, preprocessor=None)
tests/data/test_preprocessor.py:17
↓ 11 callersMethoddtype
(self)
olmo/hf_model/modeling_molmo2.py:428
↓ 11 callersMethodformat_video_tracks
Format video tracks start_end_only: Only track the first and last point of each object first_object: Only track the first ob
olmo/preprocessing/point_formatter.py:24
↓ 11 callersFunctionget_local_rank
()
olmo/torch_util.py:91
↓ 11 callersFunctionglob
(path)
olmo/io.py:705
↓ 11 callersFunctionlist_directory
List the contents of a local or remote directory. If ``recurse=False``, only the immediate children of the directory are returned, otherwise
olmo/io.py:417
↓ 11 callersFunctionseconds_to_timestamp
(seconds, second_decimal_places=2)
olmo/preprocessing/data_formatter.py:626
↓ 10 callersMethod__init__
(self, split: str, flatten_annotations=False, sample=None)
olmo/data/academic_image_datasets.py:146
↓ 10 callersMethod_get_video_dir
(cls, split)
olmo/data/molmo2_video_track_datasets.py:1090
↓ 10 callersMethodextract_multi_image_points
(self, text, image_w, image_h)
olmo/preprocessing/point_formatter.py:56
↓ 10 callersFunctionflatten_dict
(xs, sep=None)
scripts/prepare_pretrained_model.py:17
↓ 10 callersMethodget
(self, idx, rng)
olmo/data/molmo2_video_track_datasets.py:392
↓ 10 callersMethodrun
(self)
olmo/util.py:401
↓ 9 callersMethod__init__
(self, in_features: int, n_pos: int)
olmo/hf_model/modeling_molmo_point.py:875
↓ 9 callersFunction_get_gcs_retry
()
olmo/io.py:606
↓ 9 callersMethodasdict
(self, exclude: Optional[Iterable[str]] = None)
olmo/config.py:67
↓ 9 callersMethodget
(self, idx, rng)
olmo/data/academic_video_track_datasets.py:674
↓ 9 callersFunctionget_openai_key
()
olmo/eval/evaluators.py:60
↓ 9 callersFunctionget_step_function
( transition_matrix: torch.Tensor, with_timestep: bool = False )
tests/beam_search_test.py:71
↓ 9 callersFunctionis_distributed
()
olmo/torch_util.py:59
↓ 8 callersMethod__init__
(self, config: VitConfig, device=None)
olmo/nn/image_vit.py:273
↓ 8 callersMethod_check_videos
Check that all videos referenced in annotations exist on disk. Uses _resolve_video_path to handle varying extensions for YouTube videos.
olmo/data/molmo2_video_track_datasets.py:1894
↓ 8 callersMethod_get_local_dir
Local cache path: tracking/{dataset_name}/{task}/{split}/
olmo/data/academic_video_track_datasets.py:249
↓ 8 callersMethodbuild_tokenizer
Tokenizer this model uses
olmo/models/molmo_point/molmo_point.py:225
↓ 8 callersFunctionclean_opt
(arg: str)
olmo/util.py:299
↓ 8 callersMethoddownload
(cls, n_procs=1)
olmo/data/dataset.py:28
↓ 8 callersFunctiondownload_pixmo_urls
Download urls from a PixMo dataset, return a map of urls->filename
olmo/data/dataset_builders/download_urls.py:133
↓ 8 callersFunctionget_video_source
Get video source downloader classes by name. Args: sources: list of source names, or None for all. Returns: dict of {source_n
olmo/data/molmo2_video_track_datasets.py:2003
↓ 8 callersMethodload
Load from a YAML file.
olmo/config.py:41
↓ 8 callersMethodload
(self)
olmo/data/academic_video_track_datasets.py:422
↓ 8 callersMethodload
Load model, optim, and other training state from a local or remote checkpoint directory created via :meth:`save()` or :meth:`save_asy
olmo/train/checkpointer.py:204
↓ 8 callersFunctionlog_extra_field
(field_name: str, field_value: Any)
olmo/util.py:76
↓ 7 callersMethod__init__
(self, split)
olmo/data/molmo2_datasets.py:1208
↓ 7 callersFunction_get_gcs_client
()
olmo/io.py:590
↓ 7 callersMethod_get_hf_config
Return the HF config name for loading a given task. MOT repos use task as config (e.g. "track", "ground"). SOT repo overrides to use
olmo/data/academic_video_track_datasets.py:240
↓ 7 callersFunction_validate_clip
(clip, duration)
olmo/data/video_loader.py:368
↓ 7 callersMethodattention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, attention_b
olmo/nn/llm.py:1895
↓ 7 callersFunctionbatch_pixels_to_patches
Reshape images of [n_images, h, w, 3] -> [n_images, n_patches, pixels_per_patch]
olmo/preprocessing/preprocessor_utils.py:111
↓ 7 callersMethodbuild_for_format
(pointing_format: str="html-v1", format_output_timestamp=DefaultTimestampFormatter())
olmo/preprocessing/point_formatter.py:120
↓ 7 callersMethodextract_points
(self, text, image_w, image_h)
olmo/preprocessing/point_formatter.py:53
↓ 7 callersFunctionflatten_list
(lst)
olmo/util.py:489
↓ 7 callersMethodformat_image_points
Format points for a single image
olmo/preprocessing/point_formatter.py:41
↓ 7 callersFunctiongc_cuda
()
olmo/torch_util.py:209
↓ 7 callersMethodget
(self, item, rng)
olmo/data/academic_image_datasets.py:407
↓ 7 callersFunctionget_absolute_coordinates
Convert normalized coordinates to absolute pixel coordinates.
olmo/util.py:528
↓ 7 callersFunctionget_dataset_by_name
(dataset_name, split)
olmo/data/get_dataset.py:42
↓ 7 callersMethodget_lr
(self, initial_lr: float, step: int, max_steps: int, group_name=None)
olmo/train/optim.py:361
next →1–100 of 2,270, ranked by callers