MCPcopy Create free account

hub / github.com/allenai/molmo2 / functions

Functions2,270 in github.com/allenai/molmo2

↓ 2 callersFunctionload_video_torchcodec
( video_path: str, frame_sampler: TimeSampler, clip=None, seek_mode="exact" )
olmo/data/video_loader.py:390
↓ 2 callersMethodlog_init
(self)
olmo/train/trainer.py:126
↓ 2 callersMethodloss_eval
(self)
olmo/train/trainer.py:1067
↓ 2 callersMethodmake
(self, builder_id: str, **override_kwargs)
olmo/registry.py:34
↓ 2 callersFunctionmake_random_state
(seed: int, *seeds: int)
olmo/data/utils.py:213
↓ 2 callersFunctionmath_vista_score
( response: str, metadata: dict, openai_api_key: str, use_api: bool = True, )
olmo/eval/vqa.py:340
↓ 2 callersMethodmc_qa_template
lmms-eval uses the MVBench's template, but llava-video uses the different one, so just follow the PerceptionTest's template
olmo/data/academic_video_datasets.py:931
↓ 2 callersFunctionnormalize_image
( image: np.ndarray, image_mean: list[float], image_std: list[float], )
olmo/hf_model/image_processing_molmo2.py:28
↓ 2 callersMethodnormalize_image
(self, image: np.ndarray)
olmo/preprocessing/image_preprocessor.py:361
↓ 2 callersFunctionnormalize_timestamps_and_points
Normalize the timestamps and points in the triplets to a range of [0, 100].
olmo/util.py:695
↓ 2 callersFunctionpack_with_cp
Pack examples and compute image shard boundaries for context parallelism.
olmo/data/dynamic_packer.py:268
↓ 2 callersFunctionparse_action
(action_str)
olmo/eval/evaluators.py:415
↓ 2 callersMethodparse_multi_choice_response
Changed from MMMU-style complex parsing into simple parsing. Fixed to avoid 'D. A book' be parsed as A. Same as original Long
olmo/eval/evaluators.py:1870
↓ 2 callersMethodparse_prediction
Parse model prediction text to standardized trajectory format. Supported prediction types: - video_point_track_all_frames
olmo/eval/point_tracking_utils.py:43
↓ 2 callersFunctionparse_response
(text: str, keys: List[str])
olmo/eval/mlvu_utils.py:81
↓ 2 callersFunctionparse_timestamp
Parse timestamp string like '00:00:01.089' to seconds.
scripts/extract_epic_kitchens_clips.py:7
↓ 2 callersMethodqa_template
Format question text with options.
olmo/data/academic_video_datasets.py:2914
↓ 2 callersMethodread_metadata
(self)
olmo/train/remote_filesystem.py:424
↓ 2 callersFunctionrearrange_tokens
Reassign token locations using first-fit descending greedy algorithm. The kept tokens will be rearranged into N slots per frame as packe
olmo/nn/temporal_image_vit.py:571
↓ 2 callersFunctionreindex_list
Reindexes numbered lines in a string to start from 1. Args: text (str): Multiline string with lines starting with a number and a per
olmo/eval/vixmo_caption_utils.py:184
↓ 2 callersMethodremove_checkpoints
(self, current_checkpoints, num_checkpoints_to_keep)
olmo/train/trainer.py:672
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
olmo/hf_model/modeling_molmo2.py:581
↓ 2 callersFunctionrepeat_kv
torch.repeat_interleave(x, dim=2, repeats=n_rep)
olmo/nn/llm.py:43
↓ 2 callersMethodreplace_placeholders
(self, all_strings: List[str])
olmo/data/academic_image_datasets.py:585
↓ 2 callersMethodreset_connector_parameters
(self)
olmo/nn/vision_backbone.py:283
↓ 2 callersMethodreset_parameters
Re-initialize the weights from scratch
olmo/models/molmo_point/molmo_point.py:459
↓ 2 callersFunctionresize_image
( image: np.ndarray, desired_output_size: list[int], resample: PILImageResampling, )
olmo/hf_model/image_processing_molmo2.py:38
↓ 2 callersMethodresize_image
(self, image, output_size, is_training, rng)
olmo/preprocessing/image_preprocessor.py:376
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
olmo/hf_model/modeling_molmo2.py:476
↓ 2 callersMethodsample_beams
( self, log_probs: torch.Tensor, beam_size: int, state: StateType )
olmo/nn/beam_search.py:105
↓ 2 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/nn/beam_search.py:249
↓ 2 callersFunctionsample_random_clip
Randomly choose a clip [clip_start, clip_end] such that: - 0 <= clip_start <= start_time <= end_time <= clip_end <= video_duration -
olmo/data/molmo2_datasets.py:80
↓ 2 callersFunctionseed_all
Seed all rng objects.
olmo/torch_util.py:21
↓ 2 callersFunctionselect_tiling
Divide in image of size [w, h] in up to max_num_patches of size patch_size
olmo/preprocessing/image_preprocessor.py:296
↓ 2 callersFunctionset_example_style
(ex: Dict, style: str)
olmo/util.py:715
↓ 2 callersMethodshuffle_options
(self, options: List[str], answer_idx: int, rng: np.random.RandomState)
olmo/data/academic_multi_image_datasets.py:365
↓ 2 callersMethodstep
(self, closure=None)
olmo/train/optim.py:236
↓ 2 callersFunctionsum_metric
(v)
olmo/eval/evaluators.py:73
↓ 2 callersFunctionsynchronize_flag
(flag: bool, device: torch.device)
olmo/torch_util.py:205
↓ 2 callersMethodsystem_metrics
(self)
olmo/train/trainer.py:937
↓ 2 callersMethodtime_to_seconds
(time_str: str)
olmo/data/academic_video_datasets.py:1033
↓ 2 callersFunctionto_float
(pred: str)
olmo/eval/vsi_bench_utils.py:17
↓ 2 callersFunctiontoken_type_ids_mask_function
This function adds the correct offsets to the `q_idx` and `kv_idx` as the torch API can only accept lengths, not start and end indices.
olmo/hf_model/modeling_molmo_point.py:828
↓ 2 callersFunctiontoken_type_ids_mask_function
This function adds the correct offsets to the `q_idx` and `kv_idx` as the torch API can only accept lengths, not start and end indices.
olmo/hf_model/modeling_molmo2.py:1087
↓ 2 callersMethodtokenize_message
(self, message_list: List[Message], weight, bos=True, add_last_eos=True)
olmo/models/molmo_point/molmo_point_text_preprocessor.py:55
↓ 2 callersFunctionunshard_chunk
(prefix: str, path: Path, keys: List[str])
olmo/train/distributed_checkpointing.py:585
↓ 2 callersMethodupdate_legacy_settings
Remove deprecated keys from old checkpoints.
olmo/train/trainer_config.py:890
↓ 2 callersMethodvalidate_choices
(input_value, all_choices, input_name)
olmo/data/academic_video_datasets.py:120
↓ 2 callersMethodwarmup_cache
(self, device, cp_enabled: bool = False)
olmo/nn/llm.py:1080
↓ 2 callersFunctionwithin_bounding_box
(coords, box)
olmo/eval/evaluators.py:440
↓ 1 callersMethod__init__
(self, resource: str)
olmo/io.py:1008
↓ 1 callersMethod__init__
( self, *, level: Union[int, str] = logging.NOTSET, console: Optional[Console]
olmo/util.py:313
↓ 1 callersMethod__init__
(self, split: str, keep_in_memory=True, **kwargs)
olmo/data/dataset.py:115
↓ 1 callersMethod__init__
( self, vit_config: Molmo2VitConfig = None, adapter_config: MolmoPointAdapterConfig =
olmo/hf_model/configuration_molmo_point.py:137
↓ 1 callersMethod__init__
(self, rope_theta, dim, cache_prefix, cache: BufferCache, max_len=None, device=None)
olmo/models/molmo_point/modules.py:35
↓ 1 callersMethod__init__
(self, in_features: int, n_pos: int)
olmo/models/molmo_point/molmo_point_connector.py:92
↓ 1 callersMethod__init__
( self, path: PathOrStr, thread_count: Optional[int] = None, process_group: Op
olmo/train/remote_filesystem.py:200
↓ 1 callersMethod_build_extensions_json
Scan CLIP_DIR to build extensions.json mapping video IDs to file extensions. Clip filenames follow {vid}_{start}_{end}.{ext}. We parse from t
olmo/data/academic_video_datasets.py:4398
↓ 1 callersMethod_build_image_pos_ids
(self, example, mm_data)
olmo/models/molmo_point/molmo_point_example_preprocessor.py:375
↓ 1 callersMethod_build_mixture
(self, preprocessor)
olmo/data/data_loader.py:233
↓ 1 callersMethod_build_video_index
Walk VIDEO_DIR once and build a mapping from filename stem to full path.
olmo/data/molmo2_datasets.py:225
↓ 1 callersMethod_build_video_work_items
Override to add native_fps for frame subsampling on full video encoding.
olmo/data/molmo2_video_track_datasets.py:1102
↓ 1 callersMethod_build_video_work_items
Build work items for _create_videos from the fps map. Returns list of dicts: [{frames_dir, output_path, fps, ...}]. Override for data
olmo/data/academic_video_track_datasets.py:370
↓ 1 callersMethod_cast_attn_bias
(cls, bias: torch.Tensor, input_dtype: torch.dtype)
olmo/nn/llm.py:1684
↓ 1 callersMethod_cast_attn_bias
(cls, bias: torch.Tensor, input_dtype: torch.dtype)
olmo/nn/ulysses.py:328
↓ 1 callersFunction_clean_param_name
(name: str)
olmo/train/optim.py:44
↓ 1 callersMethod_compute_similarity_matrix
Compute similarity between predictions and GT for one frame. Similarity = 1 if point in mask, 0 otherwise. Returns:
olmo/eval/object_tracking_utils.py:871
↓ 1 callersMethod_copy_state
Copies the `state` . This method copies the data in `state` using `copy.deepcopy()`. If this is not appropriate for your constraint,
olmo/nn/beam_search.py:680
↓ 1 callersMethod_create_clips
Create clips from full videos (symlink if no trimming, ffmpeg trim otherwise).
olmo/data/molmo2_video_track_datasets.py:764
↓ 1 callersMethod_create_message_list
Create message list with points organized by frame.
olmo/data/academic_video_track_datasets.py:472
↓ 1 callersFunction_create_video_from_frame_range
Create an MP4 from numbered frames (e.g., 00001.jpg to 00051.jpg) in a directory.
olmo/data/academic_video_datasets.py:43
↓ 1 callersMethod_create_videos
Encode frame dirs to full videos using multiprocessing.
olmo/data/molmo2_video_track_datasets.py:738
↓ 1 callersMethod_decode_and_sample_videos
Decode input videos and sample frames if needed.
olmo/hf_model/video_processing_molmo2.py:772
↓ 1 callersFunction_decode_rle_mask
Decode an RLE-encoded mask into a 2D numpy array. Handles both compressed (string counts via pycocotools) and uncompressed (list-of-int count
olmo/data/molmo2_datasets.py:27
↓ 1 callersFunction_download_images
(args)
olmo/data/dataset_builders/download_urls.py:68
↓ 1 callersFunction_download_koala_meta
Download and extract koala_meta.zip from HF if not already present.
olmo/data/molmo2_datasets.py:344
↓ 1 callersFunction_ensure_coco2017_downloaded
()
olmo/data/academic_image_datasets.py:74
↓ 1 callersFunction_ensure_vg_downloaded
()
olmo/data/academic_image_datasets.py:64
↓ 1 callersMethod_ensure_videos
Auto-download vimeo videos from HF; warn about manual downloads for others.
olmo/data/molmo2_datasets.py:200
↓ 1 callersFunction_extract_characters_regex
(s: str)
olmo/eval/vqa.py:393
↓ 1 callersMethod_extract_videos_to_frames
Extract videos to frames, optionally in parallel.
olmo/data/molmo2_video_track_datasets.py:791
↓ 1 callersMethod_extract_videos_to_frames
Extract videos to frames, optionally in parallel.
olmo/data/academic_video_track_datasets.py:1305
↓ 1 callersMethod_find_human_readable_label
Find the original human-readable label for a normalized label.
olmo/preprocessing/data_formatter.py:782
↓ 1 callersMethod_find_human_readable_label
Find the original human-readable label for a normalized label.
olmo/models/molmo_point/molmo_point_data_formatter.py:98
↓ 1 callersFunction_find_video_cap_path_by_id
Find video path for a Molmo2-Cap video_id. Searches VIDEO_CAP_SUBDIRS under video_dir. Handles three layouts: - Folder-based (youtube-cc-*)
olmo/data/molmo2_datasets.py:585
↓ 1 callersMethod_find_video_path
Look up video path from the pre-built index.
olmo/data/molmo2_datasets.py:234
↓ 1 callersFunction_flatten
(xs, prefix)
scripts/prepare_pretrained_model.py:23
↓ 1 callersFunction_format
(val)
olmo/util.py:560
↓ 1 callersFunction_format_bytes
(num: Union[int, float], suffix="B")
olmo/io.py:494
↓ 1 callersMethod_format_video_point_start_end
Format as: id: ([x1,y1,t1], [x2,y2,t2])
olmo/preprocessing/point_formatter.py:752
↓ 1 callersMethod_format_video_point_track_all_frames_with_occlusion
Format as time {t}\n{id: [x, y, occluded], ...}
olmo/preprocessing/point_formatter.py:807
↓ 1 callersMethod_format_video_point_track_per_frame
Format as: time {t}\n{id: [x, y], ...}
olmo/preprocessing/point_formatter.py:736
↓ 1 callersMethod_format_video_single_point_track
Format as: [x1,y1,t1], [x2,y2,t2], ...
olmo/preprocessing/point_formatter.py:787
↓ 1 callersMethod_further_process_kwargs
Update kwargs that need further processing before being validated Can be overridden by subclasses to customize the processing of kwar
olmo/hf_model/video_processing_molmo2.py:583
↓ 1 callersFunction_gcs_clear_directory
(bucket_name: str, prefix: str)
olmo/io.py:687
↓ 1 callersFunction_gcs_get_bytes_range
(bucket_name: str, key: str, bytes_start: int, num_bytes: int)
olmo/io.py:643
↓ 1 callersFunction_gcs_list_directory
( bucket_name: str, prefix: str, recurse: bool = False, include_files: bool = True, includ
olmo/io.py:726
↓ 1 callersFunction_gcs_upload
(source: Path, bucket_name: str, key: str, save_overwrite: bool = False)
olmo/io.py:662
↓ 1 callersMethod_generate_consecutive_options
(correct, min_val=1)
olmo/data/academic_video_datasets.py:5381
↓ 1 callersMethod_get_bytes
(self, relative_path: str, offset: int, length: int)
olmo/train/remote_filesystem.py:359
← previousnext →401–500 of 2,270, ranked by callers