MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 1 callersFunctionparse_grounding_predictions
Parse point_ground_start_end predictions to extract grounded objects with start points. Used for creating synthetic single_point_track_per_fr
olmo/eval/pointing_e2e_utils.py:19
↓ 1 callersFunctionparse_llm_output
(llm_output: str, gt_answer: str)
olmo/eval/temp_compass_utils.py:110
↓ 1 callersMethodparse_mcq_lines
Assumes: - line 1 = question - lines 2..n = options (one per line) Accepts options like "(A) foo", "A) foo", "A.
olmo/data/academic_video_datasets.py:1161
↓ 1 callersFunctionparse_result
(id_, question, response, all_choices, index2ans, gt)
olmo/eval/tomato_eval.py:74
↓ 1 callersMethodparse_segments
Parse temporal segments from text output. Expected format: "[start1-end1], [start2-end2], ..." Returns a list of [start, end]
olmo/eval/evaluators.py:1088
↓ 1 callersFunctionparse_single_point_prediction_to_point_tracks
Parse single_point_track_per_frame model output. Expected format matches data_formatter.py: "[x, y, time], [x, y, time], [x, y, time
olmo/eval/object_tracking_utils.py:445
↓ 1 callersFunctionparse_tracking_prediction_to_point_tracks
Extracts point coordinates and timestamps from raw text predictions and calculates frame indices based on video FPS. Converts into s
olmo/eval/object_tracking_utils.py:339
↓ 1 callersFunctionparse_tracking_prediction_with_occlusion_to_point_trajectory
( prediction_text: str, video_width: int, video_height: int, video_fps: int )
olmo/eval/point_tracking_utils.py:127
↓ 1 callersMethodparse_video_point_ground_start_end
(text, width, height, video_fps)
olmo/eval/object_tracking_utils.py:85
↓ 1 callersMethodparse_video_point_track_all_frames_with_occlusion
(text, width, height, video_fps)
olmo/eval/point_tracking_utils.py:37
↓ 1 callersMethodparse_video_point_track_per_frame
(text, width, height, video_fps)
olmo/eval/object_tracking_utils.py:79
↓ 1 callersMethodparse_video_single_point_track_per_frame
(text, width, height, video_fps)
olmo/eval/object_tracking_utils.py:91
↓ 1 callersMethodpoints_to_text
(self, points, scale, label_text, alt_text)
olmo/preprocessing/point_formatter.py:830
↓ 1 callersFunctionpre_parser
(response, all_choices, index2ans)
olmo/eval/tomato_eval.py:51
↓ 1 callersMethodprepare_data_for_hota
Convert trajectory data to HOTA format. Returns: data: dict with keys needed for HOTA computation
olmo/eval/object_tracking_utils.py:789
↓ 1 callersFunctionprocessDigitArticle
(inText)
olmo/eval/vqa.py:73
↓ 1 callersFunctionprocessPunctuation
(inText)
olmo/eval/vqa.py:62
↓ 1 callersFunctionprocess_video_clips
Process all clips for a single video in parallel. Args: video_data (tuple): Tuple of (video_path, clips_list) output_pat
scripts/extract_ego4d_clips.py:124
↓ 1 callersMethodprune_with_scorer
Score tokens based on results from `TemporalTokenScorer`, then sort them by topk to prune them. Args: x (torch.Tensor): The input
olmo/nn/temporal_image_vit.py:493
↓ 1 callersMethodqa_template
(data)
olmo/data/academic_video_datasets.py:397
↓ 1 callersMethodqa_template
(self, data)
olmo/data/academic_video_datasets.py:777
↓ 1 callersMethodqa_template
(self, qa_data)
olmo/data/academic_video_datasets.py:1078
↓ 1 callersMethodqa_template
(self, data)
olmo/data/academic_video_datasets.py:1202
↓ 1 callersMethodqo_template
(self, question, options, format: str, sep: str = ".")
olmo/data/academic_multi_image_datasets.py:51
↓ 1 callersMethodquestion_template
(self, question, options)
olmo/data/academic_video_datasets.py:1288
↓ 1 callersMethodquestion_template
(self, question, options)
olmo/data/academic_video_datasets.py:1562
↓ 1 callersMethodquestion_template
(self, question, options, format: str, sep: str = ".")
olmo/data/academic_multi_image_datasets.py:159
↓ 1 callersFunctionrandom_prune
Randomly prune tokens for sanity check. Args: valid_mask (torch.Tensor): A mask indicating valid tokens. num_to_prune (torch
olmo/nn/temporal_image_vit.py:955
↓ 1 callersFunctionrank0_resource_path
Call `resource_path` with the given args for the rank0 process, other ranks will wait until rank0 is done downloading. Should be called
olmo/util.py:405
↓ 1 callersFunctionreal_world_qa_score
( target: str, prediction: str, metadata: dict, )
olmo/eval/vqa.py:322
↓ 1 callersFunctionrelaxed_correctness
Calculates relaxed correctness. The correctness tolerates certain error ratio defined by max_relative_change. See https://arxiv.org/pdf/2203.
olmo/eval/vqa.py:185
↓ 1 callersMethodremap_integers
(arr)
olmo/models/molmo_point/molmo_point_example_preprocessor.py:139
↓ 1 callersMethodrender_message
(self, *, record: logging.LogRecord, message: str)
olmo/util.py:346
↓ 1 callersFunctionreplace_images
(question, options, max_images=None)
olmo/data/academic_multi_image_datasets.py:16
↓ 1 callersMethodreset
(self)
olmo/eval/loss_evaluator.py:45
↓ 1 callersMethodreset_parameters
(self)
olmo/nn/image_vit.py:456
↓ 1 callersMethodreset_parameters
(self)
olmo/nn/image_vit.py:629
↓ 1 callersFunctionresize_and_pad
Resize an image while padding to preserve uts aspect ratio.
olmo/preprocessing/image_preprocessor.py:138
↓ 1 callersFunctionresize_image
( image: np.ndarray, desired_output_size: list[int], resample: PILImageResampling, )
olmo/hf_model/video_processing_molmo2.py:61
↓ 1 callersMethodrestore_checkpoint
( self, load_path: PathOrStr, local_cache: Optional[PathOrStr] = None, load_op
olmo/train/trainer.py:642
↓ 1 callersMethodrestore_rng_state
(self, rng_state: Dict[str, Any])
olmo/train/trainer.py:596
↓ 1 callersMethodrotate_half
(self, x: torch.Tensor)
olmo/hf_model/modeling_molmo_point.py:178
↓ 1 callersMethodrotate_half
(self, x: torch.Tensor)
olmo/nn/llm.py:1325
↓ 1 callersMethodrotate_half
(self, x: torch.Tensor)
olmo/models/molmo_point/modules.py:100
↓ 1 callersFunctionsafetensors_file_to_state_dict
(filename: PathOrStr, map_location: Optional[str] = None)
olmo/safetensors_util.py:77
↓ 1 callersMethodsample_beams
Returns the beams with the highest perturbed log probabilities.
olmo/nn/beam_search.py:485
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/nn/beam_search.py:100
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/nn/beam_search.py:146
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/nn/beam_search.py:182
↓ 1 callersFunctionsave
( checkpoint_dir: str, output_dir: str, use_bfloat16: bool, attn_implementation: str, over
olmo/hf_model/convert_molmo2_to_hf.py:350
↓ 1 callersFunctionsave
( checkpoint_dir: str, output_dir: str, use_bfloat16: bool, attn_implementation: str, over
olmo/hf_model/convert_molmo_point_to_hf.py:277
↓ 1 callersFunctionsave
(state_dict: Dict[str, Any], path: Path)
olmo/train/distributed_checkpointing.py:530
↓ 1 callersFunctionsave_image
(args)
olmo/preprocessing/image_preprocessor.py:89
↓ 1 callersFunctionsave_image
(args)
olmo/data/utils.py:165
↓ 1 callersFunctionsave_images
( pil_images: Iterable[PIL.Image.Image], filenames: List[str], n_procs: int = 1, )
olmo/data/utils.py:186
↓ 1 callersFunctionsave_model_and_optim_state
Save model and optimizer state dictionaries. The model state can be a sharded model, in which case this method will correctly handle the opti
olmo/train/distributed_checkpointing.py:98
↓ 1 callersFunctionsave_unsharded
Save model, optim, and other training state to a local or remote directory unsharded :warning This can be very slow if saving to a remote dir
olmo/train/checkpointer.py:59
↓ 1 callersFunctionscifi_relaxed_correctness
( target: str, prediction: str, max_relative_change: float = 0.05)
olmo/eval/vqa.py:226
↓ 1 callersMethodscore
Score the final predictions found by beam search. Returns a tensor of the final sequence scores of shape `(batch_size, beam_size)`.
olmo/nn/beam_search.py:564
↓ 1 callersFunctionseconds_to_timestamp
(seconds)
olmo/preprocessing/point_formatter.py:509
↓ 1 callersMethodseen_example
Whether the checkpointed dataloader already produced example number `on_example`
olmo/data/iterable_dataset_mixture.py:55
↓ 1 callersFunctionselect_ego_schema_option
(prediction: str, options: List[str])
olmo/eval/vqa.py:499
↓ 1 callersFunctionselect_perception_test_option
(prediction: str)
olmo/eval/vqa.py:406
↓ 1 callersFunctionselect_subset_2d_knapsack
Vectorized 2D knapsack dynamic program solver
olmo/data/dynamic_packer.py:354
↓ 1 callersFunctionselect_tiling
Divide in image of size [w, h] in up to max_num_patches of size patch_size
olmo/hf_model/image_processing_molmo2.py:73
↓ 1 callersMethodselect_vqa_answer
(self, answers, rng)
olmo/preprocessing/data_formatter.py:1498
↓ 1 callersMethodselect_vqa_answer
(self, answers, rng)
olmo/models/molmo_point/molmo_point_data_formatter.py:692
↓ 1 callersMethodset_decoder
(self, decoder)
olmo/hf_model/modeling_molmo_point.py:1066
↓ 1 callersMethodset_decoder
(self, decoder)
olmo/hf_model/modeling_molmo2.py:1138
↓ 1 callersFunctionset_env_variables
()
olmo/util.py:251
↓ 1 callersFunctionsetup_gcp_credentials
()
olmo/util.py:538
↓ 1 callersFunctionsetup_logging
:param rank0_only: INFO and below messages will only be emitted on the rank0 process.
olmo/util.py:85
↓ 1 callersFunctionsetup_pil
()
olmo/data/utils.py:160
↓ 1 callersFunctionsetup_pil
()
olmo/data/dataset_builders/download_urls.py:35
↓ 1 callersFunctionsetup_s3_credentials
()
olmo/util.py:549
↓ 1 callersMethodshould_checkpoint_block
(self, block_idx: int)
olmo/nn/llm.py:666
↓ 1 callersMethodshould_log_optim_metrics_this_step
(self)
olmo/train/trainer.py:977
↓ 1 callersMethodshould_log_this_step
(self)
olmo/train/trainer.py:991
↓ 1 callersFunctionsiglip_resize_and_pad
( image: np.ndarray, desired_output_size: Tuple[int, int], float32=True )
olmo/preprocessing/image_preprocessor.py:222
↓ 1 callersMethodsplit_batch
(self, batch: Dict[str, Any])
olmo/train/trainer.py:915
↓ 1 callersMethodsplit_gcs_path
(url: str)
olmo/io.py:981
↓ 1 callersFunctionsplit_list
(lst, split_size)
olmo/util.py:477
↓ 1 callersFunctionsplit_video_ffmpeg
Split video using ffmpeg with re-encoding for reliability. Why re-encode instead of copy? - Codec copy (-c copy) cuts at non-keyframe positio
olmo/data/molmo2_video_track_datasets.py:58
↓ 1 callersMethodstorage_meta
(self)
olmo/train/remote_filesystem.py:314
↓ 1 callersFunctiontable_string
Table as listoflists to evenly spaces string
olmo/util.py:582
↓ 1 callersFunctiontemp_compass_score
( prediction: str, metadata: dict, openai_api_key: str, use_api: bool = True, )
olmo/eval/temp_compass_utils.py:260
↓ 1 callersMethodtemplate_options
Template a multiple choice questions
olmo/preprocessing/data_formatter.py:804
↓ 1 callersMethodtemplate_options
(self, example, is_training, rng)
olmo/models/molmo_point/molmo_point_data_formatter.py:105
↓ 1 callersMethodtoken_ids_to_coordinates
Convert patch/location ids generated by the model to pixel coordinates text: str string output for the model target_ids: [n_points, 2
olmo/models/molmo_point/molmo_point.py:273
↓ 1 callersMethodtokenize_message_list
Handle multi-annotation data where we have many annotations for one multi-modal input
olmo/preprocessing/text_preprocessor.py:117
↓ 1 callersMethodtokenize_message_list
Handle multi-annotation data where we have many annotations for one multi-modal input
olmo/models/molmo_point/molmo_point_text_preprocessor.py:96
↓ 1 callersMethodtokenizer
(self)
olmo/preprocessing/multimodal_preprocessor.py:204
↓ 1 callersMethodtrain_batch
(self, batch: Dict[str, Any], compute_metrics)
olmo/train/trainer.py:750
↓ 1 callersMethodtrain_step
(self, batch: Dict[str, Any], compute_metrics: bool = True)
olmo/train/trainer.py:839
↓ 1 callersMethodtrainer_state_dict
(self)
olmo/train/trainer.py:491
↓ 1 callersMethodulysses
(cls, degree: int, head_stride: int = 1)
olmo/train/trainer_config.py:380
↓ 1 callersFunctionunflatten_dict
(d: Dict[STKey, torch.Tensor])
olmo/safetensors_util.py:52
↓ 1 callersFunctionunnormalize_image
Normalizes the image to zero mean and unit variance.
olmo/html_utils.py:46
↓ 1 callersMethodupdate_legacy_settings
Update the legacy config settings whose schemas have undergone backwards-incompatible changes.
olmo/config.py:23
↓ 1 callersMethodupdate_legacy_settings
(cls, config: D)
olmo/models/molmo/molmo.py:58
← previousnext →901–1,000 of 2,270, ranked by callers