MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 2 callersMethod_sample_at_fps
Sample frames at specified fps interval. Trick: generate timestamp grids based on sampling_fps, then use _filter_frames_to_video to a
olmo/preprocessing/data_formatter.py:1363
↓ 2 callersMethod_sample_at_fps
Sample frames at specified fps interval. Trick: generate timestamp grids based on sampling_fps, then use _filter_frames_to_video to a
olmo/models/molmo_point/molmo_point_data_formatter.py:517
↓ 2 callersMethod_sample_initial_point
Sample a single initial point from the first visible frame for the given point_id. Used for finding initial query point to track for
olmo/preprocessing/data_formatter.py:1302
↓ 2 callersMethod_sample_initial_point
Sample a single initial point from the first visible frame for the given point_id. Used for finding initial query point to track for
olmo/models/molmo_point/molmo_point_data_formatter.py:457
↓ 2 callersMethod_scale_point
(self, point, scale)
olmo/preprocessing/point_formatter.py:390
↓ 2 callersMethod_search
( self, start_predictions: torch.Tensor, start_state: StateType, step: StepFun
olmo/nn/beam_search.py:1067
↓ 2 callersFunction_split_by_size_and_type
(bins: int, items: List[WriteItem])
olmo/train/remote_filesystem.py:114
↓ 2 callersFunctionadd_cached_path_clients
Add additional cached-path clients, the enables files with the `weka://` prefix
olmo/io.py:995
↓ 2 callersMethodadd_pos_emb
(self, x: torch.Tensor, patch_num: int)
olmo/nn/image_vit.py:640
↓ 2 callersFunctionann_to_mask
Decodes RLE masks to binary mask
olmo/eval/object_tracking_utils.py:480
↓ 2 callersFunctionannotation_to_box
(points, point_dist=4)
olmo/eval/evaluators.py:99
↓ 2 callersMethodapply_connector
( self, pooling_fn: nn.Module, projector_fn: nn.Module, image_features: torch.
olmo/nn/vision_backbone.py:380
↓ 2 callersMethodapply_fsdp2
(self, **kwargs)
olmo/nn/llm.py:818
↓ 2 callersMethodapply_fsdp2
Fully shard this model using `fully_shard`
olmo/models/molmo2/molmo2.py:207
↓ 2 callersMethodapply_rotary_pos_emb
(self, pos_sin: torch.Tensor, pos_cos: torch.Tensor, t: torch.Tensor)
olmo/models/molmo_point/modules.py:106
↓ 2 callersFunctionarange_for_pooling
( idx_arr: np.ndarray, pool_h: int, pool_w: int, )
olmo/hf_model/image_processing_molmo2.py:238
↓ 2 callersMethodas_pt
(self)
olmo/config.py:116
↓ 2 callersMethodbuild
(self)
olmo/eval/model_evaluator.py:223
↓ 2 callersMethodbuild
(self)
olmo/train/optim.py:493
↓ 2 callersMethodbuild_collator
Collators for tensor the preprocessor produces
olmo/models/molmo/molmo.py:99
↓ 2 callersMethodbuild_dataset_evaluator
( self, model_config: MolmoConfig, mesh: DeviceMesh=None, de
olmo/eval/loss_evaluator.py:291
↓ 2 callersMethodbuild_dataset_evaluator
( self, model_config, mesh, default_save_dir, device, )
olmo/eval/inf_evaluator.py:472
↓ 2 callersMethodbuild_eval_dataloader
( self, model_config: MolmoConfig, mesh: DeviceMesh, batch_size: int,
olmo/data/data_loader.py:137
↓ 2 callersMethodbuild_evaluator
( self, model_config, device, default_save_dir,
olmo/eval/model_evaluator.py:125
↓ 2 callersFunctionbuild_html_table
(data: List[Dict[str, Any]], col_widths=None, fixed_width=False)
olmo/html_utils.py:472
↓ 2 callersMethodbuild_single_image_coordinates
Build coordinates for a single image
olmo/preprocessing/point_formatter.py:406
↓ 2 callersFunctionbuild_subsegment_pos_ids
(subsegments)
olmo/preprocessing/text_preprocessor.py:12
↓ 2 callersMethodbuild_token_bounds
(self, token_pooling)
olmo/hf_model/modeling_molmo_point.py:1050
↓ 2 callersFunctionbuild_tokenizer
( tokenizer_type, has_extra_token=True, tokenizer_dir="gs://mm-olmo/tokenizer", pad_tokenizer_to=N
olmo/tokenizer.py:101
↓ 2 callersMethodbuild_video_preprocessor
(self, tokenizer, image_preprocessor, add_end_of_mm_token=False)
olmo/preprocessing/video_preprocessor.py:60
↓ 2 callersFunctioncompute_cosine_sims
Compute cosine similarities between pooled patches. Args: x (torch.Tensor): Input tensor of shape (B*T, N, D). pooled_patches_idx
olmo/nn/temporal_image_vit.py:697
↓ 2 callersFunctioncompute_hash
(string: Union[str, bytes])
olmo/data/dataset_builders/download_urls.py:52
↓ 2 callersFunctioncompute_relative_change
(target: float, prediction: float)
olmo/eval/vqa.py:235
↓ 2 callersMethodcompute_rope_parameters
( self, seq_len: int, dim: int, device: torch.device, rope_type: RopeT
olmo/nn/llm.py:1210
↓ 2 callersFunctionconvert_legacy_config
Converts old monolithic model configs into the new format This also include some old backwards-compatibility fixes that are no longer needed
olmo/nn/legacy_config.py:63
↓ 2 callersFunctiondraw_abc_labels
(image_f, annotations, mode="in_box", use_transparent=False)
olmo/data/dataset_builders/ai2d.py:33
↓ 2 callersFunctionevaluate_one_sample
(events, response, prediction, openai_api_key, return_hit_num=False, is_recall=False, max_retry=10)
olmo/eval/dream_caption_utils.py:105
↓ 2 callersFunctionevaluate_video_object_tracking
Evaluate predictions with both spatial metrics (P/R/F1) and tracking metrics (HOTA).
olmo/eval/object_tracking_utils.py:1011
↓ 2 callersFunctionextract_any_points
(text, metadata)
olmo/preprocessing/point_formatter.py:90
↓ 2 callersFunctionextract_multi_image_points
(text, image_w, image_h)
olmo/preprocessing/point_formatter.py:74
↓ 2 callersMethodextract_multi_image_points
(self, text, image_w, image_h, extract_ids=False)
olmo/preprocessing/point_formatter.py:163
↓ 2 callersFunctionextract_short_answer
(prediction: float)
olmo/eval/vqa.py:239
↓ 2 callersFunctionextract_tracks
(text, width, height, video_fps, format=None)
olmo/preprocessing/point_formatter.py:82
↓ 2 callersMethodextract_tracks
(self, text, width, height, video_fps, format=None)
olmo/preprocessing/point_formatter.py:59
↓ 2 callersFunctionf1_score
(precision: float, recall: float, epsilon: float = 1e-10)
olmo/eval/evaluators.py:406
↓ 2 callersMethodfind_checkpoints
Find sharded checkpoints within a directory.
olmo/train/checkpointer.py:134
↓ 2 callersMethodformat_image_points
(self, points, scale, label, alt_text=None, mode="point_then_count", rng=None)
olmo/preprocessing/point_formatter.py:938
↓ 2 callersMethodformat_input_timestamps
Format input timestamp as text
olmo/models/molmo_point/molmo_point_data_formatter.py:833
↓ 2 callersMethodformat_messages
(cls, parts)
olmo/data/text_datasets.py:13
↓ 2 callersMethodformat_options
(self, example)
olmo/preprocessing/data_formatter.py:854
↓ 2 callersMethodformat_options
(self, example)
olmo/models/molmo_point/molmo_point_data_formatter.py:154
↓ 2 callersMethodformat_output_timestamp
Format output timestamp as text For output timestamps, the model should always use a consistent format
olmo/preprocessing/data_formatter.py:1654
↓ 2 callersMethodformat_points
(self, example)
olmo/preprocessing/data_formatter.py:876
↓ 2 callersMethodformat_points
(self, example, points_to_indices)
olmo/models/molmo_point/molmo_point_data_formatter.py:239
↓ 2 callersFunctionformat_time
TODO [QUESTION]: Merge with `format_timestamps` in DataFormatter? Format time value for model input/output. Args: time_value: Ti
olmo/eval/object_tracking_utils.py:21
↓ 2 callersMethodformat_video_points
(self, timestamps, points, scale, label, alt_text=None, mode="point_then_count", rng=None)
olmo/preprocessing/point_formatter.py:880
↓ 2 callersMethodforward_heuristic
Remove all pruned tokens found with the specified heuristic and rearrange them to reduce total batch size. Default heuristic
olmo/nn/temporal_image_vit.py:187
↓ 2 callersFunctionget_all_dataset_classes
Get all dataset classes
olmo/data/get_dataset.py:541
↓ 2 callersMethodget_beaker_url
(self)
olmo/train/trainer.py:111
↓ 2 callersMethodget_by_example_id
(self, example_id)
olmo/data/molmo2_video_track_datasets.py:430
↓ 2 callersFunctionget_candidate_target_fps
Return the subset of `video_fps` factors that remain multiples of `sampling_fps`. Examples: >>> get_candidate_target_fps(video_fps=6
olmo/hf_model/video_processing_molmo2.py:198
↓ 2 callersFunctionget_canonical_statements
(model_caption: str, openai_api_key: str)
olmo/eval/vixmo_caption_utils.py:93
↓ 2 callersFunctionget_chat_response
Run a query through an OpenAI model
olmo/eval/dream_caption_utils.py:11
↓ 2 callersFunctionget_checkpoint_metadata
Load the metadata from a checkpoint. :param dir: The path/URL to the checkpoint.
olmo/train/distributed_checkpointing.py:648
↓ 2 callersFunctionget_chunks
(prefix: str)
olmo/train/distributed_checkpointing.py:545
↓ 2 callersMethodget_connector_parameters
(self)
olmo/models/model.py:134
↓ 2 callersFunctionget_coords
(action)
olmo/eval/evaluators.py:418
↓ 2 callersFunctionget_default_load_path
(cfg)
scripts/prepare_pretrained_model.py:431
↓ 2 callersFunctionget_default_max_tokens
(name)
olmo/eval/eval_utils.py:213
↓ 2 callersFunctionget_element_size
Get the size in bytes of element of the given PyTorch dtype.
olmo/torch_util.py:245
↓ 2 callersMethodget_eta
(self)
olmo/train/trainer.py:1127
↓ 2 callersFunctionget_evaluator
Gets the default evaluator for task `name`
olmo/eval/eval_utils.py:7
↓ 2 callersMethodget_fsd2_args
(self, autocast_precision)
olmo/train/trainer_config.py:178
↓ 2 callersFunctionget_image_collage_coords_from_video_points
Convert video point text to coordinates Args: text: The text containing video points video_w: The width of the video vide
olmo/html_utils.py:108
↓ 2 callersFunctionget_llm_output
Get the response from the LLM model. Args: prompt (str): The prompt to send to the model. openai_api_key (str): OpenAI API key.
olmo/eval/mlvu_utils.py:58
↓ 2 callersFunctionget_llm_output
( prompt: str, openai_api_key: str, system_prompt: str=None, max_tokens: int=128, maxtry: int=10 )
olmo/eval/temp_compass_utils.py:86
↓ 2 callersMethodget_llm_parameters
(self)
olmo/models/model.py:140
↓ 2 callersMethodget_metric_file
(self, cfg: 'DatasetEvaluatorConfig')
olmo/eval/model_evaluator.py:267
↓ 2 callersFunctionget_model_types
Get a dictionary of model names to their classes
olmo/models/model_config.py:14
↓ 2 callersMethodget_pointing_modules
(self)
olmo/models/molmo_point/molmo_point.py:450
↓ 2 callersFunctionget_recall_statements
( gt_statements: str, caption_str: str, openai_api_key: str )
olmo/eval/vixmo_caption_utils.py:273
↓ 2 callersMethodget_spec
(cls, src: TokenizedVisionData)
olmo/preprocessing/preprocessor_utils.py:74
↓ 2 callersFunctionget_subpatch_ids
(output_text, pooling, no_more_points_class)
olmo/hf_model/modeling_molmo_point.py:65
↓ 2 callersMethodget_user_prompt
Build a list of strings of what a user might type in to the model for the given example, and its responses, by applying a prompt template to t
olmo/preprocessing/data_formatter.py:1670
↓ 2 callersMethodget_user_prompt
Build a list of strings of what a user might type in to the model for the given example, and its responses, by applying a prompt template to t
olmo/models/molmo_point/molmo_point_data_formatter.py:866
↓ 2 callersMethodget_vit_parameters
(self)
olmo/models/model.py:137
↓ 2 callersMethodgumbel_with_max
Sample `Gumbel(phi)` conditioned on the maximum value being equal to `T`. `phi` should have shape `(batch_size, num_classes)` and `T
olmo/nn/beam_search.py:532
↓ 2 callersMethodinference_eval
(self)
olmo/train/trainer.py:999
↓ 2 callersFunctioninit_client
Initialize the right client for the given remote resource. This is helpful to avoid threading issues with boto3.
olmo/io.py:472
↓ 2 callersMethodinit_state
( self, start_class_log_probabilities: torch.Tensor, batch_size: int, num_classes: int )
olmo/nn/beam_search.py:93
↓ 2 callersFunctioninterpolate_frame_scores
Interpolate frame scores to a target number of frames using bilinear interpolation. Args: scores: Original scores array, sampled at
olmo/util.py:654
↓ 2 callersFunctionis_distributed
Check if in a distributed context.
olmo/dist_util.py:389
↓ 2 callersFunctionis_interactive
()
olmo/util.py:278
↓ 2 callersFunctionis_point_in_tublet
Check if the point (t, x, y) is within the region defined by the boolean mask. Parameters: - point (tuple of floats): (t, x, y) coordina
olmo/eval/evaluators.py:2795
↓ 2 callersFunctionis_unsharded_checkoint
(dir: PathOrStr)
olmo/train/checkpointer.py:82
↓ 2 callersMethodlist
(self)
olmo/registry.py:46
↓ 2 callersMethodload
(self)
olmo/data/molmo2_video_track_datasets.py:323
↓ 2 callersFunctionload_masks_at_frame
Get all binary masks for frame from HF gt_masks. Args: gt_masks: {'mask_id': } frame_idx: Frame index to get masks for
olmo/eval/object_tracking_utils.py:600
↓ 2 callersFunctionload_model_state_unsharded
Load model state in-place for unsharded chechpoint saved in `dir`, works for sharded and unsharded models
olmo/train/checkpointer.py:42
↓ 2 callersMethodload_video
(self, *args, **kwargs)
olmo/preprocessing/video_preprocessor.py:104
← previousnext →301–400 of 2,270, ranked by callers