MCPcopy Create free account

hub / github.com/huggingface/smollm / functions

Functions1,907 in github.com/huggingface/smollm

↓ 1 callersMethod_get_words_from_text
(self, text: str)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:43
↓ 1 callersMethod_get_worker_id
(self)
vision/m4/training/dataset.py:1229
↓ 1 callersMethod_get_worker_id_and_worker_total_num
(self)
vision/m4/training/dataset.py:708
↓ 1 callersMethod_get_worker_indices
(self)
vision/m4/training/dataset.py:720
↓ 1 callersMethod_impute_output
(self)
text/data/smoltalk/magpie_ultra_v1/pipeline.py:429
↓ 1 callersMethod_init_trackers
(self)
vision/m4/training/trainer.py:370
↓ 1 callersMethod_load_data
(self, json_path: str)
vision/smolvlm2/smolvlm/datasets/dataset.py:457
↓ 1 callersMethod_load_data
(self, json_path: str)
vision/smolvlm2/smolvlm/datasets/dataset_clip_sampling.py:589
↓ 1 callersMethod_load_dataset
(self)
vision/m4/sourcing/pmd/loader_builder.py:29
↓ 1 callersMethod_load_dataset
Load the original dataset
vision/m4/sourcing/pmd/loader_builder.py:112
↓ 1 callersMethod_load_json_ideas_and_html_codes
(self, idx_json_file: int)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:62
↓ 1 callersMethod_log_activations
(self, curr_opt_step)
vision/m4/training/trainer.py:1188
↓ 1 callersMethod_log_deepspeed_training_stats
(self, curr_opt_step)
vision/m4/training/trainer.py:732
↓ 1 callersMethod_log_training
(self, curr_opt_step, train_task, train_logs)
vision/m4/training/trainer.py:1108
↓ 1 callersMethod_log_validation
( self, val_steps, curr_opt_step, val_per_token_loss_acc, val_num_imag
vision/m4/training/trainer.py:1523
↓ 1 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
vision/m4/models/idefics/modeling_idefics.py:60
↓ 1 callersMethod_make_selectolax_tree
(self, html_str: str)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:35
↓ 1 callersMethod_mask_special_tokens
(self, input_ids: torch.Tensor, labels: torch.Tensor)
vision/smolvlm2/smolvlm/datasets/dataset.py:814
↓ 1 callersMethod_mask_special_tokens
(self, input_ids: torch.Tensor, labels: torch.Tensor)
vision/smolvlm2/smolvlm/datasets/dataset_clip_sampling.py:937
↓ 1 callersFunction_mask_system_tokens
Identifies every occurrence of "System:" in `input_ids` (tokenized form), then masks (sets to IGNORE_INDEX) from the first token of "System:"
vision/smolvlm2/smolvlm/datasets/dataset.py:307
↓ 1 callersFunction_mask_system_tokens
Identifies every occurrence of "System:" in `input_ids` (tokenized form), then masks (sets to IGNORE_INDEX) from the first token of "System:"
vision/smolvlm2/smolvlm/datasets/dataset_clip_sampling.py:439
↓ 1 callersFunction_mask_user_tokens
Identifies every occurrence of "User:" in `input_ids`, then masks (sets to IGNORE_INDEX) from that token to the next "<end_of_utterance>"
vision/smolvlm2/smolvlm/datasets/dataset.py:348
↓ 1 callersFunction_mask_user_tokens
Identifies every occurrence of "User:" in `input_ids`, then masks (sets to IGNORE_INDEX) from that token to the next "<end_of_utterance>"
vision/smolvlm2/smolvlm/datasets/dataset_clip_sampling.py:480
↓ 1 callersMethod_merge_consecutive_text_nodes
(self, list_nodes)
vision/m4/sourcing/data_collection/processors/pre_extraction_simplificator.py:134
↓ 1 callersMethod_merge_heads
Merges attn_head_size dim and num_attn_heads dim into hidden_size
vision/m4/models/vgpt2/modeling_vgpt2.py:282
↓ 1 callersMethod_modify_image_urls
When an image URL appears more than once, when the HTML is rendered, the same image is displayed. The trick is to add a `_` at the end of the
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:68
↓ 1 callersMethod_only_text_image_nodes
(self, list_nodes)
vision/m4/sourcing/data_collection/processors/pre_extraction_simplificator.py:108
↓ 1 callersMethod_parse_response
(self, text: str)
tools/smol_tools/smol_tools/agent.py:113
↓ 1 callersMethod_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
vision/m4/models/idefics/modeling_idefics.py:752
↓ 1 callersMethod_prepare_register
Prepare model, optimizer and dataloader if necessary. Register the scheduler for checkpointing.
vision/m4/training/trainer.py:481
↓ 1 callersMethod_process_multi_json_ideas_and_html_codes
(self, indices_to_process: List[int])
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:129
↓ 1 callersMethod_recast
(self, examples)
vision/m4/sourcing/pmd/jz_loaders/jz_wit/jz_wit.py:249
↓ 1 callersMethod_recast
(self, examples)
vision/m4/sourcing/pmd/jz_loaders/jz_conceptual_captions/jz_conceptual_captions.py:231
↓ 1 callersMethod_remake_tree
It could be interesting to remake a tree after the simplifications since it can now merge some text nodes that couldn't be merged befo
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:290
↓ 1 callersMethod_remove_dates
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:231
↓ 1 callersMethod_remove_empty_elements_from_list
(self, list_: Union[List[str], None])
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:51
↓ 1 callersMethod_remove_empty_leaves
Function used to remove empty leaves iteratively, so it also ends up also removing nodes that are higher up in the tree.
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:246
↓ 1 callersMethod_remove_everything_after_node_id
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:193
↓ 1 callersMethod_remove_html_comments
(self, html_str: str)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:31
↓ 1 callersMethod_remove_html_comments
(self, html_str)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:110
↓ 1 callersMethod_remove_nodes_matching_css_rules
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:133
↓ 1 callersMethod_remove_non_interesting_nodes_but_preserve_very_interesting_children
( self, selectolax_tree, very_interesting_children_tags=["img"] )
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:153
↓ 1 callersMethod_remove_punctuations_and_whitespaces
(self, list_: List[str])
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:47
↓ 1 callersMethod_replace_breaking_lines_by_whitespaces
(self, text: str)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/03_filtering_html_codes.py:39
↓ 1 callersMethod_replace_line_break_tags
(self, html_str)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:114
↓ 1 callersMethod_replace_multimodal_tokens
Post-processes a conversation to handle missing or expanded "image"/"video" tokens based on the loaded frames. If there's no explici
vision/smolvlm2/smolvlm/datasets/dataset.py:708
↓ 1 callersMethod_replace_multimodal_tokens
Post-processes a conversation to handle missing or expanded "image"/"video" tokens based on the loaded frames. If there's no explici
vision/smolvlm2/smolvlm/datasets/dataset_clip_sampling.py:840
↓ 1 callersMethod_replace_nodes_matching_css_rules_with_text
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:147
↓ 1 callersMethod_save_batch
(self, batch, curr_idx)
vision/m4/training/trainer.py:1353
↓ 1 callersMethod_save_dataset_pairs_image_code
( self, ideas_and_html_codes: List[List[str]], screenshots: List[Image.Image], idx_json: int )
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:95
↓ 1 callersMethod_sequential_process_multi_json_ideas_and_html_codes
(self, remaining_indices: List[int])
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:136
↓ 1 callersMethod_set_up_training
Prepare variables for trainings.
vision/m4/training/trainer.py:513
↓ 1 callersFunction_split_to_single_caption
This function is mainly used in Localized Narratives where a paragraph can contain multiple relevant captions to a single image. We split the para
vision/m4/evaluation/scripts/create_sample_evaluation_datasets_simplified.py:13
↓ 1 callersFunction_stream_subprocess
(cmd, env=None, stdin=None, timeout=None, quiet=False, echo=False)
vision/m4/testing_utils.py:1056
↓ 1 callersMethod_strip_html_tree
Strips all nodes with tags NOT in INTERESTING_TAGS_SET and has counterintuitively nothing to do with the STRIP_TAGS list
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:179
↓ 1 callersMethod_strip_multiple_linebreaks
(self, html_str)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:102
↓ 1 callersMethod_strip_multiple_spaces
(self, html_str)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:106
↓ 1 callersMethod_strip_special_divs
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:209
↓ 1 callersMethod_unnest_nodes
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:274
↓ 1 callersMethod_unwrap_html_tree
(self, selectolax_tree)
vision/m4/sourcing/data_collection/processors/dom_tree_simplificator.py:118
↓ 1 callersMethod_upad_input
(self, query_layer, key_layer, value_layer, attention_mask, query_length)
vision/m4/models/perceiver/perceiver.py:383
↓ 1 callersMethod_upad_input
(self, query_layer, key_layer, value_layer, attention_mask, query_length)
vision/m4/models/vmistral/modeling_vmistral.py:694
↓ 1 callersMethod_upad_input
(self, query_layer, key_layer, value_layer, attention_mask, query_length)
vision/m4/models/vllama3/modeling_vllama3.py:661
↓ 1 callersMethod_upcast_and_reordered_attn
(self, query, key, value, attention_mask=None, head_mask=None)
vision/m4/models/vgpt2/modeling_vgpt2.py:222
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
vision/m4/models/vllama3/modeling_vllama3.py:1390
↓ 1 callersMethod_update_datasets_states
(self, dataset_idx, dataset_state)
vision/m4/training/trainer.py:985
↓ 1 callersMethod_update_logs
( self, curr_opt_step, curr_epoch, global_batch_size_current, train_lo
vision/m4/training/trainer.py:847
↓ 1 callersMethod_warm_up
Warm up the model with a test prompt
tools/smol_tools/smol_tools/base.py:35
↓ 1 callersFunctionaccelerate_torch_dtype
derive and return `torch_dtype` to be used in `from_pretrained` from either Deepspeed config or if Deepspeed isn't used than accelerator stat
vision/m4/training/utils.py:772
↓ 1 callersMethodactivate_hooks
(self)
vision/m4/utils/activation_tracker.py:174
↓ 1 callersMethodadd_batch_metric
(self, metric, **kwargs)
vision/m4/models/vgpt2/evaluation_perplexity_in_context_vgpt2.py:307
↓ 1 callersFunctionadd_vision_encoder_embeddings_query_and_support_datasets
( task, args, support_dataset, query_dataset, vision_encoder, vision_encoder_processor )
vision/m4/evaluation/evaluators/in_contexter.py:74
↓ 1 callersFunctionalb_wrapper
(transform)
vision/m4/training/utils.py:89
↓ 1 callersMethodall_model_generations
(self)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/02_01_generate_html_codes_prompt_1.py:140
↓ 1 callersMethodall_model_generations
(self)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/02_02_generate_html_codes_prompt_2.py:142
↓ 1 callersFunctionalways_full
Return True if the dataset entry should always be sampled at 100%. We check for keywords like "gpt", "visualwebinstruct", or "vision_flan".
vision/smolvlm2/scripts/create_mixture.py:18
↓ 1 callersMethodanalyse_model
(self)
vision/m4/utils/activation_tracker.py:68
↓ 1 callersMethodanalysis_discarded_pairs
(self)
vision/m4/sourcing/data_collection/visualization/pair_visualization.py:560
↓ 1 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
vision/m4/models/idefics/modeling_idefics.py:148
↓ 1 callersFunctionapply_varlen_patch
Monkey-patch HF's `_get_unpad_data` with `_my_get_unpad_data_varlen`. This modifies the varlen logic for "flash_attention_2".
vision/smolvlm2/smolvlm/model/varlen_packing.py:139
↓ 1 callersFunctionauto_resume_or_start
Detect if there's a previous checkpoint to resume from. Return True if we found a checkpoint. Otherwise, we start fresh.
vision/smolvlm2/smolvlm/train/train.py:263
↓ 1 callersFunctionaverage_normalized_levenshtein_similarity
(ground_truth, predicted_answers)
vision/m4/evaluation/custom_metrics/doc_vqa_metrics.py:37
↓ 1 callersFunctionbase_sampling_fraction
Compute the overall target fraction (a float in [0,1]) for the dataset entry based on its modality and video duration if applicable.
vision/smolvlm2/scripts/create_mixture.py:29
↓ 1 callersFunctionbatch_iter
(dset: Dataset, transform: Callable[[Dict], List[Any]], batch_size: int = 1000)
vision/m4/sourcing/pmd/helpers.py:215
↓ 1 callersMethodbatch_model_generations
(self, batch_ideas)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/02_01_generate_html_codes_prompt_1.py:90
↓ 1 callersMethodbatch_model_generations
(self, batch_ideas)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/02_02_generate_html_codes_prompt_2.py:92
↓ 1 callersMethodbrute_force_search_to_reference
(hash_image_dataset, hash_image_dataset_ref, hamming_distance_threshold)
vision/m4/sourcing/data_collection/processors/image_deduplicator.py:32
↓ 1 callersMethodbuild
(self)
vision/m4/sourcing/pmd/loader_builder.py:66
↓ 1 callersFunctionbuild_dataloader
( task, model, args, support_dataset, query_dataset, support_dataset_vision_encoder_embeddings, accelerato
vision/m4/evaluation/evaluators/in_contexter.py:128
↓ 1 callersFunctionbuild_datasets
1) Load a YAML describing multiple sub-datasets. 2) Create a list of SupervisedDataset objects. 3) If data_args.packed => use PackedConca
vision/smolvlm2/smolvlm/datasets/builder.py:385
↓ 1 callersFunctionbuild_pmd_subsets
( split: Optional[str] = None, num_proc: int = 16, num_threads_per_proc: int = 4, retries: int
vision/m4/sourcing/pmd/scripts/pmd.py:24
↓ 1 callersMethodbuild_shard_and_save_to_disk
Build, shard and save
vision/m4/sourcing/pmd/scripts/pmd.py:125
↓ 1 callersMethodcache_path
(self, url: str)
vision/m4/sourcing/pmd/helpers.py:162
↓ 1 callersFunctionchange_format
(ds: Dataset, columns_to_change: List, batch_size: int, num_proc: int)
vision/m4/utils/datasets/get_self_contained_ds.py:45
↓ 1 callersFunctioncheck_CLIP
Args_ : Media Node Returns : clip_score_max_per_img: Max CLIP score per Image clip_nbr_per_img: Number of CLIP scores
vision/m4/sourcing/data_collection/visualization/pair_stat_dashboard.py:64
↓ 1 callersFunctioncheck_eval_crash
Heuristics to decide whether to restart this opt_step-XXX checkpoint evaluation or not
vision/m4/scripts/schedule-evals.py:56
↓ 1 callersMethodcheck_format
(image_metadata, valid_formats)
vision/m4/sourcing/data_collection/processors/web_document_filtering.py:15
↓ 1 callersFunctioncheck_image_quality
Args_ : Media Node Returns : img_has_good_quality: Boolean indictating there is an image with good quality (defined by its height
vision/m4/sourcing/data_collection/visualization/pair_stat_dashboard.py:24
↓ 1 callersFunctioncheck_loaded_model
(new_checkpoint_path)
vision/m4/scripts/convert_vmistral_old_siglip_to_new_siglip.py:29
↓ 1 callersMethodcheck_number_images
(number_images, number_images_min_cutoff, number_images_max_cutoff)
vision/m4/sourcing/data_collection/processors/web_document_filtering.py:53
← previousnext →401–500 of 1,907, ranked by callers