Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/allenai/molmo
/ functions
Functions
893 in github.com/allenai/molmo
⨍
Functions
893
◇
Types & classes
198
↓ 1 callers
Method
__init__
(self, resource: str)
olmo/util.py:751
↓ 1 callers
Method
__init__
(self, split: str, keep_in_memory=True, **kwargs)
olmo/data/dataset.py:99
↓ 1 callers
Method
_cast_attn_bias
(cls, bias: torch.Tensor, input_dtype: torch.dtype)
olmo/model.py:629
↓ 1 callers
Method
_copy_sharded_tensor_to_shared_mem
( self, sharded_tensor: ShardedTensor, world_size: int, rank: int, key: Tuple )
olmo/checkpoint.py:1103
↓ 1 callers
Method
_copy_sharded_tensors_to_shared_mem
(self, state: Dict, world_size: int, rank: int, key: Tuple)
olmo/checkpoint.py:1070
↓ 1 callers
Method
_copy_state
Copies the `state` . This method copies the data in `state` using `copy.deepcopy()`. If this is not appropriate for your constraint,
olmo/beam_search.py:551
↓ 1 callers
Method
_do_adaptive_clipping
Do adaptive gradient clipping on a param group. If ``collect_param_metrics`` is ``True`` this will return the total number of gradie
olmo/optim.py:313
↓ 1 callers
Method
_do_global_fixed_clipping
Do global fixed gradient clipping on a param group. If ``collect_param_metrics`` is ``True`` this will return the total number of gr
olmo/optim.py:380
↓ 1 callers
Function
_download_images
(args)
olmo/data/download_urls.py:60
↓ 1 callers
Method
_gather
(self, shards: List[ShardedTensor], device: torch.device)
olmo/checkpoint.py:1381
↓ 1 callers
Function
_gcs_file_size
(bucket_name: str, key: str)
olmo/util.py:439
↓ 1 callers
Function
_gcs_get_bytes_range
(bucket_name: str, key: str, bytes_start: int, num_bytes: int)
olmo/util.py:454
↓ 1 callers
Function
_gcs_upload
(source: Path, bucket_name: str, key: str, save_overwrite: bool = False)
olmo/util.py:428
↓ 1 callers
Method
_get_bytes
(self, relative_path: str, offset: int, length: int)
olmo/checkpoint.py:429
↓ 1 callers
Method
_get_flat_param_state_to_save
(self, fsdp_model: FSDP)
olmo/checkpoint.py:1529
↓ 1 callers
Function
_get_s3_endpoint_url
(scheme: str)
olmo/util.py:492
↓ 1 callers
Function
_get_s3_profile_name
(scheme: str)
olmo/util.py:468
↓ 1 callers
Function
_http_file_size
(scheme: str, host_name: str, path: str)
olmo/util.py:645
↓ 1 callers
Function
_http_get_bytes_range
(scheme: str, host_name: str, path: str, bytes_start: int, num_bytes: int)
olmo/util.py:652
↓ 1 callers
Function
_iter
()
olmo/data/download_urls.py:150
↓ 1 callers
Method
_iter_flat_param_shards
( self, model_state: Dict[str, Any] )
olmo/checkpoint.py:1689
↓ 1 callers
Method
_load_flat_param_state
Load the state produced from `self._get_flat_param_state_to_save()`.
olmo/checkpoint.py:1548
↓ 1 callers
Function
_load_vqa2
(q_src, a_src, split, multi_question, raw_answer=False)
olmo/data/academic_datasets_manual.py:62
↓ 1 callers
Method
_make_optim_state_dict_compatible
( self, optim_state_dict: Dict[str, Any], og_keys_to_new: Dict[str, Set[str]] )
olmo/checkpoint.py:824
↓ 1 callers
Method
_merge_heads
(self, hidden_states)
olmo/image_vit.py:95
↓ 1 callers
Method
_objects_are_equal
(self, a: Any, b: Any)
olmo/checkpoint.py:1445
↓ 1 callers
Method
_reconstruct_sequences
(predictions, backpointers)
olmo/beam_search.py:724
↓ 1 callers
Function
_s3_find_latest_checkpoint
(scheme: str, bucket_name: str, prefix: str)
olmo/util.py:616
↓ 1 callers
Function
_s3_get_bytes_range
( scheme: str, bucket_name: str, key: str, bytes_start: int, num_bytes: int, max_attempts: int = 3 )
olmo/util.py:577
↓ 1 callers
Function
_s3_upload
( source: Path, scheme: str, bucket_name: str, key: str, save_overwrite: bool = False, max_attempts: int =
olmo/util.py:530
↓ 1 callers
Method
_save_metadata
(self, dir: PathOrStr, *, upload_to: Optional[str] = None)
olmo/checkpoint.py:1565
↓ 1 callers
Method
_scaled_dot_product_attention
Computes scaled dot product attention on query, key and value tensors, using an optional attention mask if passed, and applying dropo
olmo/model.py:643
↓ 1 callers
Method
_split_cloud_path
Split a full s3 path into the bucket name and path.
olmo/util.py:758
↓ 1 callers
Function
_step_function
( last_predictions: torch.Tensor, state: dict[str, torch.Tensor] )
tests/beam_search_test.py:74
↓ 1 callers
Method
_unshard
(self, input_dir: PathOrStr, device: torch.device, skip_keys: Optional[Set[str]] = None)
olmo/checkpoint.py:1329
↓ 1 callers
Method
_unshard_object
(self, os: List[Any], device: torch.device)
olmo/checkpoint.py:1363
↓ 1 callers
Method
_unshard_state_using_shared_mem
( self, state: Any, world_size: int, device: torch.device, key: Tuple )
olmo/checkpoint.py:1155
↓ 1 callers
Method
_unshard_tensor_using_shared_mem
( self, sharded_tensor: ShardedTensor, world_size: int, device: torch.device, key: Tuple )
olmo/checkpoint.py:1175
↓ 1 callers
Method
_unshard_using_sharded_mem
( self, state: Any, world_size: int, device: torch.device, shard_dir: PathOrStr )
olmo/checkpoint.py:1150
↓ 1 callers
Method
_unshard_using_shared_memory
This unsharding implementation consists of: 1. Loading each shard on a separate process and copying their sharded tensors to shared
olmo/checkpoint.py:1260
↓ 1 callers
Method
_update_initial_state
Expand tensors in a state dictionary from `(batch_size, *)` to `(batch_size * beam_size, *)`.
olmo/beam_search.py:1056
↓ 1 callers
Method
_update_state
( self, state: ConstraintStateType, last_prediction: torch.Tensor, )
olmo/beam_search.py:585
↓ 1 callers
Method
_update_state
(self, state: StateType, backpointer: torch.Tensor)
olmo/beam_search.py:1071
↓ 1 callers
Function
a_okvqa_score
(target, pred)
olmo/eval/vqa.py:112
↓ 1 callers
Method
add_pos_emb
(self, x: torch.Tensor, patch_num: int)
olmo/image_vit.py:358
↓ 1 callers
Method
add_pos_emb
(self, x: torch.Tensor, patch_num: int)
olmo/image_vit.py:435
↓ 1 callers
Method
add_pos_emb
(self, x: torch.Tensor, patch_num: int)
olmo/image_vit.py:511
↓ 1 callers
Function
anls_metric
Calculates ANLS for DocVQA. There does not seem to be an official evaluation script. Public implementation on which this implementation is ba
olmo/eval/vqa.py:144
↓ 1 callers
Method
apply
( self, state: ConstraintStateType, class_log_probabilities: torch.Tensor, )
olmo/beam_search.py:604
↓ 1 callers
Function
apply_keywords
(prompt, example, keywords)
olmo/data/data_formatter.py:263
↓ 1 callers
Method
batch_start
(self, global_total_tokens: int, device_batch_num_tokens: int, device_batch_num_loss_tokens: int, record: bool
olmo/train.py:120
↓ 1 callers
Function
build_evaluator
( train_config: TrainConfig, eval_config: DatasetEvaluatorConfig, tokenizer, device: torch.device )
olmo/eval/__init__.py:19
↓ 1 callers
Method
build_image_input_idx
Converts `patch_order` into an array mapping patch_id -> token_position
olmo/data/model_preprocessor.py:556
↓ 1 callers
Function
build_inf_evaluators
(cfg: TrainConfig, device: torch.device)
olmo/eval/__init__.py:55
↓ 1 callers
Function
build_loss_evaluators
(cfg: TrainConfig, device: torch.device)
olmo/eval/__init__.py:45
↓ 1 callers
Function
build_multimodal_scheduler
(cfg: TrainConfig)
olmo/optim.py:1046
↓ 1 callers
Function
build_qualitative_table
(name, split, n, preprocessor, is_training=None, for_inference=False, shuffle=True,
scripts/dataset_visualize.py:17
↓ 1 callers
Function
build_scheduler
(cfg: TrainConfig, sched_cfg: Optional[SchedulerConfig] = None)
olmo/optim.py:1093
↓ 1 callers
Function
build_train_dataloader
(train_config: TrainConfig, device=None)
olmo/data/__init__.py:144
↓ 1 callers
Function
causal_attention_bias
(seq_len: int, device: torch.device)
olmo/model.py:509
↓ 1 callers
Method
check
(self, device)
olmo/train.py:97
↓ 1 callers
Method
check
(self)
olmo/train.py:134
↓ 1 callers
Method
check
(self)
olmo/train.py:151
↓ 1 callers
Method
check_if_cancelled
(self)
olmo/train.py:1235
↓ 1 callers
Function
check_is_number
Check if the given string a number.
olmo/eval/mmmu_eval_utils.py:67
↓ 1 callers
Method
clip_grads_and_collect_metrics
Clips gradients for every group that has the field `max_grad_norm`. At the same time collect metrics for each parameter and its gradi
olmo/optim.py:48
↓ 1 callers
Function
compute_iou
(bbox1: list, bbox2: list, verbose: bool=False)
olmo/eval/evaluators.py:925
↓ 1 callers
Method
compute_metrics
(self)
olmo/train.py:189
↓ 1 callers
Function
compute_precision
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks: List[np.ndarray])
olmo/eval/evaluators.py:273
↓ 1 callers
Function
compute_recall
(row_ind: np.ndarray, col_ind: np.ndarray, preds: np.ndarray, masks: List[np.ndarray])
olmo/eval/evaluators.py:281
↓ 1 callers
Function
compute_stepwise_accuracy
(ground_truth, predictions, target_bbs)
olmo/eval/evaluators.py:297
↓ 1 callers
Function
create_test_prompt
(demo_prompt, query, response)
olmo/eval/math_vista_utils.py:119
↓ 1 callers
Function
crop_with_context
(img_shape, bbox, margin=0.2)
olmo/hf_datasets/clock_bench.py:12
↓ 1 callers
Function
cross_entropy_loss
( logits, labels, ignore_index: int = -100, reduction: str = "mean", compute_z_loss: bool = False, z_loss_
olmo/train.py:156
↓ 1 callers
Function
decode_key
(key: str)
olmo/safetensors_util.py:29
↓ 1 callers
Function
dino_resize_and_pad
( image: np.ndarray, desired_output_size: Tuple[int, int], )
olmo/data/model_preprocessor.py:174
↓ 1 callers
Function
download
()
scripts/download_data.py:39
↓ 1 callers
Method
encode_image
: param images: (batch_size, num_crops, num_patch, n_pixels)
olmo/model.py:1474
↓ 1 callers
Function
encode_key
(key: STKey)
olmo/safetensors_util.py:23
↓ 1 callers
Method
eval_batch
(self, batch: Dict[str, Any])
olmo/train.py:1034
↓ 1 callers
Function
eval_multi_choice
Evaluate a multiple choice instance.
olmo/eval/mmmu_eval_utils.py:180
↓ 1 callers
Function
eval_open
Evaluate an open question instance
olmo/eval/mmmu_eval_utils.py:197
↓ 1 callers
Method
eval_step
(self, batch: Dict[str, Any], evaluator: DatasetMetrics)
olmo/train.py:1061
↓ 1 callers
Function
example_to_html_dict
Build HTML visualizations for an examples ex: The example (after preprocessing) to show preprocessor: The preprocessor used to preprocessor t
olmo/html_utils.py:51
↓ 1 callers
Function
extract_app_bb
(input_string, search_text="text=Note")
olmo/hf_datasets/android_control_utils.py:59
↓ 1 callers
Function
extract_bboxes
(text, image_w, image_h)
olmo/util.py:889
↓ 1 callers
Function
extract_bbs_from_a11y
(a11y_data, dim)
olmo/hf_datasets/android_control_utils.py:10
↓ 1 callers
Function
extract_node_info
(node)
olmo/hf_datasets/android_control_utils.py:158
↓ 1 callers
Function
extract_numbers
Exact all forms of numbers from a string with regex.
olmo/eval/mmmu_eval_utils.py:104
↓ 1 callers
Function
extract_points_from_point_count
(text, image_w, image_h)
olmo/util.py:899
↓ 1 callers
Function
f1_score
(precision: float, recall: float, epsilon: float = 1e-10)
olmo/eval/evaluators.py:289
↓ 1 callers
Function
filter_warnings
()
olmo/util.py:181
↓ 1 callers
Function
find_gt_box
(gt_coords, bb_centers, bb_sizes, bbs, strategy='center')
olmo/hf_datasets/android_control_utils.py:81
↓ 1 callers
Function
find_latest_checkpoint
(dir: PathOrStr)
olmo/util.py:399
↓ 1 callers
Method
finish
(self, metadata: Metadata, results: List[List[WriteResult]])
olmo/checkpoint.py:402
↓ 1 callers
Method
fit
(self)
olmo/train.py:1279
↓ 1 callers
Function
fix_optim_state_dict
Make sure old optim state dicts are compatible with new versions.
olmo/optim.py:990
↓ 1 callers
Method
format_annotated_text
(self, answer, point_annotations)
olmo/data/data_formatter.py:325
↓ 1 callers
Method
format_messages
Applies system formatting to ith message from a sequence of messages
olmo/data/data_formatter.py:391
↓ 1 callers
Function
format_value
(value: float)
olmo/util.py:803
← previous
next →
201–300 of 893, ranked by callers