MCPcopy Create free account

hub / github.com/allenai/molmo / functions

Functions893 in github.com/allenai/molmo

↓ 1 callersFunctionfreeze_module
(module: torch.nn.Module, exclude_params: Optional[List[str]] = None)
olmo/torch_util.py:164
↓ 1 callersMethodfrom_checkpoint
Load an OLMo model from a checkpoint.
olmo/model.py:2364
↓ 1 callersMethodgenerate
Generate token IDs using beam search. Note that by default ``beam_size`` is set to 1, which is greedy decoding. :param inpu
olmo/model.py:2189
↓ 1 callersMethodget
(self, idx, epoch=0)
olmo/data/dataset.py:55
↓ 1 callersMethodget
(self, item, rng)
olmo/data/dataset.py:88
↓ 1 callersMethodget_abc_image
(self, image, annotations)
olmo/hf_datasets/ai2d.py:118
↓ 1 callersFunctionget_chat_response
Run a query through an OpenAI model
olmo/eval/api_utils.py:10
↓ 1 callersFunctionget_device_batch
(_worker_its)
tests/data/test_data_iterator.py:97
↓ 1 callersFunctionget_evaluator
Gets the default evaluator for task `name`
launch_scripts/utils.py:33
↓ 1 callersMethodget_file_name
(step, process_index)
olmo/eval/evaluators.py:154
↓ 1 callersFunctionget_float_dtype_by_name
(dtype)
scripts/mm_eval.py:45
↓ 1 callersFunctionget_font_size
Get the font size based on the size of the image.
olmo/hf_datasets/ai2d.py:22
↓ 1 callersFunctionget_gcs_url
(output_file)
scripts/mm_eval.py:64
↓ 1 callersMethodget_html
(self)
olmo/eval/evaluators.py:54
↓ 1 callersFunctionget_key_subresponses
(response)
olmo/eval/mmmu_eval_utils.py:133
↓ 1 callersMethodget_labels
(self, batch: Dict[str, Any])
olmo/train.py:740
↓ 1 callersMethodget_level_text
(self, record: logging.LogRecord)
olmo/util.py:282
↓ 1 callersMethodget_location_text
(self, record: logging.LogRecord)
olmo/util.py:289
↓ 1 callersFunctionget_most_similar
Use the Levenshtein distance (or edit distance) to determine which of the choices is most similar to the given prediction
olmo/eval/math_vista_utils.py:45
↓ 1 callersFunctionget_multimodal_param_groups
Separate parameters into connector/vit/llm weight decay and non weight decay groups.
olmo/optim.py:711
↓ 1 callersFunctionget_node_rank
()
olmo/torch_util.py:35
↓ 1 callersFunctionget_param_groups
Separate parameters into weight decay and non weight decay groups.
olmo/optim.py:886
↓ 1 callersFunctionget_parser
()
scripts/convert_hf_to_molmo.py:589
↓ 1 callersMethodget_post_step_metrics
( self, module: nn.Module, process_group: Optional[dist.ProcessGroup] = None )
olmo/optim.py:456
↓ 1 callersFunctionget_progress_bar
()
olmo/util.py:319
↓ 1 callersMethodget_state_for_param
(self, param: nn.Parameter)
olmo/optim.py:429
↓ 1 callersMethodget_system_prompt
(self, style, for_inference, messages, rng)
olmo/data/data_formatter.py:409
↓ 1 callersMethodget_time_text
(self, record: logging.LogRecord)
olmo/util.py:277
↓ 1 callersFunctionget_training_mixture
(submixture)
launch_scripts/train_multitask_model.py:60
↓ 1 callersMethodget_transparent_abc_image
(self, image, annotations)
olmo/hf_datasets/ai2d.py:121
↓ 1 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/data/data_formatter.py:451
↓ 1 callersMethodgumbel
Sample `Gumbel(phi)`. `phi` should have shape `(batch_size, num_classes)`.
olmo/beam_search.py:395
↓ 1 callersFunctionhtml_rect
Utility method to get a HTML rectangle element
olmo/html_utils.py:250
↓ 1 callersMethodimage_to_patches_and_tokens
( self, image: ImageInput, is_training=False, rng=None )
olmo/data/model_preprocessor.py:341
↓ 1 callersMethodinference_eval
(self)
olmo/train.py:1158
↓ 1 callersMethodinit_state
( self, start_class_log_probabilities: torch.Tensor, batch_size: int, num_classes: int )
olmo/beam_search.py:305
↓ 1 callersMethodinit_state
( self, batch_size: int, )
olmo/beam_search.py:598
↓ 1 callersMethodinitialize_and_load_model
(self)
scripts/mm_eval.py:109
↓ 1 callersFunctioninstall_excepthook
()
olmo/util.py:177
↓ 1 callersFunctionis_in_coco_val2017
(image_id, _val2017=set())
olmo/data/academic_datasets_manual.py:42
↓ 1 callersFunctionis_valid_format
(input_string)
olmo/eval/evaluators.py:256
↓ 1 callersMethodload_checkpoint
( self, load_path: PathOrStr, *, local_cache: Optional[PathOrStr] = None,
olmo/checkpoint.py:876
↓ 1 callersFunctionload_fsdp_model_and_optim_state
Use this to load a state dict for an FSDP model and its optimizer via :module:`torch.distributed.checkpoint` functions. This should be used d
olmo/checkpoint.py:151
↓ 1 callersFunctionload_image
(image_path)
olmo/data/model_preprocessor.py:34
↓ 1 callersFunctionload_olmo_config
Load an OLMo config file and convert it into a MM-OLMo config
scripts/unshard.py:21
↓ 1 callersMethodlog_batch
(self, batch)
olmo/train.py:77
↓ 1 callersFunctionmain
()
launch_scripts/eval_downstream.py:25
↓ 1 callersFunctionmain
()
launch_scripts/eval_captioner.py:23
↓ 1 callersFunctionmain
(cfg: TrainConfig)
scripts/train.py:46
↓ 1 callersFunctionmain
( input_dir: Union[str, Path], output_dir: Union[str, Path], sharded_checkpoint_type: ShardedCheck
scripts/unshard.py:39
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/convert_hf_to_molmo.py:572
↓ 1 callersFunctionmain
()
scripts/dataset_visualize.py:51
↓ 1 callersFunctionmain
()
scripts/build_submission_file.py:8
↓ 1 callersFunctionmain_llm
(args: argparse.Namespace)
scripts/convert_hf_to_molmo.py:541
↓ 1 callersFunctionmain_vit
(args: argparse.Namespace)
scripts/convert_hf_to_molmo.py:509
↓ 1 callersMethodmap_coordinates_mmolmo
(self, action, dims)
olmo/hf_datasets/android_control.py:224
↓ 1 callersFunctionmetaclip_resize
(image, desired_output_size)
olmo/data/model_preprocessor.py:121
↓ 1 callersFunctionmmmu_score
( target: List[str], response: str, metadata: dict, )
olmo/eval/vqa.py:213
↓ 1 callersMethodpreprocess
Preprocesses a single image Returns: crops: (n_crops, n_patches, patch_dim) individual crops, `n_crops` might
olmo/data/model_preprocessor.py:596
↓ 1 callersFunctionprocessDigitArticle
(inText)
olmo/eval/vqa.py:73
↓ 1 callersFunctionprocessPunctuation
(inText)
olmo/eval/vqa.py:62
↓ 1 callersFunctionprocess_action
(action)
olmo/hf_datasets/android_control.py:130
↓ 1 callersFunctionprocess_data
(data_files: Dict[str, str])
olmo/hf_datasets/android_control.py:33
↓ 1 callersFunctionreal_world_qa_score
( target: str, prediction: str, metadata: dict, )
olmo/eval/vqa.py:232
↓ 1 callersFunctionreduce_a11y_tree
(a11y_tree)
olmo/hf_datasets/android_control_utils.py:157
↓ 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:171
↓ 1 callersFunctionremove_duplicates
(a11y_tree)
olmo/hf_datasets/android_control_utils.py:224
↓ 1 callersMethodremove_sharded_checkpoint
(self, idx: int = 0)
olmo/train.py:604
↓ 1 callersMethodremove_unsharded_checkpoint
(self, idx: int = 0)
olmo/train.py:639
↓ 1 callersMethodrender_message
(self, *, record: logging.LogRecord, message: str)
olmo/util.py:267
↓ 1 callersMethodreset_metrics
(self)
olmo/train.py:182
↓ 1 callersMethodreset_with_pretrained_weights
(self)
olmo/model.py:1671
↓ 1 callersFunctionresize_and_pad
Resize an image while padding to preserve uts aspect ratio.
olmo/data/model_preprocessor.py:55
↓ 1 callersMethodrestore_checkpoint
( self, load_path: PathOrStr, dist_model: nn.Module, optim: Optimizer,
olmo/checkpoint.py:682
↓ 1 callersMethodrestore_checkpoint
( self, load_path: PathOrStr, dist_model: nn.Module, optim: Optimizer,
olmo/checkpoint.py:1636
↓ 1 callersMethodrestore_rng_state
(self, rng_state: Dict[str, Any])
olmo/train.py:502
↓ 1 callersMethodrestore_sharded_checkpoint
( self, load_path: PathOrStr, local_cache: Optional[PathOrStr] = None, *,
olmo/train.py:610
↓ 1 callersMethodrestore_unsharded_checkpoint
( self, load_path: PathOrStr, local_cache: Optional[PathOrStr] = None, *,
olmo/train.py:649
↓ 1 callersMethodrotate_half
(self, x: torch.Tensor)
olmo/model.py:375
↓ 1 callersMethodsample_beams
Returns the beams with the highest perturbed log probabilities.
olmo/beam_search.py:356
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/beam_search.py:89
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/beam_search.py:135
↓ 1 callersMethodsample_nodes
( self, log_probs: torch.Tensor, per_node_beam_size: int, state: StateType )
olmo/beam_search.py:171
↓ 1 callersMethodsave_checkpoint
( self, dir: PathOrStr, dist_model: nn.Module, optim: Optimizer, train
olmo/checkpoint.py:621
↓ 1 callersMethodsave_checkpoint
( self, dir: PathOrStr, dist_model: nn.Module, optim: Optimizer, train
olmo/checkpoint.py:1581
↓ 1 callersMethodsave_ephemeral_checkpoint
(self)
olmo/train.py:588
↓ 1 callersFunctionsave_fsdp_model_and_optim_state
Use this to save a state dict for an FSDP model and its optimizer via :module:`torch.distributed.checkpoint` functions. This should be used d
olmo/checkpoint.py:100
↓ 1 callersMethodsave_sharded_checkpoint
(self)
olmo/train.py:582
↓ 1 callersMethodsave_unsharded_checkpoint
(self)
olmo/train.py:633
↓ 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/beam_search.py:435
↓ 1 callersFunctionselect_tiling
Divide in image of size [w, h] in up to max_num_patches of size patch_size
olmo/data/model_preprocessor.py:203
↓ 1 callersMethodselect_vqa_answer
(self, answers, rng)
olmo/data/data_formatter.py:378
↓ 1 callersFunctionset_env_variables
()
olmo/util.py:206
↓ 1 callersMethodset_grad_checkpointing
(self, enable=True)
olmo/image_vit.py:348
↓ 1 callersFunctionsetup_logging
:param rank0_only: INFO and below messages will only be emitted on the rank0 process.
olmo/util.py:90
↓ 1 callersMethodshould_log_optim_metrics_this_step
(self)
olmo/train.py:1138
↓ 1 callersMethodshould_log_this_step
(self)
olmo/train.py:1150
↓ 1 callersFunctionsiglip_resize_and_pad
( image: np.ndarray, desired_output_size: Tuple[int, int], )
olmo/data/model_preprocessor.py:139
↓ 1 callersMethodsplit_batch
(self, batch: Dict[str, Any])
olmo/train.py:1076
↓ 1 callersFunctionsplit_list
(lst, split_size)
olmo/util.py:711
← previousnext →301–400 of 893, ranked by callers