MCPcopy Create free account

hub / github.com/Aveiro-Lin/GraphiContact / functions

Functions11,352 in github.com/Aveiro-Lin/GraphiContact

↓ 7 callersMethod__init__
Args: num_embeddings (`int`): The number of unique embeddings (vocabulary size). embedding_dim (`int`
src/bitsandbytes/bitsandbytes/nn/modules.py:137
↓ 7 callersMethod_check_generated_ids
(self, output_ids)
src/transformers/tests/test_modeling_tf_common.py:1817
↓ 7 callersMethod_convert_id_to_token
(self, index: int)
src/transformers/src/transformers/tokenization_utils.py:985
↓ 7 callersMethod_get_encoder_outputs
( model, input_ids, attention_mask, output_attentions=None, output_hidden_states=None, num_interleave=
src/transformers/tests/generation/test_utils.py:241
↓ 7 callersMethod_prepare_encoder_decoder_kwargs_for_generation
( self, inputs_tensor: torch.Tensor, model_kwargs, model_input_name: Optional[str] = None )
src/transformers/src/transformers/generation/utils.py:710
↓ 7 callersMethodadd_adapter
r""" If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT official documentation:
src/transformers/src/transformers/integrations/peft.py:229
↓ 7 callersMethodapply_chat_template
Converts a Conversation object or a list of dictionaries with `"role"` and `"content"` keys to a list of token ids. This method is in
src/transformers/src/transformers/tokenization_utils_base.py:1677
↓ 7 callersFunctionatleast_1d
(tensor_or_array: Union[torch.Tensor, np.ndarray])
src/transformers/src/transformers/trainer_pt_utils.py:65
↓ 7 callersMethodcenter_crop
Crops `image` to the given size using a center crop. Note that if the image is too small to be cropped to the size given, it will be
src/transformers/src/transformers/image_utils.py:552
↓ 7 callersMethodcheck_output
(self, want, got, optionflags)
src/transformers/conftest.py:78
↓ 7 callersFunctioncheck_peft_version
r""" Checks if the version of PEFT is compatible. Args: version (`str`): The version of PEFT to check against.
src/transformers/src/transformers/utils/peft_utils.py:106
↓ 7 callersFunctionchunk_bytes_iter
Reads raw bytes from an iterator and does chunks of length `chunk_len`. Optionally adds `stride` to each chunks to get overlaps. `stream` is
src/transformers/src/transformers/pipelines/audio_utils.py:180
↓ 7 callersFunctionclean_frameworks_in_init
Removes all the import lines that don't belong to a given list of frameworks or concern tokenizers/feature extractors/image processors/proces
src/transformers/src/transformers/commands/add_new_model_like.py:852
↓ 7 callersMethodcreate_token_type_ids_from_sequences
Create the token type IDs corresponding to the sequences passed. [What are token type IDs?](../glossary#token-type-ids) Shou
src/transformers/src/transformers/tokenization_utils_base.py:3301
↓ 7 callersMethoddevice
The device used by this process.
src/transformers/src/transformers/training_args.py:1926
↓ 7 callersFunctionextract_commit_hash
Extracts the commit hash from a resolved filename toward a cache file.
src/transformers/src/transformers/utils/hub.py:246
↓ 7 callersFunctionfind_backend
Find one (or multiple) backend in a code line of the init. Args: line (`str`): A code line in an init file. Returns: Op
src/transformers/utils/check_dummies.py:75
↓ 7 callersMethodfrom_json_file
Constructs a `ModelCard` from a json file of parameters.
src/transformers/src/transformers/modelcard.py:227
↓ 7 callersMethodgenerate_dummy_inputs
Generate inputs to provide to the ONNX exporter for the specific framework Args: preprocessor: ([`PreTrainedTokenizerBas
src/transformers/src/transformers/onnx/config.py:280
↓ 7 callersMethodget0
src/bitsandbytes/include/SIMD.h:148
↓ 7 callersMethodget1
src/bitsandbytes/include/SIMD.h:175
↓ 7 callersMethodget_config
(self)
src/transformers/src/transformers/optimization_tf.py:78
↓ 7 callersMethodget_dev_examples
See base class.
src/transformers/examples/research_projects/adversarial/utils_hans.py:255
↓ 7 callersFunctionget_diff
Get the diff between a base commit and one or several commits. Args: repo (`git.Repo`): A git repository (for instance t
src/transformers/utils/tests_fetcher.py:375
↓ 7 callersMethodget_eval_dataloader
Returns the evaluation [`~torch.utils.data.DataLoader`]. Subclass and override this method if you want to inject some custom behavio
src/transformers/src/transformers/trainer.py:827
↓ 7 callersMethodget_h36m_joints
This method is used to get the joint locations from the SMPL mesh Input: vertices: size = (B, 6890, 3) Output:
src/modeling/_smpl.py:130
↓ 7 callersMethodget_inputs
Returns the right inputs for the model, based on its signature.
src/transformers/src/transformers/commands/pt_to_tf.py:199
↓ 7 callersFunctionget_keys_to_not_convert
r""" An utility function to get the key of the module to keep in full precision if any For example for CausalLM modules we may want to keep th
src/transformers/src/transformers/integrations/bitsandbytes.py:243
↓ 7 callersMethodget_train_examples
See base class.
src/transformers/examples/research_projects/adversarial/utils_hans.py:251
↓ 7 callersFunctioninfer_tests_to_run
The main function called by the test fetcher. Determines the tests to run from the diff. Args: output_file (`str`): The
src/transformers/utils/tests_fetcher.py:1024
↓ 7 callersFunctionint8_matmul_mixed_dequantize
(a, b, state_x, state_w, bias)
src/bitsandbytes/bitsandbytes/triton/int8_matmul_mixed_dequantize.py:7
↓ 7 callersFunctionis_empty_line
Determines whether a line is empty or not.
src/transformers/src/transformers/commands/add_new_model_like.py:121
↓ 7 callersFunctionis_jax_tensor
Tests if `x` is a Jax tensor or not. Safe to call even if jax is not installed.
src/transformers/src/transformers/utils/generic.py:225
↓ 7 callersFunctionis_numpy_array
Tests if `x` is a numpy array or not.
src/transformers/src/transformers/utils/generic.py:138
↓ 7 callersFunctionis_py3nvml_available
()
src/transformers/src/transformers/utils/import_utils.py:534
↓ 7 callersFunctionis_sagemaker_dp_enabled
()
src/transformers/src/transformers/utils/import_utils.py:757
↓ 7 callersFunctionis_triton_available
()
src/bitsandbytes/bitsandbytes/triton/triton_utils.py:4
↓ 7 callersFunctionlmap
list(map(f, x))
src/transformers/examples/legacy/seq2seq/utils.py:70
↓ 7 callersMethodload_adapter
Load adapter weights from file or remote Hub folder. If you are not familiar with adapters and PEFT methods, we invite you to read mo
src/transformers/src/transformers/integrations/peft.py:69
↓ 7 callersFunctionload_flax_weights_in_pytorch_model
Load flax checkpoints in a PyTorch model
src/transformers/src/transformers/modeling_flax_pytorch_utils.py:347
↓ 7 callersFunctionmake_list_of_images
Ensure that the input is a list of images. If the input is a single image, it is converted to a list of length 1. If the input is a batch of
src/transformers/src/transformers/image_utils.py:112
↓ 7 callersMethodprepare_constrained_beam_scorer
(self, **kwargs)
src/transformers/tests/generation/test_beam_search.py:289
↓ 7 callersMethodprepare_seq2seq_batch
Prepare model inputs for translation. For best performance, translate one sentence at a time. Arguments: src_texts (`Lis
src/transformers/src/transformers/tokenization_utils_base.py:3897
↓ 7 callersFunctionprint_header
(txt: str, width: int = HEADER_WIDTH, filler: str = "+")
src/bitsandbytes/bitsandbytes/diagnostics/utils.py:6
↓ 7 callersMethodred
(cls, s)
src/transformers/src/transformers/commands/user.py:71
↓ 7 callersMethodregister_for_auto_class
Register this class with a given auto class. This should only be used for custom models as the ones in the library are already mapped
src/transformers/src/transformers/modeling_utils.py:4069
↓ 7 callersMethodrun_common_tests
(self)
src/transformers/tests/test_configuration_common.py:150
↓ 7 callersFunctionsave_json
(content, path, indent=4, **json_dump_kwargs)
src/transformers/examples/legacy/seq2seq/utils.py:468
↓ 7 callersFunctionshift_tokens_right
Shift input ids one token to the right.
src/transformers/examples/flax/image-captioning/run_image_captioning_flax.py:74
↓ 7 callersFunctionspeed_metrics
Measure and return speed performance metrics. This function requires a time snapshot `start_time` before the operation to be measured starts
src/transformers/src/transformers/trainer_utils.py:365
↓ 7 callersFunctionsummarizer
(text)
src/transformers/src/transformers/tools/evaluate_agent.py:70
↓ 7 callersMethodtoken_to_chars
Get the character span corresponding to an encoded token in a sequence of the batch. Character spans are returned as a [`~tokenizati
src/transformers/src/transformers/tokenization_utils_base.py:516
↓ 7 callersMethodtoken_to_sequence
Get the index of the sequence represented by the given token. In the general use case, this method returns `0` for a single sequence
src/transformers/src/transformers/tokenization_utils_base.py:386
↓ 7 callersMethodupdate
The main method to update the progress bar to `value`. Args: value (`int`): The value to use. Must be be
src/transformers/src/transformers/utils/notebook.py:118
↓ 7 callersMethodupdate
Reads in a token and returns booleans that indicate the progress made by it. This function will update the state of this object unlik
src/transformers/src/transformers/generation/beam_constraints.py:70
↓ 7 callersMethodword_ids
Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer. Args: batch_index (`
src/transformers/src/transformers/tokenization_utils_base.py:367
↓ 6 callersFunctionBody
(*x, **y)
src/transformers/src/transformers/commands/serving.py:34
↓ 6 callersMethod__init__
Base Adam optimizer. Arguments: params (`torch.tensor`): The input parameters to optimize. l
src/bitsandbytes/bitsandbytes/optim/adam.py:17
↓ 6 callersMethod__init__
(self)
src/transformers/examples/research_projects/bertabs/modeling_bertabs.py:129
↓ 6 callersMethod__init__
(self, config)
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:97
↓ 6 callersMethod_ensure_tensor_on_device
(self, inputs, device)
src/transformers/src/transformers/pipelines/base.py:942
↓ 6 callersMethod_expand_inputs_for_generation
Expands tensors from [batch_size, ...] to [batch_size * expand_size, ...]
src/transformers/src/transformers/generation/utils.py:807
↓ 6 callersMethod_gather_beams
Gathers the beam slices indexed by beam_indices into new beam array.
src/transformers/src/transformers/generation/tf_utils.py:2080
↓ 6 callersFunction_generate_random_int
(low: int = 10, high: int = 20, forbidden_values: Optional[List[int]] = None)
src/transformers/src/transformers/utils/fx.py:709
↓ 6 callersMethod_get_beam_scorer_and_kwargs
(batch_size, max_length, num_return_sequences=1)
src/transformers/tests/generation/test_utils.py:183
↓ 6 callersMethod_prepare_decoder_input_ids_for_generation
Prepares `decoder_input_ids` for generation with encoder-decoder models
src/transformers/src/transformers/generation/utils.py:745
↓ 6 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
src/transformers/tests/utils/test_modeling_tf_core.py:75
↓ 6 callersMethod_read_txt
(self, input_dir)
src/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py:286
↓ 6 callersMethodanalyse_variable
(self, var, ctx)
src/transformers/src/transformers/debug_utils.py:194
↓ 6 callersFunctionassert_all_approx_close
(a, b, rtol=1e-3, atol=1e-3, count=0, throw=True)
src/bitsandbytes/tests/test_functional.py:26
↓ 6 callersMethodbackward
(ctx, gradOutput)
src/transformers/examples/research_projects/movement-pruning/emmental/modules/binarizer.py:107
↓ 6 callersFunctionbytes_iter
(chunk_size, chunks)
src/transformers/tests/pipelines/test_pipelines_automatic_speech_recognition.py:1410
↓ 6 callersMethodcheck_to_causal
(self, mask_converter, q_len, kv_len, bsz=3)
src/transformers/tests/test_modeling_utils.py:1338
↓ 6 callersFunctionclean_code
Remove docstrings, empty line or comments from some code (used to detect if a diff is real or only concern comments or docstings). Args:
src/transformers/utils/tests_fetcher.py:119
↓ 6 callersFunctioncompute_effective_axis_dimension
Args: dimension: fixed_dimension: num_token_to_add: Returns:
src/transformers/src/transformers/onnx/utils.py:38
↓ 6 callersMethodcompute_loss
(self, model, inputs, return_outputs=False)
src/transformers/examples/research_projects/zero-shot-distillation/distill_classifier.py:118
↓ 6 callersMethodcontact_parameters
(self)
src/modeling/bert/e2e_body_network.py:296
↓ 6 callersFunctioncopy_layers
(src_layers: nn.ModuleList, dest_layers: nn.ModuleList, layers_to_copy: List[int])
src/transformers/examples/research_projects/seq2seq-distillation/make_student.py:15
↓ 6 callersMethodcreate_proxy
(self, kind, target, args, kwargs, name=None, type_expr=None, proxy_factory_fn=None)
src/transformers/src/transformers/utils/fx.py:877
↓ 6 callersFunctioncreate_student_by_copying_alternating_layers
Make a student by copying alternating layers from a teacher, save it to save_path. Args: teacher: str or PreTrainedModel if str, this will
src/transformers/examples/research_projects/seq2seq-distillation/make_student.py:79
↓ 6 callersFunctiondet_error_metric
(pred, gt)
src/utils/metrics.py:92
↓ 6 callersFunctiondicts_to_sum
(objects: Union[Dict[str, Dict], List[dict]])
src/transformers/utils/notification_service.py:89
↓ 6 callersMethoddistributed_retriever_check
(self, retriever: RagRetriever, hidden_states: np.array, n_docs: int)
src/transformers/examples/research_projects/rag/test_distributed_retriever.py:258
↓ 6 callersFunctionduplicate_module
Create a new module from an existing one and adapting all function and classes names from old patterns to new ones. Args: module_fil
src/transformers/src/transformers/commands/add_new_model_like.py:497
↓ 6 callersMethodearly_stop
(self, validation_loss)
src/utils/comm.py:182
↓ 6 callersMethodend
Function that is called by `.generate()` to signal the end of generation
src/transformers/src/transformers/generation/streamers.py:33
↓ 6 callersFunctionevaluate_code
(code, inputs=None, state=None, verbose=False, return_interpretor_error=False)
src/transformers/src/transformers/tools/evaluate_agent.py:416
↓ 6 callersFunctionf1_score
(prediction, ground_truth)
src/transformers/examples/research_projects/rag/utils_rag.py:200
↓ 6 callersFunctionfill_result_with_error
Fill `result` with errors for all target model arch if we can't build processor
src/transformers/utils/create_dummy_models.py:778
↓ 6 callersMethodfrom_keras
( cls, model, model_name, keras_history=None, language=None, l
src/transformers/src/transformers/modelcard.py:630
↓ 6 callersMethodget_bart_tokenizer
(self)
src/transformers/examples/research_projects/rag/test_distributed_retriever.py:121
↓ 6 callersFunctionget_channel_dimension_axis
Returns the channel dimension axis of the image. Args: image (`np.ndarray`): The image to get the channel dimension axis
src/transformers/src/transformers/image_utils.py:192
↓ 6 callersMethodget_context
(self, device)
src/bitsandbytes/bitsandbytes/functional.py:151
↓ 6 callersFunctionget_default_description
Builds a default description for a parameter that was not documented. Args: arg (`inspect.Parameter`): The argument in the signature
src/transformers/utils/check_docstrings.py:951
↓ 6 callersFunctionget_default_frameworks
Returns the list of frameworks (PyTorch, TensorFlow, Flax) that are installed in the environment.
src/transformers/src/transformers/commands/add_new_model_like.py:709
↓ 6 callersMethodget_dpr_tokenizer
(self)
src/transformers/examples/research_projects/rag/test_distributed_retriever.py:118
↓ 6 callersMethodget_eval_dataloader
(self, eval_dataset)
src/transformers/tests/trainer/test_trainer.py:240
↓ 6 callersMethodget_expected_events
(self, trainer)
src/transformers/tests/trainer/test_trainer_callback.py:124
↓ 6 callersFunctionget_file_from_repo
Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_repo (`str` or `os.PathLike`):
src/transformers/src/transformers/utils/hub.py:464
↓ 6 callersMethodget_instance
(cls)
src/bitsandbytes/bitsandbytes/optim/optimizer.py:38
← previousnext →401–500 of 11,352, ranked by callers