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
↓ 4 callers
Method
get_dev_examples
See base class.
src/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py:424
↓ 4 callers
Method
get_dummy_dataset
(self)
src/transformers/examples/research_projects/rag/test_distributed_retriever.py:127
↓ 4 callers
Method
get_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
src/transformers/src/transformers/modeling_utils.py:889
↓ 4 callers
Method
get_head_mask
Prepare the head mask if needed. Args: head_mask (`torch.Tensor` with shape `[num_heads]` or `[num_hidden_layers x num_h
src/transformers/src/transformers/modeling_utils.py:941
↓ 4 callers
Function
get_indent
Returns the indent in given line (as string).
src/transformers/utils/custom_init_isort.py:58
↓ 4 callers
Method
get_line_no
(self, idx)
src/datasets/human_mesh_tsv.py:165
↓ 4 callers
Method
get_line_no
(self, idx)
src/datasets/hand_mesh_tsv.py:169
↓ 4 callers
Function
get_module_from_file
Returns the module name corresponding to a module file.
src/transformers/src/transformers/commands/add_new_model_like.py:427
↓ 4 callers
Function
get_parameter_dtype
Returns the first found floating dtype in parameters if there is one, otherwise returns the last dtype it found.
src/transformers/src/transformers/modeling_utils.py:205
↓ 4 callers
Function
get_test_classes
Get all [test] classes in a model test file with attribute `all_model_classes` that are non-empty. These are usually the (model) test classes con
src/transformers/utils/get_test_info.py:73
↓ 4 callers
Method
get_test_dataloader
Returns the test [`~torch.utils.data.DataLoader`]. Subclass and override this method if you want to inject some custom behavior.
src/transformers/src/transformers/trainer.py:861
↓ 4 callers
Method
get_train_dataloader
Returns the training [`~torch.utils.data.DataLoader`]. Will use no sampler if `train_dataset` does not implement `__len__`, a random
src/transformers/src/transformers/trainer.py:772
↓ 4 callers
Method
get_train_dataloader
(self)
src/transformers/tests/trainer/test_trainer.py:236
↓ 4 callers
Method
get_train_examples
See base class.
src/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py:419
↓ 4 callers
Function
get_transform_buffer
(shape, dtype, device, to_order, from_order="row", transpose=False)
src/bitsandbytes/bitsandbytes/functional.py:482
↓ 4 callers
Function
get_wanted_result
(result)
src/transformers/examples/research_projects/deebert/run_glue_deebert.py:59
↓ 4 callers
Function
glue_compute_metrics
(task_name, preds, labels)
src/transformers/src/transformers/data/metrics/__init__.py:60
↓ 4 callers
Method
greedy_search
r""" Generates sequences of token ids for models with a language modeling head using **greedy decoding** and can be used for text-deco
src/transformers/src/transformers/generation/utils.py:2410
↓ 4 callers
Method
group_beam_search
r""" Generates sequences of token ids for models with a language modeling head using **diverse beam search decoding** and can be used
src/transformers/src/transformers/generation/utils.py:3619
↓ 4 callers
Function
ids_tensor
Creates a random int32 tensor of the shape within the vocab size.
src/transformers/tests/test_modeling_tf_common.py:1835
↓ 4 callers
Function
infer_framework
Infers the framework of a given model without using isinstance(), because we cannot guarantee that the relevant classes are imported or avail
src/transformers/src/transformers/utils/generic.py:675
↓ 4 callers
Function
infer_framework_load_model
Select framework (TensorFlow or PyTorch) to use from the `model` passed. Returns a tuple (framework, model). If `model` is instantiated, thi
src/transformers/src/transformers/pipelines/base.py:186
↓ 4 callers
Method
init_retrieval
(self)
src/transformers/examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py:28
↓ 4 callers
Method
init_weights
If needed prunes and maybe initializes weights. If using a custom `PreTrainedModel`, you need to implement any initialization logic i
src/transformers/src/transformers/modeling_utils.py:1830
↓ 4 callers
Function
is_comet_available
()
src/transformers/src/transformers/integrations/integration_utils.py:93
↓ 4 callers
Function
is_copy_consistent
Check if the code commented as a copy in a file matches the original. Args: filename (`str`): The name of the file to ch
src/transformers/utils/check_copies.py:288
↓ 4 callers
Function
is_fsdp_enabled
()
src/transformers/src/transformers/modeling_utils.py:126
↓ 4 callers
Function
is_optuna_available
()
src/transformers/src/transformers/integrations/integration_utils.py:101
↓ 4 callers
Function
is_sagemaker_model_parallel_available
()
src/transformers/src/transformers/sagemaker/training_args_sm.py:32
↓ 4 callers
Function
is_soundfile_availble
()
src/transformers/src/transformers/utils/import_utils.py:799
↓ 4 callers
Function
is_torch_bf16_available_on_device
(device)
src/transformers/src/transformers/utils/import_utils.py:356
↓ 4 callers
Function
is_torch_bf16_gpu_available
()
src/transformers/src/transformers/utils/import_utils.py:302
↓ 4 callers
Function
is_torch_fx_available
()
src/transformers/src/transformers/utils/import_utils.py:394
↓ 4 callers
Function
is_torch_neuroncore_available
(check_device=True)
src/transformers/src/transformers/utils/import_utils.py:454
↓ 4 callers
Function
is_torch_tf32_available
()
src/transformers/src/transformers/utils/import_utils.py:376
↓ 4 callers
Function
is_valid_image
(img)
src/transformers/src/transformers/image_utils.py:73
↓ 4 callers
Function
load_state_dict
Reads a PyTorch checkpoint file, returning properly formatted errors if they arise.
src/transformers/src/transformers/modeling_utils.py:465
↓ 4 callers
Method
loader_batch_item
Return item located at `loader_batch_index` within the current `loader_batch_data`.
src/transformers/src/transformers/pipelines/pt_utils.py:70
↓ 4 callers
Function
log_metrics
(step, metrics)
src/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py:154
↓ 4 callers
Method
make_sortish_sampler
(self, batch_size, distributed=False, shuffle=True, **kwargs)
src/transformers/examples/legacy/seq2seq/utils.py:171
↓ 4 callers
Function
make_test_data_dir
(tmp_dir)
src/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples.py:115
↓ 4 callers
Function
mask_split
(img, num_parts)
src/tools/train_graphi_contact_damon_SIMU.py:277
↓ 4 callers
Function
mask_split
(img, num_parts)
src/tools/train_graphi_contact_damon.py:260
↓ 4 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
src/transformers/src/transformers/data/metrics/squad_metrics.py:37
↓ 4 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
src/transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py:181
↓ 4 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
src/transformers/examples/research_projects/rag/utils_rag.py:181
↓ 4 callers
Method
on_evaluate
Event called after an evaluation phase.
src/transformers/src/transformers/trainer_callback.py:272
↓ 4 callers
Method
open
(*args, **kwargs)
src/transformers/tests/pipelines/test_pipelines_zero_shot_image_classification.py:37
↓ 4 callers
Method
optimize
Normalization on the loss (gradient accumulation or distributed training), followed by backward pass on the loss, possibly followed b
src/transformers/examples/research_projects/distillation/distiller.py:465
↓ 4 callers
Method
pad
Pad input values / input vectors or a batch of input values / input vectors up to predefined length or to the max sequence length in
src/transformers/src/transformers/feature_extraction_sequence_utils.py:52
↓ 4 callers
Method
pad
(self)
src/transformers/examples/research_projects/rag/finetune_rag.py:251
↓ 4 callers
Method
pop_callback
Remove a callback from the current list of [`~transformers.TrainerCallback`] and returns it. If the callback is not found, returns `
src/transformers/src/transformers/trainer.py:662
↓ 4 callers
Function
popcnt32
src/bitsandbytes/include/SIMD.h:55
↓ 4 callers
Method
post
(self)
src/transformers/utils/notification_service.py:573
↓ 4 callers
Method
preprocess
(self, conversation: Conversation, min_length_for_response=32)
src/transformers/src/transformers/pipelines/conversational.py:294
↓ 4 callers
Method
preprocess
Preprocess will take the `input_` of a specific pipeline and return a dictionary of everything necessary for `_forward` to run proper
src/transformers/src/transformers/pipelines/base.py:1005
↓ 4 callers
Method
print_results
(self, result_dict, type_label)
src/transformers/src/transformers/benchmark/benchmark_utils.py:842
↓ 4 callers
Function
process_story
Extract the story and summary from a story file. Arguments: raw_story (str): content of the story file as an utf-8 encoded string. R
src/transformers/examples/research_projects/bertabs/utils_summarization.py:62
↓ 4 callers
Method
prune_heads
(self, heads)
src/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py:202
↓ 4 callers
Function
quant_multi
(x, dim)
src/bitsandbytes/tests/test_functional.py:248
↓ 4 callers
Function
quant_zp
(x)
src/bitsandbytes/tests/test_functional.py:1647
↓ 4 callers
Function
quantize_global
(x: torch.Tensor)
src/bitsandbytes/bitsandbytes/triton/quantize_global.py:10
↓ 4 callers
Method
register_pipeline
( self, task: str, pipeline_class: type, pt_model: Optional[Union[type, Tuple[
src/transformers/src/transformers/pipelines/base.py:1219
↓ 4 callers
Function
replace
(key, val)
src/transformers/examples/research_projects/jax-projects/model_parallel/partitions.py:46
↓ 4 callers
Method
replicate
(self)
src/transformers/examples/flax/language-modeling/run_clm_flax.py:282
↓ 4 callers
Method
resize_position_embeddings
(self, new_num_position_embeddings: int)
src/transformers/src/transformers/modeling_utils.py:1818
↓ 4 callers
Function
retrieve_model_classes
Retrieve the model classes associated to a given model. Args: model_type (`str`): A valid model type (like "bert" or "gpt2")
src/transformers/src/transformers/commands/add_new_model_like.py:726
↓ 4 callers
Function
rewrite_logs
(d)
src/transformers/src/transformers/integrations/integration_utils.py:565
↓ 4 callers
Method
run_and_check
( self, stage: str, model: str, eval_steps: int = 10, distributed: boo
src/transformers/examples/research_projects/wav2vec2/test_wav2vec2_deepspeed.py:120
↓ 4 callers
Function
save_json
(content, path, indent=4, **json_dump_kwargs)
src/transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py:149
↓ 4 callers
Function
save_json
(content, path, indent=4, **json_dump_kwargs)
src/transformers/examples/research_projects/rag/utils_rag.py:149
↓ 4 callers
Method
save_to_csv
(self, result_dict, filename)
src/transformers/src/transformers/benchmark/benchmark_utils.py:888
↓ 4 callers
Method
save_vocabulary
Save only the vocabulary of the tokenizer (vocabulary + added tokens). This method won't save the configuration and special token ma
src/transformers/src/transformers/tokenization_utils_base.py:2498
↓ 4 callers
Function
separate_process_wrapper_fn
This function wraps another function into its own separated process. In order to ensure accurate memory measurements it is important that the
src/transformers/src/transformers/benchmark/benchmark_utils.py:76
↓ 4 callers
Method
setUp
(self)
src/transformers/tests/quantization/bnb/test_4bit.py:101
↓ 4 callers
Method
set_adapter
If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT official documentation: htt
src/transformers/src/transformers/integrations/peft.py:268
↓ 4 callers
Method
set_early_exit_entropy
(self, x)
src/transformers/examples/research_projects/deebert/src/modeling_highway_bert.py:34
↓ 4 callers
Function
set_module_quantized_tensor_to_device
A helper function to set a given tensor (parameter of buffer) of a module on a specific device (note that doing `param.to(device)` creates a
src/transformers/src/transformers/integrations/bitsandbytes.py:24
↓ 4 callers
Function
set_seed
For reproducible training Args: seed: A seed for reproducible training
src/transformers/examples/research_projects/information-gain-filtration/igf/igf.py:21
↓ 4 callers
Function
set_verbosity
Set the verbosity level for the 🤗 Transformers's root logger. Args: verbosity (`int`): Logging level, e.g., one of:
src/transformers/src/transformers/utils/logging.py:185
↓ 4 callers
Function
shard_checkpoint
Splits a model state dictionary in sub-checkpoints so that the final size of each sub-checkpoint does not exceed a given size. The sub-c
src/transformers/src/transformers/modeling_utils.py:298
↓ 4 callers
Function
simplify_replacements
Simplify a list of replacement patterns to make sure there are no needless ones. For instance in the sequence "Bert->BertNew, BertConfig->Be
src/transformers/src/transformers/commands/add_new_model_like.py:390
↓ 4 callers
Function
spmm
(sparse, dense)
src/modeling/_smpl.py:159
↓ 4 callers
Function
spmm
(sparse, dense)
src/modeling/_mano.py:81
↓ 4 callers
Method
squareplus
r""" Helper to map inputs to the positive orthant by applying the square-plus operation. Reference: https://twitter.com/jon_barron/sta
src/transformers/src/transformers/time_series_utils.py:156
↓ 4 callers
Method
stop
stop tracking for the passed stage
src/transformers/src/transformers/trainer_utils.py:546
↓ 4 callers
Method
stop_and_update_metrics
combine stop and metrics update in one call for simpler code
src/transformers/src/transformers/trainer_utils.py:646
↓ 4 callers
Function
tf_shard_checkpoint
Splits a model state dictionary in sub-checkpoints so that the final size of each sub-checkpoint does not exceed a given size. The sub-c
src/transformers/src/transformers/modeling_tf_utils.py:639
↓ 4 callers
Method
to_bf16
r""" Cast the floating-point `params` to `jax.numpy.bfloat16`. This returns a new `params` tree and does not cast the `params` in plac
src/transformers/src/transformers/modeling_flax_utils.py:329
↓ 4 callers
Method
to_diff_dict
Removes all attributes from config which correspond to the default config attributes for better readability and serializes to a Pytho
src/transformers/src/transformers/configuration_utils.py:812
↓ 4 callers
Method
to_model_card
(self)
src/transformers/src/transformers/modelcard.py:471
↓ 4 callers
Method
to_raw
(self)
src/transformers/src/transformers/tools/agent_types.py:58
↓ 4 callers
Method
to_string
Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized version of the image.
src/transformers/src/transformers/tools/agent_types.py:126
↓ 4 callers
Method
tokenize
Converts a string in a sequence of tokens, using the tokenizer. Split in words for word-based vocabulary or sub-words for sub-word-b
src/transformers/src/transformers/tokenization_utils.py:541
↓ 4 callers
Function
torch_save_to_buffer
(obj)
src/bitsandbytes/tests/helpers.py:16
↓ 4 callers
Function
trim_batch
Remove columns that are populated exclusively by pad_token_id
src/transformers/examples/legacy/seq2seq/utils.py:112
↓ 4 callers
Function
trim_batch
Remove columns that are populated exclusively by pad_token_id
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:95
↓ 4 callers
Function
truncate_or_pad
Adapt the source and target sequences' lengths to the block size. If the sequence is shorter we append padding token to the right of the sequence.
src/transformers/examples/research_projects/bertabs/utils_summarization.py:110
↓ 4 callers
Function
use_task_specific_params
Update config with summarization specific params.
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:417
↓ 4 callers
Function
write_msg
Write out the message in Line delimited JSON.
src/transformers/src/transformers/commands/lfs.py:98
← previous
next →
701–800 of 11,352, ranked by callers