MCPcopy Create free account

hub / github.com/huggingface/smollm / functions

Functions1,907 in github.com/huggingface/smollm

Functionreplace_str_in_file
(file, text_to_search, replacement_text)
vision/m4/testing_utils.py:872
Methodreplace_url
(match)
vision/data/datasets_processing_scripts/build_websight_v02/python_scripts/04_screenshot_html_codes.py:77
Methodrepo_root_dir
(self)
vision/m4/testing_utils.py:680
Methodrepo_root_dir_str
(self)
vision/m4/testing_utils.py:684
Functionrequire_bnb
Decorator marking a test that requires bitsandbytes
vision/m4/testing_utils.py:190
Functionrequire_bnb_non_decorator
Non-Decorator function that would skip a test if bitsandbytes is missing
vision/m4/testing_utils.py:202
Functionrequire_deepspeed
Decorator marking a test that requires deepspeed
vision/m4/testing_utils.py:176
Functionrequire_torch
Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed.
vision/m4/testing_utils.py:82
Functionrequire_torch_bf16
Decorator marking a test that requires CUDA hardware supporting bf16 and PyTorch >= 1.9.
vision/m4/testing_utils.py:271
Functionrequire_torch_gpu
Decorator marking a test that requires CUDA and PyTorch.
vision/m4/testing_utils.py:164
Functionrequire_torch_multi_gpu
Decorator marking a test that requires a multi-GPU setup (in PyTorch). These tests are skipped on a machine without multiple GPUs. To ru
vision/m4/testing_utils.py:109
Functionrequire_torch_no_gpus
Decorator marking a test that requires a setup without GPUs (in PyTorch). These tests are skipped on a machine with GPUs. To run *only* the
vision/m4/testing_utils.py:95
Functionrequire_torch_non_multi_gpu
Decorator marking a test that requires 0 or 1 GPU setup (in PyTorch).
vision/m4/testing_utils.py:127
Functionrequire_torch_up_to_2_gpus
Decorator marking a test that requires 0 or 1 or 2 GPU setup (in PyTorch).
vision/m4/testing_utils.py:142
Functionreset_format
Resets the formatting for HuggingFace M4's loggers. All handlers currently bound to the root logger are affected by this method.
vision/m4/utils/logging.py:237
Methodreset_state
(self)
vision/m4/training/dataset.py:945
Methodretrieve_idx_closest_examples
Returns the indices of the `num_examples` closest embeddings in ascending order
vision/m4/models/vgpt2/evaluation_classification_in_context_vgpt2.py:158
Methodretrieve_idx_closest_examples
Returns the indices of the `num_examples` closest embeddings in ascending order
vision/m4/models/vgpt2/evaluation_captioning_in_context_vgpt2.py:157
Methodretrieve_idx_closest_examples
Returns the indices of the `num_examples` closest embeddings in ascending order
vision/m4/models/vgpt2/evaluation_classification_vqa_in_context_vgpt2.py:41
Methodretrieve_idx_closest_examples
Returns the indices of the `num_examples` closest embeddings in ascending order
vision/m4/models/vgpt2/evaluation_open_ended_vqa_in_context_vgpt2.py:203
Methodrun_agent
()
tools/smol_tools/demo_tkinter.py:477
Functionrun_cmd
(cmd, check=True)
vision/m4/scripts/schedule-evals.py:30
Functionrun_cmd
(cmd, check=True)
vision/m4/scripts/cleanup-checkpoints.py:44
Functionsafe_load_tokenizer
(tokenizer_id)
vision/smolvlm2/smolvlm/conversation.py:312
Functionsave_dataset
(idx_mini_epoch)
vision/data/datasets_processing_scripts/build_concatenation_datasets_sft/build_concat_ds_sft.py:520
Functionsave_example_in_files
(example, idx, saving_dir, ds_type)
vision/m4/utils/datasets/create_webdataset_tar.py:188
Functionsave_example_in_files_with_num_shards
( example, idx, saving_dir, ds_type, num_examples_per_shard, save_shard_prefix )
vision/m4/utils/datasets/create_webdataset_tar.py:202
MethodsetUp
(self)
vision/m4/testing_utils.py:627
Methodset_decoder
(self, decoder)
vision/m4/models/vmistral/modeling_vmistral.py:1412
Methodset_decoder
(self, decoder)
vision/m4/models/idefics/modeling_idefics.py:1058
Methodset_decoder
(self, decoder)
vision/m4/models/vllama3/modeling_vllama3.py:1548
Methodset_epoch
(self, epoch)
vision/m4/training/dataset.py:698
Methodset_epoch
(self, epoch)
vision/m4/training/dataset.py:950
Methodset_epoch
(self, epoch)
vision/m4/training/dataset.py:1372
Methodset_epoch
(self, epoch)
vision/m4/training/dataset.py:1463
Methodset_input_embeddings
(self, value)
vision/m4/models/vmistral/modeling_vmistral.py:1071
Methodset_input_embeddings
(self, value)
vision/m4/models/vmistral/modeling_vmistral.py:1400
Methodset_input_embeddings
(self, new_embeddings)
vision/m4/models/vgpt2/modeling_vgpt2.py:822
Methodset_input_embeddings
(self, value)
vision/m4/models/idefics/modeling_idefics.py:748
Methodset_input_embeddings
(self, value)
vision/m4/models/idefics/modeling_idefics.py:1049
Methodset_input_embeddings
(self, value)
vision/m4/models/vllama3/modeling_vllama3.py:1164
Methodset_input_embeddings
(self, value)
vision/m4/models/vllama3/modeling_vllama3.py:1536
Methodset_output_embeddings
(self, new_embeddings)
vision/m4/models/vmistral/modeling_vmistral.py:1409
Methodset_output_embeddings
(self, new_embeddings)
vision/m4/models/vgpt2/modeling_vgpt2.py:1152
Methodset_output_embeddings
(self, new_embeddings)
vision/m4/models/idefics/modeling_idefics.py:1055
Methodset_output_embeddings
(self, new_embeddings)
vision/m4/models/vllama3/modeling_vllama3.py:1545
Methodset_state
(self, n_seen_examples_per_worker)
vision/m4/training/dataset.py:598
Methodset_state
(self, worker_idx_tracker, start_worker_idx)
vision/m4/training/dataset.py:694
Methodset_state
(self, worker_idx_tracker, start_worker_idx)
vision/m4/training/dataset.py:941
Functionset_verbosity_debug
Set the verbosity to the `DEBUG` level.
vision/m4/utils/logging.py:157
Functionset_verbosity_error
Set the verbosity to the `ERROR` level.
vision/m4/utils/logging.py:162
Functionset_verbosity_warning
Set the verbosity to the `WARNING` level.
vision/m4/utils/logging.py:152
Methodshould_keep_pair
(pair)
vision/m4/sourcing/data_collection/visualization/pair_visualization.py:395
Methodshow_agent_input
(self)
tools/smol_tools/demo_tkinter.py:447
Methodshow_chat_window
(self)
tools/smol_tools/demo_tkinter.py:505
Functionsimple_collate
(x)
vision/m4/training/dataset.py:94
Functionsplit_keep_2
(x)
vision/m4/training/dataset_utils.py:199
Functionsplit_pack_and_pad_iqa_finetuning
( sample, tokenizer, max_seq_len, image_transform, max_num_images, image_seq_len,
vision/m4/training/packing.py:1202
Functionsplit_pack_and_pad_ocr
( sample, tokenizer, max_seq_len, image_transform, max_num_images, image_seq_len,
vision/m4/training/packing.py:1015
Functionsplit_pack_and_pad_pairs
( sample, tokenizer, max_seq_len, image_transform, max_num_images, image_seq_len,
vision/m4/training/packing.py:903
Functionsplit_pack_and_pad_sft
( sample, tokenizer, max_seq_len, image_transform, max_num_images, image_seq_len,
vision/m4/training/packing.py:1293
Functionsplit_pack_and_pad_webdocs
Return a batch of samples in the format expected by the model which includes `input_ids`, `pixel_values`, `attention_mask`, `image_attention_
vision/m4/training/packing.py:453
Methodsrc_dir
(self)
vision/m4/testing_utils.py:688
Methodsrc_dir_str
(self)
vision/m4/testing_utils.py:692
Methodstart_new_chat
Start a new chat with a unique ID
tools/smol_tools/smol_tools/chatter.py:49
Methodstate_dict
(self)
vision/m4/training/dataset.py:701
Methodstate_dict
(self)
vision/m4/training/dataset.py:954
Methodstate_dict
(self)
vision/m4/training/dataset.py:1201
Methodstate_dict
(self)
vision/m4/training/dataset.py:1290
Methodstate_dict
(self)
vision/m4/training/dataset.py:1489
Functionstore_bytes_only_for_images
(exs, columns_to_change)
vision/m4/utils/datasets/get_self_contained_ds.py:38
Methodsummarize
(input_text)
tools/smol_tools/demo_tkinter.py:185
Methodtag
(self)
vision/m4/sourcing/data_collection/processors/pre_extraction_simplificator.py:19
Functiontar_shard_and_send_to_s3
(saving_dir_shard)
vision/m4/utils/datasets/create_webdataset_tar.py:312
MethodtearDown
(self)
vision/m4/testing_utils.py:784
Methodtest_file_dir
(self)
vision/m4/testing_utils.py:656
Methodtest_file_dir_str
(self)
vision/m4/testing_utils.py:660
Methodtest_file_path
(self)
vision/m4/testing_utils.py:648
Methodtest_file_path_str
(self)
vision/m4/testing_utils.py:652
Methodtests_dir
(self)
vision/m4/testing_utils.py:664
Methodtests_dir_str
(self)
vision/m4/testing_utils.py:668
Methodtext_lengths
()
vision/m4/sourcing/data_collection/visualization/pair_visualization.py:199
Methodtie_weights
Overwrite `transformers.modeling_utils.PreTrainedModel.tie_weights` to handle the case of DecoupledLinear and DecoupledEmbedding.
vision/m4/models/vmistral/modeling_vmistral.py:1418
Methodtie_weights
Overwrite `transformers.modeling_utils.PreTrainedModel.tie_weights` to handle the case of DecoupledLinear and DecoupledEmbedding.
vision/m4/models/vgpt2/modeling_vgpt2.py:1155
Methodtie_weights
Overwrite `transformers.modeling_utils.PreTrainedModel.tie_weights` to handle the case of DecoupledLinear and DecoupledEmbedding.
vision/m4/models/idefics/modeling_idefics.py:1064
Methodtie_weights
Overwrite `transformers.modeling_utils.PreTrainedModel.tie_weights` to handle the case of DecoupledLinear and DecoupledEmbedding.
vision/m4/models/vllama3/modeling_vllama3.py:1554
Methodto_dict
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`]. Returns: `Dict[str,
vision/m4/models/vmistral/configuration_vmistral.py:359
Methodto_dict
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`]. Returns: `Dict[str,
vision/m4/models/vllama3/configuration_vllama3.py:398
Methodto_gradio_chatbot
(self)
vision/smolvlm2/smolvlm/conversation.py:252
Functionto_tensor
(batch)
vision/m4/training/dataset.py:86
Functiontokenize_batch
(batch)
vision/data/datasets_processing_scripts/build_laion_coco_dataset/python_scripts/train_bin_classif.py:367
Functiontokenizer_image_token
(prompt, tokenizer, return_tensors=None)
vision/smolvlm2/smolvlm/mm_utils.py:283
Functiontorch_assert_close
compare two tensors or non-tensor numbers for their closeness.
vision/m4/testing_utils.py:245
Functiontorch_assert_equal
compare two tensors or non-tensor numbers for their equality
vision/m4/testing_utils.py:237
Methodtraverse_recursive
(node, list_nodes)
vision/m4/sourcing/data_collection/processors/pre_extraction_simplificator.py:70
Methodupdate_before_collapsing_meta
(self, batch: Dict)
vision/m4/sourcing/pmd/loader_builder.py:264
Methodupdate_before_collapsing_meta
(self, batch: Dict)
vision/m4/sourcing/pmd/loader_builder.py:298
Methodupdate_before_collapsing_meta
(self, batch: Dict)
vision/m4/sourcing/pmd/loader_builder.py:316
Methodupdate_before_collapsing_meta
(self, batch: Dict)
vision/m4/sourcing/pmd/loader_builder.py:333
Methodupdate_before_collapsing_meta
(self, batch: Dict)
vision/m4/sourcing/pmd/loader_builder.py:356
← previousnext →1,801–1,900 of 1,907, ranked by callers