Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Aveiro-Lin/GraphiContact
/ functions
Functions
11,352 in github.com/Aveiro-Lin/GraphiContact
⨍
Functions
11,352
◇
Types & classes
3,603
↳
Endpoints
52
↓ 40 callers
Method
from_pretrained
(cls, retriever_name_or_path, actor_handles, indexed_dataset=None, **kwargs)
src/transformers/examples/research_projects/rag/distributed_ray_retriever.py:136
↓ 39 callers
Method
shuffle
(self, buffer_size=1000)
src/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py:94
↓ 39 callers
Method
step
Performs a single optimization step. Arguments: closure (`Callable`, *optional*): A closure that reevaluates the model a
src/transformers/src/transformers/optimization.py:442
↓ 38 callers
Method
from_config
Creates an optimizer from its config with WarmUp custom object.
src/transformers/src/transformers/optimization_tf.py:230
↓ 38 callers
Method
predict
Run prediction and returns predictions and potential metrics. Depending on the dataset and your use case, your test dataset may cont
src/transformers/src/transformers/trainer.py:3017
↓ 38 callers
Method
resize_token_embeddings
Resizes input token embeddings matrix of the model if `new_num_tokens != config.vocab_size`. Takes care of tying weights embeddings
src/transformers/src/transformers/modeling_utils.py:1548
↓ 38 callers
Method
to_dict
Serializes this instance to a Python dictionary.
src/transformers/src/transformers/modelcard.py:240
↓ 37 callers
Function
set_seed
Set the random seed.
src/transformers/examples/research_projects/distillation/utils.py:126
↓ 36 callers
Method
evaluate
(self, state, dataset)
src/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py:262
↓ 35 callers
Function
filter
Filter dataset with heuristics. Config, test and has_no_keywords files are removed with a given probability.
src/transformers/examples/research_projects/codeparrot/scripts/preprocessing.py:129
↓ 34 callers
Method
_read_tsv
Reads a tab separated value file.
src/transformers/src/transformers/data/processors/utils.py:119
↓ 34 callers
Function
deps_list
(*pkgs)
src/transformers/setup.py:215
↓ 34 callers
Method
transform
Scikit / Keras interface to transformers' pipelines. This method will forward to __call__().
src/transformers/src/transformers/pipelines/base.py:889
↓ 32 callers
Method
get_input_embeddings
Returns the model's input embeddings. Returns: `nn.Module`: A torch module mapping vocabulary to hidden states.
src/transformers/src/transformers/modeling_utils.py:1353
↓ 31 callers
Function
add_start_docstrings
(*docstr)
src/transformers/src/transformers/utils/doc.py:23
↓ 31 callers
Method
collect
(self)
src/transformers/src/transformers/testing_utils.py:2193
↓ 31 callers
Method
is_world_process_zero
Whether or not this process is the global main process (when training in a distributed fashion on several machines, this is only goin
src/transformers/src/transformers/trainer.py:2758
↓ 30 callers
Function
get_activation
(activation_string)
src/transformers/src/transformers/activations.py:224
↓ 29 callers
Function
_add_variant
(weights_name: str, variant: Optional[str] = None)
src/transformers/src/transformers/modeling_utils.py:761
↓ 29 callers
Method
backward
(ctx, grad_output)
src/bitsandbytes/tests/test_modules.py:240
↓ 29 callers
Method
get_process_log_level
Returns the log level to be used depending on whether this process is the main process of node 0, main process of node non-0, or a no
src/transformers/src/transformers/training_args.py:2038
↓ 29 callers
Method
to_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
src/transformers/src/transformers/utils/generic.py:424
↓ 29 callers
Method
tokenize
Tokenize the provided input and eventually returns corresponding tokens id: - **text_input**: String to tokenize - **return_ids**: Bo
src/transformers/src/transformers/commands/serving.py:179
↓ 29 callers
Method
train
(self, state, tr_dataset, val_dataset)
src/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py:229
↓ 28 callers
Method
_get_uniform_logits
(self, batch_size: int, length: int)
src/transformers/tests/generation/test_logits_process.py:61
↓ 28 callers
Method
pad
Pad a single encoded input or a batch of encoded inputs up to predefined length or to the max sequence length in the batch.
src/transformers/src/transformers/tokenization_utils_base.py:3128
↓ 28 callers
Method
sample
r""" Generates sequences of token ids for models with a language modeling head using **multinomial sampling** and can be used for text
src/transformers/src/transformers/generation/utils.py:2671
↓ 27 callers
Method
get_vocab
(self)
src/transformers/src/transformers/tokenization_utils_fast.py:213
↓ 27 callers
Function
loss_fn
(params)
src/transformers/examples/flax/question-answering/run_qa.py:932
↓ 27 callers
Method
run_task_tests
Run pipeline tests for a specific `task` Args: task (`str`): A task name. This should be a key in the mapping `pi
src/transformers/tests/test_pipeline_mixin.py:129
↓ 26 callers
Method
convert_ids_to_tokens
(self, ids: int, skip_special_tokens: bool = False)
src/transformers/src/transformers/tokenization_utils.py:946
↓ 26 callers
Method
create_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: language (`str`, *optional*):
src/transformers/src/transformers/trainer.py:3452
↓ 26 callers
Function
is_accelerate_available
(min_version: str = "0.21.0")
src/transformers/src/transformers/utils/import_utils.py:655
↓ 26 callers
Method
print_fn
(self)
src/transformers/src/transformers/benchmark/benchmark_utils.py:633
↓ 25 callers
Method
_get_input_ids_and_config
(self, batch_size=2)
src/transformers/tests/generation/test_utils.py:92
↓ 25 callers
Function
get_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
src/transformers/src/transformers/testing_utils.py:1062
↓ 25 callers
Method
init
( self, batch_size: int, max_length: int, num_beams: int, device: torc
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:361
↓ 25 callers
Function
patch_transformer_repo_path
Temporarily patches the variables defines in `tests_fetcher` to use a different location for the repo.
src/transformers/tests/repo_utils/test_tests_fetcher.py:174
↓ 24 callers
Method
__init__
(self, config)
src/modeling/bert/modeling_bert.py:408
↓ 24 callers
Function
load_image
Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format.
src/transformers/src/transformers/image_utils.py:279
↓ 24 callers
Method
set
external allocation
src/bitsandbytes/include/AAlloc.h:56
↓ 23 callers
Method
convert
(k, v)
src/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py:130
↓ 23 callers
Method
cuda
(self, *args, **kwargs)
src/transformers/src/transformers/modeling_utils.py:2270
↓ 23 callers
Method
generate
Generate an image from the given prompts. If image_path is provided, the image is used as a starting point for the optimization. If im
src/transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py:211
↓ 23 callers
Function
is_on_gpu
(tensors)
src/bitsandbytes/bitsandbytes/functional.py:421
↓ 23 callers
Method
prepare_tf_dataset
Wraps a HuggingFace [`~datasets.Dataset`] as a `tf.data.Dataset` with collation and batching. This method is designed to create a "re
src/transformers/src/transformers/modeling_tf_utils.py:1395
↓ 22 callers
Method
check_result
(self, file_name, expected_result)
src/transformers/tests/utils/test_add_new_model_like.py:93
↓ 22 callers
Method
check_results_dict_not_empty
(self, results)
src/transformers/tests/benchmark/test_benchmark.py:30
↓ 22 callers
Method
from_dict
Constructs a `ModelCard` from a Python dictionary of parameters.
src/transformers/src/transformers/modelcard.py:222
↓ 22 callers
Method
get_env
Return a copy of the `os.environ` object that sets up `PYTHONPATH` correctly, depending on the test suite it's invoked from. This is
src/transformers/src/transformers/testing_utils.py:1464
↓ 22 callers
Function
get_tf_activation
(activation_string)
src/transformers/src/transformers/activations_tf.py:130
↓ 22 callers
Method
init_file
(self, file_name, content)
src/transformers/tests/utils/test_add_new_model_like.py:89
↓ 22 callers
Method
is_initialized
(self)
src/bitsandbytes/bitsandbytes/utils.py:61
↓ 22 callers
Function
mockenv_context
Temporarily updates the `os.environ` dictionary in-place. Similar to mockenv The `os.environ` dictionary is updated in-place so that the mod
src/transformers/src/transformers/testing_utils.py:1613
↓ 21 callers
Method
add_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
src/transformers/src/transformers/tokenization_utils_base.py:974
↓ 21 callers
Function
create_tmp_repo
Creates a repository in a temporary directory mimicking the structure of Transformers. Uses the list of models provided (which defaults to ju
src/transformers/tests/repo_utils/test_tests_fetcher.py:86
↓ 21 callers
Function
is_deepspeed_zero3_enabled
()
src/transformers/src/transformers/integrations/deepspeed.py:256
↓ 21 callers
Function
is_offline_mode
()
src/transformers/src/transformers/utils/hub.py:78
↓ 21 callers
Function
is_safetensors_available
()
src/transformers/src/transformers/utils/import_utils.py:685
↓ 21 callers
Function
is_torch_tensor
Tests if `x` is a torch tensor or not. Safe to call even if torch is not installed.
src/transformers/src/transformers/utils/generic.py:151
↓ 21 callers
Method
num_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
src/transformers/src/transformers/tokenization_utils.py:518
↓ 21 callers
Function
transform
Transform pixel location to different reference.
src/utils/image_ops.py:85
↓ 20 callers
Method
add
(number, extra=0)
src/transformers/tests/pipelines/test_pipelines_common.py:344
↓ 20 callers
Method
check_model_type
Check if the model class is in supported by the pipeline. Args: supported_models (`List[str]` or `dict`):
src/transformers/src/transformers/pipelines/base.py:962
↓ 20 callers
Function
default_data_collator
Very simple data collator that simply collates batches of dict-like objects and performs special handling for potential keys named:
src/transformers/src/transformers/data/data_collator.py:52
↓ 20 callers
Method
from_pretrained
(cls, retriever_name_or_path, actor_handles, indexed_dataset=None, **kwargs)
src/transformers/examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py:149
↓ 20 callers
Function
image_segmenter
(image, prompt)
src/transformers/src/transformers/tools/evaluate_agent.py:82
↓ 20 callers
Function
question_answerer
(text, question)
src/transformers/src/transformers/tools/evaluate_agent.py:56
↓ 20 callers
Function
require_version_core
require_version wrapper which emits a core-specific hint on failure
src/transformers/src/transformers/utils/versions.py:114
↓ 20 callers
Method
resolve
src/bitsandbytes/include/Algo-Direct2.h:56
↓ 20 callers
Method
to_numpy_array
Converts `image` to a numpy array. Optionally rescales it and puts the channel dimension as the first dimension. Args:
src/transformers/src/transformers/image_utils.py:387
↓ 19 callers
Function
get_initializer
Creates a `tf.keras.initializers.TruncatedNormal` with the given range. Args: initializer_range (*float*, defaults to 0.02): Standar
src/transformers/src/transformers/modeling_tf_utils.py:3448
↓ 19 callers
Method
get_input_embeddings
(self)
src/transformers/examples/research_projects/deebert/src/modeling_highway_bert.py:123
↓ 19 callers
Function
is_tensorboard_available
()
src/transformers/src/transformers/integrations/integration_utils.py:97
↓ 19 callers
Function
load_tool
Main function to quickly load a tool, be it on the Hub or in the Transformers library. Args: task_or_repo_id (`str`): Th
src/transformers/src/transformers/tools/base.py:643
↓ 19 callers
Function
post_call
(prev_device)
src/bitsandbytes/bitsandbytes/functional.py:467
↓ 19 callers
Function
pre_call
(device)
src/bitsandbytes/bitsandbytes/functional.py:461
↓ 19 callers
Function
replace_default_in_arg_description
Catches the default value in the description of an argument inside a docstring and replaces it by the value passed. Args: descriptio
src/transformers/utils/check_docstrings.py:890
↓ 19 callers
Function
window_function
Returns an array containing the specified window. This window is intended to be used with `stft`. The following window types are supported:
src/transformers/src/transformers/audio_utils.py:220
↓ 18 callers
Function
backend_device_count
(device: str)
src/transformers/src/transformers/testing_utils.py:2292
↓ 18 callers
Method
check_results_dict_not_empty
(self, results)
src/transformers/tests/benchmark/test_benchmark_tf.py:32
↓ 18 callers
Function
classifier
(text, labels)
src/transformers/src/transformers/tools/evaluate_agent.py:22
↓ 18 callers
Function
execute_subprocess_async
(cmd, env=None, stdin=None, timeout=180, quiet=False, echo=True)
src/transformers/src/transformers/testing_utils.py:1864
↓ 18 callers
Function
get_cls_net_gridfeat
(config, pretrained, **kwargs)
src/modeling/hrnet/hrnet_cls_net_gridfeat.py:521
↓ 18 callers
Function
get_logger
Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom transformers
src/transformers/src/transformers/utils/logging.py:148
↓ 18 callers
Function
get_scheduler
Unified API to get any scheduler from its name. Args: name (`str` or `SchedulerType`): The name of the scheduler to use.
src/transformers/src/transformers/optimization.py:335
↓ 18 callers
Method
items
(self)
src/transformers/src/transformers/tokenization_utils_base.py:286
↓ 18 callers
Method
sequence_ids
Return a list mapping the tokens to the id of their original sentences: - `None` for special tokens added around or between sequ
src/transformers/src/transformers/tokenization_utils_base.py:319
↓ 18 callers
Function
spectrogram
Calculates a spectrogram over one waveform using the Short-Time Fourier Transform. This function can create the following kinds of spectrogr
src/transformers/src/transformers/audio_utils.py:284
↓ 18 callers
Method
word_to_tokens
Get the encoded token span corresponding to a word in a sequence of the batch. Token spans are returned as a [`~tokenization_utils_b
src/transformers/src/transformers/tokenization_utils_base.py:463
↓ 17 callers
Method
_get_uniform_logits
(self, batch_size: int, length: int)
src/transformers/tests/generation/test_tf_logits_process.py:52
↓ 17 callers
Method
add
Add a new hypothesis to the list.
src/transformers/src/transformers/generation/beam_search.py:954
↓ 17 callers
Method
apply_gradients
(self, features, labels, nb_instances_in_global_batch)
src/transformers/src/transformers/trainer_tf.py:651
↓ 17 callers
Method
get_config_dict
(self, stage)
src/transformers/tests/deepspeed/test_deepspeed.py:271
↓ 17 callers
Method
get_lr
(self)
src/transformers/src/transformers/optimization.py:763
↓ 17 callers
Function
infer_channel_dimension_format
Infers the channel dimension format of `image`. Args: image (`np.ndarray`): The image to infer the channel dimension of.
src/transformers/src/transformers/image_utils.py:160
↓ 17 callers
Function
is_peft_available
()
src/transformers/src/transformers/utils/import_utils.py:398
↓ 17 callers
Method
transpose_for_scores
(self, x)
src/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py:116
↓ 17 callers
Method
word_to_chars
Get the character span in the original string corresponding to given word in a sequence of the batch. Character spans are returned a
src/transformers/src/transformers/tokenization_utils_base.py:596
↓ 16 callers
Function
evaluate
Evaluate a python expression using the content of the variables stored in a state and only evaluating a given set of functions. This fun
src/transformers/src/transformers/tools/python_interpreter.py:32
← previous
next →
101–200 of 11,352, ranked by callers