MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 1 callersMethodbuild_logit_processor
(self, token_pooling)
olmo/hf_model/modeling_molmo_point.py:1654
↓ 1 callersMethodbuild_optimizer
(self, max_grad_norm, max_grad_norm_ratio, model: nn.Module)
olmo/train/optim.py:176
↓ 1 callersFunctionbuild_option_instructions
(option_type)
olmo/preprocessing/multiple_choice_templates.py:29
↓ 1 callersFunctionbuild_option_name_instructions
(option_type)
olmo/preprocessing/multiple_choice_templates.py:7
↓ 1 callersFunctionbuild_option_name_templates
(question: str, options: str, option_type)
olmo/preprocessing/multiple_choice_templates.py:74
↓ 1 callersFunctionbuild_option_templates
(q, opts, instr)
olmo/preprocessing/multiple_choice_templates.py:54
↓ 1 callersFunctionbuild_overlapping_crops
Decompose an image into a set of overlapping crops :return crop_arr: [n_crops, h, w, 3] The crops :return patch_idx: [overlap_patch_h, overla
olmo/hf_model/image_processing_molmo2.py:126
↓ 1 callersMethodbuild_overlapping_crops
Decompose an image into a set of overlapping crops :return crop_arr: [n_crops, h, w, 3] The crops :return mask_arr: [n_crops, h, w] T
olmo/preprocessing/image_preprocessor.py:451
↓ 1 callersFunctionbuild_pointing_targets
Build ground truth target ids for an image
olmo/models/molmo_point/molmo_point_example_preprocessor.py:66
↓ 1 callersFunctionbuild_pointing_targets_multi_image
Build ground truth target ids for set of images
olmo/models/molmo_point/molmo_point_example_preprocessor.py:86
↓ 1 callersFunctionbuild_pointing_targets_video
Build ground truth target ids for a video
olmo/models/molmo_point/molmo_point_example_preprocessor.py:75
↓ 1 callersMethodbuild_preprocessor
(self)
olmo/nn/vision_backbone.py:104
↓ 1 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_point/molmo_point.py:229
↓ 1 callersMethodbuild_preprocessor
(self, vit)
olmo/models/molmo_point/molmo_point_connector.py:75
↓ 1 callersFunctionbuild_qualitative_table
( name, split, n, preprocessor, shuffle=True, show_patches=False, show_crops=False
scripts/dataset_visualize.py:29
↓ 1 callersFunctionbuild_resized_image
( image: np.ndarray, base_image_input_size: list[int], resample: PILImageResampling, image_mea
olmo/hf_model/image_processing_molmo2.py:106
↓ 1 callersFunctionbuild_resized_image
( image: np.ndarray, base_image_input_size: list[int], resample: PILImageResampling, image_mea
olmo/hf_model/video_processing_molmo2.py:104
↓ 1 callersMethodbuild_train_dataloader
( self, model_config: MolmoConfig, mesh: DeviceMesh, global_batch_size: int,
olmo/data/data_loader.py:308
↓ 1 callersFunctionbuild_video_asset
(video_src, src_folder, clip=None)
olmo/html_utils.py:162
↓ 1 callersMethodbuild_video_loader
(self)
olmo/data/video_loader.py:290
↓ 1 callersMethodbuild_video_track_coordinates
(self, point_tracks: List[PointTrack], scale, skip_occluded=True)
olmo/preprocessing/point_formatter.py:263
↓ 1 callersFunctionbuild_world_mesh
Build a :class:`~torch.distributed.device_mesh.DeviceMesh` suitable for the given parallel strategies. .. seealso:: Pass the mesh cr
olmo/dist_util.py:426
↓ 1 callersMethodbulid
(self, text_max_len, image_max_len, mesh=None)
olmo/data/dynamic_packer.py:321
↓ 1 callersFunctioncall_azure_gpt_api
(events, reference, prediction, openai_api_key, maxtry: int = 100)
olmo/eval/dream_caption_utils.py:73
↓ 1 callersFunctioncall_azure_gpt_api_for_events
(caption, openai_api_key, maxtry: int = 100)
olmo/eval/dream_caption_utils.py:127
↓ 1 callersFunctioncausal_attention_bias
(seq_len: int, device: torch.device)
olmo/nn/llm.py:1539
↓ 1 callersMethodcheck
(self, device)
olmo/train/trainer.py:194
↓ 1 callersMethodcheck
(self)
olmo/train/trainer.py:233
↓ 1 callersMethodcheck
(self)
olmo/train/trainer.py:251
↓ 1 callersMethodcheck_if_cancelled
(self)
olmo/train/trainer.py:1103
↓ 1 callersFunctioncheck_is_number
Check if the given string a number.
olmo/eval/mmmu_eval_utils.py:99
↓ 1 callersFunctionclip_grad_norm
(parameters, max_grad_norm: float, norm_type: float = 2.0, foreach: Optional[bool] = None)
olmo/torch_util.py:252
↓ 1 callersMethodcompile_args
(self)
olmo/train/trainer_config.py:90
↓ 1 callersMethodcompute_hota
Compute HOTA metrics given prepared data. Adapted from TrackEval HOTA implementation.
olmo/eval/object_tracking_utils.py:896
↓ 1 callersFunctioncompute_image_shard_boundaries
Pre-compute image shard boundaries for each GPU rank. Args: cum_image_bounds: Cumulative image counts for each input cum
olmo/data/dynamic_packer.py:15
↓ 1 callersMethodcompute_inv_frequency
( self, seq_len: int, dim: int, device: torch.device, rope_type: RopeT
olmo/models/molmo_point/modules.py:51
↓ 1 callersMethodcompute_iou
Compute IoU (Intersection over Union) between two temporal segments.
olmo/eval/evaluators.py:1112
↓ 1 callersMethodcompute_metrics
Compute precision, recall, and F1 score for predicted segments. Uses IoU threshold to determine if a prediction matches a ground trut
olmo/eval/evaluators.py:1133
↓ 1 callersFunctioncompute_precision
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks: List[np.ndarray])
olmo/eval/evaluators.py:390
↓ 1 callersFunctioncompute_precision
Compute precision: correctly placed points / total predicted points. (Adapted from olmo.eval.evaluators.py)
olmo/eval/object_tracking_utils.py:520
↓ 1 callersFunctioncompute_precision_tublet
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks_list: List[Dict[float, np.ndarray]])
olmo/eval/evaluators.py:2808
↓ 1 callersFunctioncompute_recall
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks: List[np.ndarray])
olmo/eval/evaluators.py:398
↓ 1 callersFunctioncompute_recall
Compute recall: correctly placed points / total ground truth points. (Adapted from olmo.eval.evaluators.py)
olmo/eval/object_tracking_utils.py:536
↓ 1 callersFunctioncompute_recall_tublet
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks_list: List[Dict[float, np.ndarray]])
olmo/eval/evaluators.py:2815
↓ 1 callersFunctioncompute_tapvid_metrics
Computes TAP-Vid metrics (Jaccard, Pts. Within Thresh, Occ. Acc.) See the TAP-Vid paper for details on the metric computation. All inputs are
olmo/eval/point_tracking_utils.py:180
↓ 1 callersMethodcompute_yarn_inv_freq
(self, seq_len: int, dim: int, device: torch.device)
olmo/nn/llm.py:1135
↓ 1 callersFunctionconvert_config
Convert config to HF-compatible config
olmo/hf_model/convert_molmo2_to_hf.py:132
↓ 1 callersFunctionconvert_config
Convert config to HF-compatible config
olmo/hf_model/convert_molmo_point_to_hf.py:40
↓ 1 callersFunctionconvert_lm_head_and_prefix
( state_dict: dict[str, Any], base_model_prefix: str, weight_tying: bool )
olmo/hf_model/convert_molmo2_to_hf.py:275
↓ 1 callersFunctionconvert_model
Convert model to HF-compatible model
olmo/hf_model/convert_molmo2_to_hf.py:325
↓ 1 callersFunctionconvert_model
Convert model to HF-compatible model
olmo/hf_model/convert_molmo_point_to_hf.py:252
↓ 1 callersFunctionconvert_molmo2
( state_dict: dict[str, Any], config: Molmo2Config, weight_tying: bool, )
olmo/hf_model/convert_molmo2_to_hf.py:294
↓ 1 callersFunctionconvert_molmo_point
( state_dict: dict[str, Any], config: MolmoPointConfig, weight_tying: bool, )
olmo/hf_model/convert_molmo_point_to_hf.py:200
↓ 1 callersFunctionconvert_state_dict_to_dtensor
(state_dict, mesh, placements)
olmo/train/distributed_checkpointing.py:339
↓ 1 callersFunctionconvert_vision_backbone
(config)
olmo/nn/legacy_config.py:47
↓ 1 callersMethodcp_attention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, attention_b
olmo/nn/llm.py:1739
↓ 1 callersFunctioncreate_test_prompt
(demo_prompt, query, response)
olmo/eval/math_vista_utils.py:119
↓ 1 callersFunctioncreate_test_prompt
(answers, response)
olmo/eval/llm_judge_utils.py:47
↓ 1 callersMethodcreate_video_from_frames
Creates a video file from a sequence of frames in a directory. Args: frames_dir (str): Directory containing the frames
olmo/data/academic_video_datasets.py:686
↓ 1 callersFunctioncross_entropy_loss
( logits, labels, ignore_index: int = -100, reduction: str = "mean", compute_z_loss: bool = False, z_loss_
olmo/train/trainer.py:261
↓ 1 callersFunctiondebug
()
olmo/preprocessing/multiple_choice_templates.py:209
↓ 1 callersFunctiondecode_key
(key: str)
olmo/safetensors_util.py:30
↓ 1 callersMethoddetect_format
Heuristic to detect format of the prediction text.
olmo/eval/object_tracking_utils.py:129
↓ 1 callersFunctiondino_resize_and_pad
( image: np.ndarray, desired_output_size: Tuple[int, int], )
olmo/preprocessing/image_preprocessor.py:267
↓ 1 callersFunctiondispatch_flash_attn
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, *, cu_seqlens: Optional[torch.Tensor]
olmo/nn/flash_attention_api.py:24
↓ 1 callersFunctiondispatch_ring_flash_attn
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, *, group: dist.ProcessGroup, stra
olmo/nn/flash_attention_api.py:116
↓ 1 callersFunctiondo_n_at_a_time
Call a function ``f`` in a distributed context from at most ``n`` ranks at a time. All ranks will eventually call the given function exactly
olmo/train/remote_filesystem.py:58
↓ 1 callersMethoddownload
(cls, n_procs=1, check_sha=False, n_val=2048, cache_only=False, sample=None)
olmo/data/pixmo_datasets.py:367
↓ 1 callersMethoddownload
(cls, n_procs=1)
olmo/data/academic_video_datasets.py:368
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4114
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4172
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4256
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4393
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4518
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:4603
↓ 1 callersMethoddownload
(cls, num_procs=None)
olmo/data/academic_video_datasets.py:5077
↓ 1 callersMethoddownload
(cls, num_procs=None)
olmo/data/academic_video_datasets.py:5143
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5201
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5265
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5354
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5442
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5582
↓ 1 callersMethoddownload
(cls, n_procs=None)
olmo/data/academic_video_datasets.py:5712
↓ 1 callersMethoddownload
(cls, n_procs=1)
olmo/data/academic_video_track_datasets.py:1449
↓ 1 callersFunctiondownload_and_untar
(location, url)
olmo/data/utils.py:83
↓ 1 callersFunctiondownload_and_unzip
(location, url)
olmo/data/utils.py:49
↓ 1 callersFunctiondownload_datasets
(datasets: List, n_procs: int = 8)
scripts/download_datasets.py:13
↓ 1 callersFunctiondownload_video_sources
Download and create videos for specified sources. Args: dataset: 'train', 'eval', 'molmopoint-trackany', or 'molmopoint-tracksyn'
olmo/data/molmo2_video_track_datasets.py:2068
↓ 1 callersFunctioneasy_prune
Prune tokens based on their validity and similarity scores. Easy version that only looks at the immediate previous frame. Args: valid
olmo/nn/temporal_image_vit.py:856
↓ 1 callersFunctionego3d_bench_eval_exact_num
(target: str, prediction: str)
olmo/eval/vqa.py:730
↓ 1 callersFunctionego3d_bench_extract_number
(text: str)
olmo/eval/vqa.py:722
↓ 1 callersFunctionego3d_bench_score
(target: str, prediction: str, task: str, options: List[str] | None)
olmo/eval/vqa.py:739
↓ 1 callersFunctionego_schema_get_multi_choice_info
(options: List[str])
olmo/eval/vqa.py:424
↓ 1 callersFunctionego_schema_parse_multi_choice_response
Parse the prediction from the generated response. Return the predicted index e.g., A, B, C, D. https://github.com/MMMU-Benchmark/MMMU/blo
olmo/eval/vqa.py:435
↓ 1 callersFunctionencode_frames_to_video
Convert a directory of image frames to an H.264 .mp4 using ffmpeg. Frames are first subsampled for FPS conversion (if native_fps differs from
olmo/data/academic_video_track_datasets.py:117
↓ 1 callersMethodencode_image
: param images: (batch_size, num_crops, num_patch, n_pixels)
olmo/hf_model/modeling_molmo2.py:409
↓ 1 callersMethodencode_image
: param images: (batch_size, num_crops, num_patch, n_pixels)
olmo/nn/vision_backbone.py:354
↓ 1 callersMethodencode_image
: param images: (batch_size, num_crops, num_patch, n_pixels)
olmo/nn/temporal_vision_backbone.py:26
↓ 1 callersFunctionencode_key
(key: STKey)
olmo/safetensors_util.py:24
↓ 1 callersFunctionensure_finite_
Modify ``x`` in place to replace ``float("-inf")`` with the minimum value of the dtype when ``check_neg_inf`` is ``True`` and to replace ``fl
olmo/torch_util.py:148
← previousnext →601–700 of 2,270, ranked by callers