MCPcopy Create free account

hub / github.com/alibaba/Logics-Parsing / functions

Functions49,670 in github.com/alibaba/Logics-Parsing

↓ 125 callersMethodfrom_config
(cls, config, **kwargs)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/auto/auto_factory.py:207
↓ 125 callersMethodprocessor
(self)
Logics-Parsing-Omni/transformers-omni3/tests/models/bark/test_modeling_bark.py:918
↓ 122 callersMethodadd_tokens
Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to it with indices start
Logics-Parsing-Omni/transformers-omni3/src/transformers/tokenization_utils_base.py:987
↓ 122 callersMethodto
Send all values to device by calling `v.to(*args, **kwargs)` (PyTorch only). This should support casting in different `dtypes` and se
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/fuyu/image_processing_fuyu.py:123
↓ 121 callersMethodget_output_embeddings
(self)
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_utils.py:1738
↓ 121 callersFunctionset_seed
(args)
Logics-Parsing-Omni/transformers-omni3/examples/legacy/run_swag.py:222
↓ 118 callersFunctionmake_flat_list_of_images
Ensure that the output is a flat list of images. If the input is a single image, it is converted to a list of length 1. If the input is a nes
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_utils.py:201
↓ 114 callersMethodsize
(self)
Logics-Parsing-Omni/transformers-omni3/tests/tensor_parallel/test_tensor_parallel.py:49
↓ 112 callersMethoddecode
r""" quantized_representation (torch.Tensor of shape `(batch_size, dimension, time_steps)`, *optional*): Quantized continuous repr
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/dac/modeling_dac.py:604
↓ 108 callersFunctionis_deepspeed_zero3_enabled
()
Logics-Parsing-Omni/transformers-omni3/src/transformers/integrations/deepspeed.py:279
↓ 106 callersFunctionresize
(image, checkpoint_url)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/table_transformer/convert_table_transformer_to_hf.py:172
↓ 105 callersMethodadd_special_tokens
Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If special tokens are NOT
Logics-Parsing-Omni/transformers-omni3/src/transformers/tokenization_utils_base.py:883
↓ 101 callersFunctionis_sentencepiece_available
()
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/import_utils.py:918
↓ 101 callersFunctionvalid_images
(imgs)
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_utils.py:134
↓ 99 callersFunctionget_values
(model_mapping)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/auto/auto_factory.py:493
↓ 98 callersMethod_tie_or_clone_weights
Tie or clone module weights depending of whether we are using TorchScript or not
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_utils.py:2952
↓ 98 callersMethodmap
Map inputs to attention experts according to routing decision and compute query projection inside each experts.
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/jetmoe/modular_jetmoe.py:240
↓ 97 callersMethodget_text_config
Returns the text config related to the text input (encoder) or text output (decoder) of the model. The `decoder` and `encoder` input
Logics-Parsing-Omni/transformers-omni3/src/transformers/configuration_utils.py:1171
↓ 97 callersMethodimage_processor
(self)
Logics-Parsing-Omni/transformers-omni3/tests/models/nougat/test_image_processing_nougat.py:134
↓ 96 callersMethodskip_processor_without_typed_kwargs
(self, processor)
Logics-Parsing-Omni/transformers-omni3/tests/test_processing_common.py:357
↓ 96 callersMethodvision_model
(self)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/mllama/modeling_mllama.py:1569
↓ 93 callersMethodto_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/generic.py:361
↓ 90 callersMethod_assert_slow_fast_tensors_equivalence
(self, slow_tensor, fast_tensor, atol=1e-1, rtol=1e-3, mean_atol=5e-3)
Logics-Parsing-Omni/transformers-omni3/tests/test_image_processing_common.py:174
↓ 90 callersFunctiontorch_int
Casts an input to a torch int64 tensor if we are in a tracing context, otherwise to a Python int.
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/generic.py:556
↓ 87 callersFunctionvalidate_preprocess_arguments
Checks validity of typically used arguments in an `ImageProcessor` `preprocess` method. Raises `ValueError` if arguments incompatibility is c
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_utils.py:507
↓ 86 callersMethoddevice
(self)
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/fx.py:662
↓ 85 callersFunctionis_scaled_image
Checks to see whether the pixel values have already been rescaled to [0, 1].
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_utils.py:152
↓ 84 callersFunctioncenter_to_corners_format
Converts bounding boxes from center format to corners format. center format: contains the coordinate for the center of the box and its width
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_transforms.py:550
↓ 83 callersMethodprepare_config_and_inputs_for_common
(self)
Logics-Parsing-Omni/transformers-omni3/tests/causal_lm_tester.py:299
↓ 83 callersFunctionprepare_image_inputs
This function prepares a list of PIL images
Logics-Parsing-Omni/transformers-omni3/tests/models/video_llama_3/test_processing_video_llama_3.py:43
↓ 83 callersFunctionrope_config_validation
Validate the RoPE config arguments, given a `PreTrainedConfig` object
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_rope_utils.py:757
↓ 81 callersMethodhalf
(self, *args)
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_utils.py:4137
↓ 81 callersMethodtokenize
Basic Tokenization of a piece of text. For sub-word tokenization, see WordPieceTokenizer. Args: never_split (`List[str]`
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/clip/tokenization_clip.py:132
↓ 81 callersFunctionurl_to_local_path
(url, return_url_if_not_found=True)
Logics-Parsing-Omni/transformers-omni3/utils/fetch_hub_objects_for_ci.py:42
↓ 79 callersMethodupdate
(self, *args, **kwargs)
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/generic.py:332
↓ 78 callersMethod_merge_kwargs
Method to merge dictionaries of kwargs cleanly separated by modality within a Processor instance. The order of operations is as follo
Logics-Parsing-Omni/transformers-omni3/src/transformers/processing_utils.py:1234
↓ 78 callersMethodconvert_ids_to_tokens
(self, ids)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/deberta_v2/tokenization_deberta_v2.py:289
↓ 77 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
Logics-Parsing-Omni/transformers-omni3/tests/models/splinter/test_modeling_splinter.py:243
↓ 77 callersMethodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/t5/tokenization_t5.py:317
↓ 77 callersMethodtime
(self)
Logics-Parsing-Omni/transformers-omni3/utils/notification_service.py:201
↓ 76 callersMethodnum_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. <Tip> This encodes a dummy input and check
Logics-Parsing-Omni/transformers-omni3/src/transformers/tokenization_utils.py:598
↓ 74 callersFunction_prepare_4d_attention_mask
Creates a non-causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_lengt
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_attn_mask_utils.py:419
↓ 74 callersMethodupdate
Updates the padding cache with the new padding states for the layer `layer_idx` and returns the current cache. Parameters:
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/mimi/modeling_mimi.py:110
↓ 73 callersFunctioncreate_bidirectional_mask
Create a standard bidirectional mask based on the attention implementation used (stored in the config). Args: config (`PreTrainedCon
Logics-Parsing-Omni/transformers-omni3/src/transformers/masking_utils.py:880
↓ 73 callersMethodmain_process_first
A context manager for torch distributed environment where on needs to do something on the main process, while blocking replicas, and
Logics-Parsing-Omni/transformers-omni3/src/transformers/training_args.py:2117
↓ 72 callersMethodassert_padded_input_match
(self, input_r: list, input_p: list, max_length: int, pad_token_id: int)
Logics-Parsing-Omni/transformers-omni3/tests/test_tokenization_common.py:384
↓ 72 callersMethodrescale_and_normalize
Rescale and normalize images. Override to rescale and normalize the images in torch.bfloat16 as in the original implementation
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/llama4/image_processing_llama4_fast.py:323
↓ 72 callersMethodwarn_if_padding_and_no_attention_mask
Shows a one-time warning if the input_ids appear to contain padding and no attention mask was given.
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_utils.py:5087
↓ 71 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/bark/modeling_bark.py:1341
↓ 71 callersMethodget_decoder
(self, **kwargs)
Logics-Parsing-Omni/transformers-omni3/tests/models/wav2vec2_with_lm/test_processing_wav2vec2_with_lm.py:87
↓ 71 callersFunctionis_accelerate_available
(min_version: str = ACCELERATE_MIN_VERSION)
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/import_utils.py:534
↓ 68 callersFunctioncached_file
Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_repo_id (`str` or `os.PathLike
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/hub.py:271
↓ 68 callersFunctionget_tests_dir
Args: append_path: optional path to append to the tests dir path Return: The full path to the `tests` dir, so that the tests
Logics-Parsing-Omni/transformers-omni3/src/transformers/testing_utils.py:1493
↓ 68 callersMethodget_tokenizers
(cls, **kwargs)
Logics-Parsing-Omni/transformers-omni3/tests/models/udop/test_processing_udop.py:89
↓ 68 callersMethodpush_to_hub
Upload `self.model` and `self.processing_class` to the 🤗 model hub on the repo `self.args.hub_model_id`. Parameters: com
Logics-Parsing-Omni/transformers-omni3/src/transformers/trainer.py:4812
↓ 67 callersMethod_get_feat_extract_output_lengths
Computes the output length of the convolutional layers
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/sew/modular_sew.py:287
↓ 67 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch` (if installed). Args: seed (`int`):
Logics-Parsing-Omni/transformers-omni3/src/transformers/trainer_utils.py:93
↓ 66 callersFunctionbackend_empty_cache
(device: str)
Logics-Parsing-Omni/transformers-omni3/src/transformers/testing_utils.py:3044
↓ 66 callersMethodregister
(cls, key: str, value: Callable)
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/generic.py:1010
↓ 63 callersFunctionapply_chunking_to_forward
(*args, **kwargs)
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/dummy_pt_objects.py:588
↓ 62 callersFunctionload_image
Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format.
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_utils.py:444
↓ 62 callersMethodstep
Performs a single optimization step Arguments: closure (callable, optional): A closure that reevaluates the model
Logics-Parsing-Omni/transformers-omni3/src/transformers/optimization.py:834
↓ 60 callersMethodevaluate
Run evaluation and returns metrics. The calling script will be responsible for providing a method to compute metrics, as they are ta
Logics-Parsing-Omni/transformers-omni3/src/transformers/trainer.py:4135
↓ 59 callersMethodprepare_text_inputs
(self, batch_size: Optional[int] = None, **kwargs)
Logics-Parsing-Omni/transformers-omni3/tests/models/grounding_dino/test_processing_grounding_dino.py:82
↓ 58 callersMethodtext_model
(self)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/emu3/modular_emu3.py:1075
↓ 57 callersMethodget_tokenizers
(self, fast=True, **kwargs)
Logics-Parsing-Omni/transformers-omni3/tests/test_tokenization_common.py:292
↓ 56 callersMethodclear
Clears the console.
Logics-Parsing-Omni/transformers-omni3/src/transformers/commands/chat.py:182
↓ 56 callersMethodrun_task_tests
Run pipeline tests for a specific `task` Args: task (`str`): A task name. This should be a key in the mapping `pi
Logics-Parsing-Omni/transformers-omni3/tests/test_pipeline_mixin.py:173
↓ 55 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
Logics-Parsing-Omni/transformers-omni3/tests/models/git/test_modeling_git.py:388
↓ 55 callersMethodrescale
Rescale the image by the given factor. image = image * rescale_factor. Args: image (`np.ndarray`): Image
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/detr/image_processing_detr.py:1000
↓ 54 callersFunctioninit_empty_weights
A context manager under which models are initialized with all parameters on the meta device, therefore creating an empty model. Useful when j
Logics-Parsing-Omni/transformers-omni3/src/transformers/integrations/accelerate.py:46
↓ 54 callersFunctionis_torchdynamo_compiling
()
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/import_utils.py:1214
↓ 54 callersMethodupdate
( self, key_states: torch.Tensor, value_states: torch.Tensor, layer_idx: int,
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/granitemoehybrid/modeling_granitemoehybrid.py:224
↓ 53 callersMethodsave_pretrained
(self, path: str, filename_prefix: Optional[str] = None)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/deberta_v2/tokenization_deberta_v2.py:440
↓ 52 callersMethodadd
(number, extra=0)
Logics-Parsing-Omni/transformers-omni3/tests/pipelines/test_pipelines_common.py:355
↓ 52 callersMethodprepare_components
(self)
Logics-Parsing-Omni/transformers-omni3/tests/test_processing_common.py:126
↓ 51 callersFunction_is_whitespace
Checks whether `char` is a whitespace character.
Logics-Parsing-Omni/transformers-omni3/src/transformers/tokenization_utils.py:342
↓ 51 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
Logics-Parsing-Omni/transformers-omni3/tests/test_modeling_common.py:597
↓ 51 callersMethodfeature_extractor
(self)
Logics-Parsing-Omni/transformers-omni3/tests/models/moshi/test_modeling_moshi.py:849
↓ 51 callersMethodfrom_json_file
Constructs a `ModelCard` from a json file of parameters.
Logics-Parsing-Omni/transformers-omni3/src/transformers/modelcard.py:225
↓ 51 callersMethodget_text_config
Defaulting to audio config as it's the decoder in this case which is usually the text backbone
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/dia/configuration_dia.py:371
↓ 51 callersMethodgradient_checkpointing_enable
Activates gradient checkpointing for the current model. We pass the `__call__` method of the modules instead of `forward` because `_
Logics-Parsing-Omni/transformers-omni3/src/transformers/modeling_utils.py:3490
↓ 50 callersFunctionis_torch_xla_available
Check if `torch_xla` is available. To train a native pytorch job in an environment with torch xla installed, set the USE_TORCH_XLA to false.
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/import_utils.py:294
↓ 50 callersMethodsample
(self, n_samples)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/deprecated/jukebox/modeling_jukebox.py:730
↓ 49 callersMethod__init__
(self, in_features, alpha=1.0)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py:3571
↓ 48 callersMethodapply
Applies the transformation to a coordinate tensor. Args: pts: A [*, 3] coordinate tensor. Returns: T
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/esm/openfold_utils/rigid_utils.py:939
↓ 48 callersMethodfetch_images
Convert a single or a list of urls into the corresponding `PIL.Image` objects. If a single url is passed, the return value will be a
Logics-Parsing-Omni/transformers-omni3/src/transformers/image_processing_base.py:517
↓ 48 callersFunctionwindow_function
Returns an array containing the specified window. This window is intended to be used with `stft`. The following window types are supported:
Logics-Parsing-Omni/transformers-omni3/src/transformers/audio_utils.py:549
↓ 47 callersMethodassert_batch_padded_input_match
( self, input_r: dict, input_p: dict, max_length: int, pad_token_id: i
Logics-Parsing-Omni/transformers-omni3/tests/models/fnet/test_tokenization_fnet.py:382
↓ 47 callersMethodencode_boxes
Args: Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary. Same as doing `self.convert_token
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/udop/tokenization_udop.py:766
↓ 46 callersMethod__init__
(self, dim, mult=4, dropout=0.0)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/qwen2_5_omni/modular_qwen2_5_omni.py:3238
↓ 46 callersMethodforward
( self, input_ids: torch.LongTensor = None, )
Logics-Parsing-Omni/transformers-omni3/tests/models/phi3/test_modeling_phi3.py:50
↓ 46 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Optional[Union[str, os.PathLike]], *model_args, **kwargs)
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/markuplm/modeling_markuplm.py:538
↓ 46 callersFunctionis_torch_tensor
Tests if `x` is a torch tensor or not. Safe to call even if torch is not installed.
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/generic.py:124
↓ 45 callersMethodcenter_crop
Center crop an image to a certain size. Args: image (`np.ndarray`): Image to center crop. cr
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/owlvit/image_processing_owlvit.py:241
↓ 45 callersMethoddebug
(*args, **kwargs)
Logics-Parsing-Omni/transformers-omni3/tests/utils/test_modeling_utils.py:1841
↓ 45 callersMethodencode_plus_boxes
Tokenize and prepare for the model a sequence or a pair of sequences. <Tip warning={true}> This method is deprecated, `__ca
Logics-Parsing-Omni/transformers-omni3/src/transformers/models/udop/tokenization_udop.py:809
↓ 45 callersFunctionget_activation
(activation_string)
Logics-Parsing-Omni/transformers-omni3/src/transformers/activations.py:345
↓ 45 callersFunctionrequire_version
Perform a runtime check of the dependency versions, using the exact same syntax used by pip. The installed module version comes from the *si
Logics-Parsing-Omni/transformers-omni3/src/transformers/utils/versions.py:49
↓ 44 callersFunction_is_punctuation
Checks whether `char` is a punctuation character.
Logics-Parsing-Omni/transformers-omni3/src/transformers/tokenization_utils.py:366
← previousnext →101–200 of 49,670, ranked by callers