MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 7 callersFunctionget_rank
Get the rank within the process group.
olmo/torch_util.py:95
↓ 7 callersMethodget_video_path
Get the appropriate video path, preferring extracted clips when available.
olmo/data/academic_video_datasets.py:3339
↓ 7 callersFunctionload_image
(image_path)
olmo/preprocessing/image_preprocessor.py:54
↓ 7 callersFunctionprepare_cli_environment
(log_filter_type: Optional[LogFilterType] = None)
olmo/util.py:286
↓ 7 callersFunctionprepare_torchrun_environment
()
olmo/util.py:257
↓ 7 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
↓ 7 callersMethodtokenize_and_interleave
Build a batch by interleaving the text tokens from tokenizing `message_list` and the multi-modal tokens from `multi_model_tokens`
olmo/preprocessing/text_preprocessor.py:195
↓ 6 callersFunction_get_cache_path
Get cache file path for a video directory.
olmo/data/molmo2_datasets.py:397
↓ 6 callersMethod_get_candidate_fps
(self, video_fps)
olmo/data/academic_video_track_datasets.py:459
↓ 6 callersMethod_set_description
(self, description)
olmo/train/trainer.py:117
↓ 6 callersMethodapply_rotary_pos_emb
(self, pos_sin: torch.Tensor, pos_cos: torch.Tensor, t: torch.Tensor)
olmo/nn/llm.py:1338
↓ 6 callersFunctionbuild_embedded_image
Turns an image into a string that can be used as a src in html images
olmo/html_utils.py:460
↓ 6 callersMethodbuild_tokenizer
(self)
olmo/nn/llm.py:652
↓ 6 callersMethoddevice
(self)
olmo/hf_model/modeling_molmo2.py:1145
↓ 6 callersFunctiondir_is_empty
Check if a local or remote directory is empty. This also returns true if the directory does not exist. :param dir: Path/URL to the direc
olmo/io.py:319
↓ 6 callersMethoddownload
Download HF annotations and create videos for each source. Args: sources: list of source names to download, or None for all.
olmo/data/molmo2_video_track_datasets.py:285
↓ 6 callersMethodget
(self, idx, rng)
olmo/data/molmo2_datasets.py:1232
↓ 6 callersFunctionget_default_device
()
olmo/torch_util.py:159
↓ 6 callersFunctionget_evaluation
Gets the default evaluation config for task (or task:split string) `name`
olmo/eval/eval_utils.py:325
↓ 6 callersFunctionget_local_world_size
()
olmo/torch_util.py:80
↓ 6 callersFunctioninit_normal
( module: Union[nn.Linear, nn.Embedding], std: float, init_cutoff_factor: Optional[float] = None,
olmo/nn/llm.py:253
↓ 6 callersFunctionmuir_bench_mc
( target: str, prediction: str, options: List[str], fallback_to_random: bool = True, )
olmo/eval/vqa.py:700
↓ 6 callersFunctionpostprocess_prompt
Get a human-readable prompt by compressing the image tokens
olmo/html_utils.py:691
↓ 6 callersFunctionpreprocess_answer
(ans, cache={})
olmo/eval/vqa.py:89
↓ 6 callersMethodreset_parameters
(self)
olmo/nn/temporal_image_vit.py:87
↓ 6 callersMethodsave
Save to a YAML file.
olmo/config.py:63
↓ 5 callersFunction_flatten_dims
Flatten *dims* into a single dimension called *name*. :param device_mesh: The world-mesh object. Only views of *device_mesh* are actually mu
olmo/dist_util.py:250
↓ 5 callersFunction_is_hist
(metric_name)
olmo/eval/loss_evaluator.py:29
↓ 5 callersMethod_normalize_and_round_points
Helper to normalize and round points.
olmo/preprocessing/point_formatter.py:691
↓ 5 callersMethod_select_normalized_human_readable_label
Select a normalized label and find its human-readable equivalent.
olmo/preprocessing/data_formatter.py:771
↓ 5 callersMethodbuild
(cls, config: MolmoVisionBackboneConfig, outut_dim, device=None)
olmo/nn/vision_backbone.py:280
↓ 5 callersMethodbuild
(self, llm_config, vit_config, device)
olmo/models/molmo_point/molmo_point_connector.py:86
↓ 5 callersFunctionclear_directory
Clear out the contents of a local or remote directory. .. warning:: This function is potentially very destructive! By defau
olmo/io.py:374
↓ 5 callersFunctioncompute_hash
Computes the hash of a string.
olmo/util.py:53
↓ 5 callersFunctionextract_points
(text, image_w, image_h)
olmo/preprocessing/point_formatter.py:66
↓ 5 callersMethodgenerate
( self, batch, attention_bias: Optional[torch.Tensor] = None, max_steps: int =
olmo/models/model.py:164
↓ 5 callersFunctionget_dp_process_group
Get the data parallel process group associated with a ``DeviceMesh`` created from :func:`build_world_mesh()`. Like :func:`get_dp_mesh()`
olmo/dist_util.py:409
↓ 5 callersFunctionget_html_image_with_boxes
Build a HTML element containing `image_src` and the boxes in `boxes` on top of it. Provides a way to draw annotated images without have to load/m
olmo/html_utils.py:587
↓ 5 callersMethodget_point_string
(self, label, points, mode, tracking_ids=None)
olmo/models/molmo_point/molmo_point_data_formatter.py:176
↓ 5 callersFunctionget_special_token_ids
(tokenizer)
olmo/tokenizer.py:164
↓ 5 callersMethodload
(self)
olmo/data/academic_image_datasets.py:291
↓ 5 callersFunctionmove_to_device
(o: T, device: torch.device)
olmo/torch_util.py:133
↓ 5 callersMethodnum_params
(self, include_embedding: bool = True, include_inactive_params: bool = True)
olmo/models/model.py:158
↓ 5 callersMethodregister
(self, builder_id: str, entry_point, kwargs=None)
olmo/registry.py:25
↓ 5 callersMethodreset
(self)
olmo/train/trainer.py:230
↓ 5 callersFunctionreshape_for_pooling
Reshape the mask to match the pooled patches index. Args: mask (torch.Tensor): Input tensor of shape (B*T, N). pooled_pa
olmo/nn/temporal_image_vit.py:550
↓ 5 callersFunctionunflatten_dict
(xs, sep=None)
scripts/prepare_pretrained_model.py:36
↓ 5 callersFunctionupload
Upload source file to a target location on GCS or S3. :param source: Path to the file to upload. :param target: Target URL to upload to.
olmo/io.py:165
↓ 5 callersFunctionvit_activation_checkpoint_function
(cfg: VitConfig)
olmo/nn/image_vit.py:113
↓ 5 callersFunctionwait_for
Wait for the condition function to return True.
olmo/util.py:374
↓ 5 callersMethodwith_overrides
(self, other: Union[None, float, 'MessageWeight'])
olmo/preprocessing/text_preprocessor.py:33
↓ 4 callersMethod__init__
( self, end_index: int, *, max_steps: int = 50, beam_size: int = 10,
olmo/nn/beam_search.py:940
↓ 4 callersMethod_create_message_list
Convert HF row to message_list format matching TrackingDataset.
olmo/data/molmo2_video_track_datasets.py:338
↓ 4 callersFunction_extract_image_points
(predictions, ix, image_w, image_h)
olmo/eval/evaluators.py:79
↓ 4 callersMethod_get_full_video_dir
(cls, split)
olmo/data/molmo2_video_track_datasets.py:1094
↓ 4 callersMethod_get_scale
Get scale factor from example.
olmo/preprocessing/data_formatter.py:755
↓ 4 callersMethod_get_scale
Get scale factor from example.
olmo/models/molmo_point/molmo_point_data_formatter.py:72
↓ 4 callersMethod_parse_timestamp
Parse timestamp string like '00:00:01.089' to seconds.
olmo/data/academic_video_datasets.py:2099
↓ 4 callersMethod_precompute_gt_masks_for_split
Encode GT mask PNGs to COCO RLE and save as individual JSON files per query. Saves to: VIDEO_HOME/{data_split}/MasksRLE/{video_id}/{query_id}
olmo/data/academic_video_track_datasets.py:621
↓ 4 callersFunction_prepare_state_dict
( model: nn.Module, optim: Optional[torch.optim.Optimizer] = None, process_group: Optional[dist.Pr
olmo/train/distributed_checkpointing.py:686
↓ 4 callersFunction_to_float
(text: str)
olmo/eval/vqa.py:207
↓ 4 callersMethodadd_image_padding_embed
(self, image_features: torch.Tensor, image_masks: torch.Tensor)
olmo/nn/vision_backbone.py:432
↓ 4 callersFunctionarange_for_pooling
(idx_arr, pool_h, pool_w)
olmo/preprocessing/preprocessor_utils.py:131
↓ 4 callersMethodbuild
(self, tokenizer, image_preprocessor, text_seq_len=None, max_sequence_length=None)
olmo/models/molmo2/molmo2_preprocessor.py:32
↓ 4 callersMethodbuild_model
(self, device=None)
olmo/models/molmo/molmo.py:108
↓ 4 callersMethodbuild_point_output
Building pointing output using the pointing string
olmo/preprocessing/point_formatter.py:460
↓ 4 callersMethodbuild_point_str_from_coord_str
Building pointing string using the coordinate string
olmo/preprocessing/point_formatter.py:442
↓ 4 callersMethodbuild_preprocessor
Build a preprocessor that converts 'raw' image/text data from various tasks into tensors inputs/targets that can be passed to the mod
olmo/models/molmo/molmo.py:74
↓ 4 callersMethodbuild_tokenizer
Tokenizer this model uses
olmo/models/molmo/molmo.py:70
↓ 4 callersMethodbuild_tokenizer
Tokenizer this model uses
olmo/models/molmo2/molmo2.py:92
↓ 4 callersMethodclose
(self, exit_code: int = 0)
olmo/train/trainer.py:1436
↓ 4 callersMethodcompute
(self)
olmo/eval/loss_evaluator.py:52
↓ 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/dataset_builders/download_urls.py:200
↓ 4 callersFunctionflatten_lists
(xss)
olmo/util.py:225
↓ 4 callersFunctionflatten_lists
(xss)
olmo/data/dataset_builders/ai2d.py:18
↓ 4 callersFunctionformat_time
TODO [QUESTION]: Merge with `format_timestamps` in DataFormatter? Format time value for model input/output. Args: time_value: Ti
olmo/preprocessing/point_formatter.py:518
↓ 4 callersFunctionformat_value_and_unit
(value: int, unit: str)
olmo/util.py:632
↓ 4 callersMethodformat_video_points
Format video points for counting objects across frames.
olmo/preprocessing/data_formatter.py:1242
↓ 4 callersMethodformat_video_tracks
(self, frames_data, scale, label, points_to_indices, alt_text=None, rng=None, star
olmo/models/molmo_point/molmo_point_data_formatter.py:663
↓ 4 callersFunctiongenerate_uuid
Generate a unique ID.
olmo/util.py:599
↓ 4 callersFunctionget_bytes_range
Get a range of bytes from a local or remote file. :param source: Path/URL to the file. :param bytes_start: Byte offset to start at.
olmo/io.py:131
↓ 4 callersFunctionget_chat_response
Run a query through an OpenAI model
olmo/eval/api_utils.py:10
↓ 4 callersMethodget_cp_rotary_embedding
( self, seq_len: int, device: torch.device, rope_type: Optiona
olmo/nn/llm.py:1274
↓ 4 callersFunctionget_device_mesh_info
Get a human-readable string representation of a ``DeviceMesh``. :param device_mesh: The device mesh to get info for.
olmo/dist_util.py:68
↓ 4 callersFunctionget_num_nodes
()
olmo/train/remote_filesystem.py:54
↓ 4 callersMethodget_output_shapes
(self)
olmo/preprocessing/multimodal_preprocessor.py:200
↓ 4 callersMethodget_rotary_embedding
( self, seq_len: int, device: torch.device, rope_type: Optional[RopeType] = No
olmo/nn/llm.py:1233
↓ 4 callersMethodget_rotary_embedding
( self, dim: int, seq_len: int, device: torch.device, rope_type: Optio
olmo/models/molmo_point/modules.py:62
↓ 4 callersFunctionload_video_av_noseek
Load a video frames by decoding all frames with pyav More robust than `load_video_decord` but can by much slower for long videos
olmo/data/video_loader.py:523
↓ 4 callersMethodlog_evaluation
(self, eval_name, on_step, target_step)
olmo/train/trainer.py:145
↓ 4 callersMethodlog_metrics_to_console
(self, prefix: str, metrics: Dict[str, float])
olmo/train/trainer.py:945
↓ 4 callersMethodpost_process_image_text_to_text
Post-process the output of the model to decode the text. Args: generated_outputs (`torch.Tensor` or `np.ndarray`):
olmo/hf_model/processing_molmo2.py:400
↓ 4 callersFunctionquery_gpt
(prompt: str, openai_api_key: str, system_prompt: str = None, maxtry: int = 100)
olmo/eval/vixmo_caption_utils.py:77
↓ 4 callersMethodreset_parameters
(self)
olmo/nn/vision_backbone.py:180
↓ 4 callersFunctionresource_path
Returns an actual path for local or remote file, potentially downloading it if a copy doesn't exist locally yet.
olmo/io.py:64
↓ 3 callersMethod__init__
( self, vit_config: Molmo2VitConfig = None, adapter_config: Molmo2AdapterConfig = None
olmo/hf_model/configuration_molmo2.py:306
↓ 3 callersMethod__init__
(self, input_dim: int, config: TemporalVitConfig, device=None)
olmo/nn/temporal_image_vit.py:62
↓ 3 callersMethod_cast_if_autocast_enabled
(self, tensor: torch.Tensor, dtype: Optional[torch.dtype] = None)
olmo/nn/llm.py:981
↓ 3 callersFunction_download_file
(url, filename)
olmo/data/utils.py:133
↓ 3 callersFunction_ensure_coco2014_downloaded
()
olmo/data/academic_image_datasets.py:69
← previousnext →101–200 of 2,270, ranked by callers