MCPcopy Create free account

hub / github.com/allenai/molmo / functions

Functions893 in github.com/allenai/molmo

↓ 3 callersMethodload
(self)
olmo/data/academic_datasets_manual.py:358
↓ 3 callersFunctionload_fsdp_optim_state
(fsdp_model: FSDP, optim: Optimizer, optim_state: Dict[str, Any])
olmo/checkpoint.py:220
↓ 3 callersFunctionload_hf_model
(repo_id)
olmo/hf_molmo.py:11
↓ 3 callersFunctionload_json
(file)
olmo/util.py:53
↓ 3 callersFunctionlog_metrics_to_console
(prefix: str, metrics: Dict[str, float])
olmo/util.py:801
↓ 3 callersFunctionmake_metric
()
olmo/eval/__init__.py:28
↓ 3 callersFunctionnormalize_str
Normalize the str to lower case and make them float numbers if possible.
olmo/eval/mmmu_eval_utils.py:79
↓ 3 callersFunctionpixels_to_patches
Reshape an image of [h, w, 3] -> [n_patches, pixels_per_patch]
olmo/data/model_preprocessor.py:236
↓ 3 callersMethodpoints_to_text
(self, points, scale, label_text, alt_text)
olmo/data/data_formatter.py:308
↓ 3 callersMethodresize_image
(self, image, output_size, is_training, rng)
olmo/data/model_preprocessor.py:328
↓ 3 callersMethodrestore_checkpoint
( self, load_path: PathOrStr, *, checkpoint_type: Optional[CheckpointType] = N
olmo/train.py:687
↓ 3 callersMethodstep
(self, closure=None)
olmo/optim.py:487
↓ 3 callersMethodupdate_state
( self, state: ConstraintStateType, last_prediction: torch.Tensor, last_backpo
olmo/beam_search.py:574
↓ 2 callersMethod__init__
( self, end_index: int, *, max_steps: int = 50, beam_size: int = 10,
olmo/beam_search.py:688
↓ 2 callersMethod_clean_param_name
(self, name: str)
olmo/optim.py:44
↓ 2 callersFunction_collate
(tensors, max_sequence_length=None, dtype=None, pad=False, pad_value=-1)
olmo/data/collator.py:21
↓ 2 callersMethod_ensure_object_info
(self)
olmo/util.py:772
↓ 2 callersFunction_expand_token
(token, batch_size: int)
olmo/image_vit.py:15
↓ 2 callersMethod_fsdp_handles
(self, fsdp_model: FSDP)
olmo/checkpoint.py:1515
↓ 2 callersMethod_fsdp_modules
Returns a list of FSDP modules with their FQN.
olmo/checkpoint.py:1496
↓ 2 callersMethod_gather_state_dict_paths
( self, load_path: PathOrStr, state_dict_type: str, world_size: int, *
olmo/checkpoint.py:1879
↓ 2 callersMethod_get_next_sources
(self, rng, counts)
olmo/data/iterable_dataset_mixture.py:49
↓ 2 callersMethod_get_shard_placement_and_rank_sizes
( self, shards_metadata: List[ShardMetadata], world_size: int )
olmo/checkpoint.py:1084
↓ 2 callersFunction_init_model_and_optim
(config: TrainConfig)
tests/checkpoint_test.py:20
↓ 2 callersMethod_load_metadata
( self, load_path: PathOrStr, *, local_cache: Optional[PathOrStr] = None )
olmo/checkpoint.py:1575
↓ 2 callersMethod_make_state_dict_compatible
Handles some cases where the state dict is valid yet may need to be transformed in order to be loaded. This modifies the sta
olmo/model.py:2418
↓ 2 callersFunction_non_meta_init_device
(config: ModelConfig)
olmo/model.py:130
↓ 2 callersMethod_prepare_fsdp_model
(self, fsdp_model: FSDP)
olmo/checkpoint.py:1506
↓ 2 callersMethod_register_resolvers
(cls, validate_paths: bool = True)
olmo/config.py:65
↓ 2 callersMethod_remove_sharded_checkpoint
(self, idx: int, checkpoints: List[Path])
olmo/train.py:594
↓ 2 callersFunction_s3_file_size
(scheme: str, bucket_name: str, key: str, max_attempts: int = 3)
olmo/util.py:560
↓ 2 callersMethod_search
( self, start_predictions: torch.Tensor, start_state: StateType, step: StepFun
olmo/beam_search.py:815
↓ 2 callersFunction_to_float
(text: str)
olmo/eval/vqa.py:193
↓ 2 callersMethod_write_model_dict
(self, model_state_dict, checkpoint_dir, upload_to, save_overwrite)
olmo/checkpoint.py:794
↓ 2 callersMethod_write_optim_dict
(self, optim_state_dict, checkpoint_dir, upload_to, save_overwrite)
olmo/checkpoint.py:809
↓ 2 callersFunctionannotation_to_box
(points, point_dist=4)
olmo/eval/evaluators.py:58
↓ 2 callersMethodapply
( self, state: ConstraintStateType, class_log_probabilities: torch.Tensor, )
olmo/beam_search.py:543
↓ 2 callersFunctionapply_keyword_prompt
(prompts, example, rng, keywords=None, dbg=False)
olmo/data/data_formatter.py:270
↓ 2 callersMethodapply_rotary_pos_emb
(self, pos_sin: torch.Tensor, pos_cos: torch.Tensor, t: torch.Tensor)
olmo/model.py:388
↓ 2 callersFunctionbatch_pixels_to_patches
Reshape images of [n_images, h, w, 3] -> [n_images, n_patches, pixels_per_patch]
olmo/data/model_preprocessor.py:255
↓ 2 callersFunctionbuild_eval_dataloader
( train_config: TrainConfig, data_config: DataConfig, batch_size: int, max_steps=None )
olmo/data/__init__.py:127
↓ 2 callersFunctionbuild_html_table
(data: List[Dict[str, Any]], col_widths=None, fixed_width=False)
olmo/html_utils.py:179
↓ 2 callersFunctionbuild_inf_evaluator
(cfg: EvaluatorConfig, default_save_dir=None)
olmo/eval/inf_evaluator.py:74
↓ 2 callersFunctionbuild_mm_preprocessor
( model_config: ModelConfig, for_inference=False, shuffle_messages=True, is_training=False,
olmo/data/__init__.py:23
↓ 2 callersFunctionbuild_optimizer
(cfg: TrainConfig, model: nn.Module)
olmo/optim.py:1021
↓ 2 callersFunctionbuild_torch_mm_eval_dataloader
( batch_size, seed, model_config, data_config, pad_batches, max_steps=None )
olmo/data/__init__.py:72
↓ 2 callersFunctioncompute_hash
(string: Union[str, bytes])
olmo/data/download_urls.py:53
↓ 2 callersFunctionconfig_to_moe_args
(config: ModelConfig)
olmo/config.py:1889
↓ 2 callersMethodcopy_into
(self, full_tensor: torch.Tensor)
olmo/checkpoint.py:1467
↓ 2 callersFunctiondefault_thread_count
()
olmo/util.py:665
↓ 2 callersFunctiondir_is_empty
(dir: PathOrStr)
olmo/util.py:308
↓ 2 callersFunctiondraw_abc_labels
(image_f, annotations, mode="in_box", use_transparent=False)
olmo/hf_datasets/ai2d.py:33
↓ 2 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:85
↓ 2 callersMethodevaluate_model
(self, model, device, autocast_precision, is_distributed, inference_warmup=False, pbar=
olmo/eval/inf_evaluator.py:120
↓ 2 callersFunctionflatten_list
(lst)
olmo/util.py:717
↓ 2 callersFunctionflatten_lists
(xss)
olmo/hf_datasets/ai2d.py:18
↓ 2 callersMethodformat_points
(self, example)
olmo/data/data_formatter.py:334
↓ 2 callersFunctionget_bytes_range
(source: PathOrStr, bytes_start: int, num_bytes: int)
olmo/util.py:374
↓ 2 callersFunctionget_causal_attention_bias
(cache: BufferCache, seq_len: int, device: torch.device)
olmo/model.py:518
↓ 2 callersFunctionget_coords
(action)
olmo/eval/evaluators.py:301
↓ 2 callersFunctionget_default_load_path
(model_name: str)
scripts/convert_hf_to_molmo.py:476
↓ 2 callersFunctionget_evaluation
Gets the default evaluation config for task (or task:split string) `name`
launch_scripts/utils.py:77
↓ 2 callersMethodget_fsdp_wrap_policy
(self, wrap_strategy: Optional[FSDPWrapStrategy] = None)
olmo/model.py:2049
↓ 2 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:294
↓ 2 callersMethodget_max_crops
Max numbers of that can be built for one image
olmo/config.py:901
↓ 2 callersMethodget_metric_file
(self, cfg: DatasetEvaluatorConfig)
scripts/mm_eval.py:102
↓ 2 callersFunctionget_openai_key
()
olmo/eval/evaluators.py:36
↓ 2 callersFunctionget_preprocessor
()
tests/data/test_preprocessor.py:11
↓ 2 callersMethodget_rotary_embedding
(self, seq_len: int, device: torch.device)
olmo/model.py:349
↓ 2 callersFunctionget_special_token_ids
(tokenizer)
olmo/tokenizer.py:127
↓ 2 callersMethodget_weight_decay_exclusions
()
olmo/model.py:1742
↓ 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/beam_search.py:403
↓ 2 callersMethodinit_state
( self, start_class_log_probabilities: torch.Tensor, batch_size: int, num_classes: int )
olmo/beam_search.py:82
↓ 2 callersFunctionis_point_in_region
Check if the point (x, y) is within the region defined by the boolean mask. Parameters: - point (tuple of floats): x/y-coordinate of the
olmo/eval/evaluators.py:230
↓ 2 callersMethodllm_patches_per_crop
(self)
olmo/config.py:894
↓ 2 callersFunctionload_model_state
Load model state from a distributed FSDP model checkpoint created from :func:`save_fsdp_model_and_optim_state()`. Note that ``model`` should
olmo/checkpoint.py:321
↓ 2 callersMethodload_trainer_state_dict
(self, state_dict: Dict[str, Any])
olmo/train.py:395
↓ 2 callersMethodmap_bounding_box
(self, box, dims)
olmo/hf_datasets/android_control.py:246
↓ 2 callersFunctionmath_vista_score
( response: str, metadata: dict, openai_api_key: str, use_api: bool = True, )
olmo/eval/vqa.py:250
↓ 2 callersMethodmodel_forward
( self, batch: Dict[str, Any], loss_reduction: str = "mean", compute_z_loss: bool = False )
olmo/train.py:756
↓ 2 callersFunctionmove_to_device
(o: T, device: torch.device)
olmo/torch_util.py:72
↓ 2 callersMethodmove_to_device
(self, batch, device)
olmo/train.py:737
↓ 2 callersFunctionparse_action
(action_str)
olmo/eval/evaluators.py:298
↓ 2 callersMethodremove_checkpoint
(self, idx: int = 0, checkpoint_type: CheckpointType = CheckpointType.sharded)
olmo/train.py:727
↓ 2 callersMethodremove_ephemeral_checkpoint
(self, idx: int = 0)
olmo/train.py:607
↓ 2 callersMethodreset_connector_parameters
(self)
olmo/model.py:1440
↓ 2 callersMethodreset_non_vision_parameters
(self)
olmo/model.py:1769
↓ 2 callersFunctionsafetensors_file_to_state_dict
(filename: PathOrStr, map_location: Optional[str] = None)
olmo/safetensors_util.py:76
↓ 2 callersMethodsample_beams
( self, log_probs: torch.Tensor, beam_size: int, state: StateType )
olmo/beam_search.py:94
↓ 2 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/beam_search.py:238
↓ 2 callersFunctionseed_all
Seed all rng objects.
olmo/torch_util.py:15
↓ 2 callersMethodset_activation_checkpointing
(self, strategy: Optional[ActivationCheckpointingStrategy])
olmo/model.py:1699
↓ 2 callersFunctionsetup_pil
()
olmo/data/model_preprocessor.py:14
↓ 2 callersFunctionshould_checkpoint_block
(strategy: Optional[ActivationCheckpointingStrategy], block_idx: int)
olmo/model.py:103
↓ 2 callersFunctionstate_dict_to_safetensors_file
(state_dict: Dict, filename: PathOrStr)
olmo/safetensors_util.py:70
↓ 2 callersFunctionsynchronize_value
(value: V, device: torch.device)
olmo/torch_util.py:133
↓ 2 callersMethodsystem_metrics
(self)
olmo/train.py:1098
↓ 2 callersFunctionvit_activation_checkpoint_function
(cfg: ModelConfig)
olmo/image_vit.py:19
↓ 2 callersFunctionwithin_bounding_box
(coords, box)
olmo/eval/evaluators.py:323
↓ 2 callersMethodwrap
(cls, scheduler: Scheduler, warmup_start: int, warmup_end: int)
olmo/optim.py:659
← previousnext →101–200 of 893, ranked by callers