MCPcopy Create free account

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

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

↓ 2 callersMethod_activate_neftune
r""" Activates the neftune as presented in this code: https://github.com/neelsjain/NEFTune and paper: https://arxiv.org/abs/2310.05914
src/transformers/src/transformers/trainer.py:615
↓ 2 callersMethod_add_tokens
(self, new_tokens: List[Union[str, AddedToken]], special_tokens=False)
src/transformers/src/transformers/tokenization_utils_fast.py:342
↓ 2 callersMethod_beam_sample_generate
( self, model, input_ids, attention_mask, max_length, beam_sco
src/transformers/tests/generation/test_utils.py:444
↓ 2 callersMethod_call_one
( self, text: Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]],
src/transformers/src/transformers/tokenization_utils_base.py:2817
↓ 2 callersFunction_center_text
Utility that will add spaces on the left and right of a text to make it centered for a given width. Args: text (`str`): The text to
src/transformers/utils/check_table.py:118
↓ 2 callersMethod_chat_generate
(self, prompt, stop)
src/transformers/src/transformers/tools/agents.py:442
↓ 2 callersMethod_chat_generate
(self, prompt, stop)
src/transformers/src/transformers/tools/agents.py:568
↓ 2 callersMethod_check_and_enable_flash_attn_2
If you don't know about Flash Attention, check out the official repository of flash attention: https://github.com/Dao-AILab/flash-att
src/transformers/src/transformers/modeling_utils.py:1259
↓ 2 callersMethod_check_attentions_for_generate
( self, batch_size, attentions, min_length, max_length, config, use_cache=False, num_beam_groups=1
src/transformers/tests/generation/test_utils.py:1996
↓ 2 callersMethod_check_hidden_states_for_generate
( self, batch_size, hidden_states, min_length, max_length, config, use_cache=False, num_beam_groups=1
src/transformers/tests/generation/test_utils.py:2028
↓ 2 callersMethod_check_match_tokens
(self, generated_ids, bad_words_ids)
src/transformers/tests/test_modeling_tf_common.py:1822
↓ 2 callersMethod_check_padding
(self, numpify=False)
src/transformers/tests/test_sequence_feature_extraction_common.py:98
↓ 2 callersMethod_check_sequence_inside_sequence
(self, tensor_1, tensor_2)
src/transformers/tests/generation/test_beam_search.py:520
↓ 2 callersMethod_check_sequence_inside_sequence
(self, tensor_1, tensor_2)
src/transformers/tests/generation/test_utils.py:2079
↓ 2 callersMethod_check_truncation
(self, numpify=False)
src/transformers/tests/test_sequence_feature_extraction_common.py:220
↓ 2 callersFunction_clip_box
(tensor, box_size: Tuple[int, int])
src/transformers/examples/research_projects/visual_bert/modeling_frcnn.py:142
↓ 2 callersFunction_clip_box
(tensor, box_size: Tuple[int, int])
src/transformers/examples/research_projects/lxmert/modeling_frcnn.py:142
↓ 2 callersFunction_compare_versions
(op, got_ver, want_ver, requirement, pkg, hint)
src/transformers/src/transformers/utils/versions.py:37
↓ 2 callersMethod_completion_generate
(self, prompts, stop)
src/transformers/src/transformers/tools/agents.py:451
↓ 2 callersMethod_completion_generate
(self, prompts, stop)
src/transformers/src/transformers/tools/agents.py:577
↓ 2 callersMethod_compute_loss
(self, model, inputs, labels)
src/transformers/examples/legacy/seq2seq/seq2seq_trainer.py:153
↓ 2 callersMethod_compute_nb_instances
(batch)
src/transformers/src/transformers/trainer_tf.py:713
↓ 2 callersFunction_compute_softmax
Compute softmax probability over raw logits.
src/transformers/src/transformers/data/metrics/squad_metrics.py:361
↓ 2 callersMethod_contrastive_generate
( self, model, input_ids, attention_mask, max_length, output_s
src/transformers/tests/generation/test_utils.py:633
↓ 2 callersMethod_convert_token_to_id
(self, token)
src/transformers/src/transformers/tokenization_utils.py:660
↓ 2 callersMethod_convert_token_to_id_with_added_voc
(self, token: str)
src/transformers/src/transformers/tokenization_utils_fast.py:333
↓ 2 callersMethod_copy_lm_head_original_to_resized
( self, new_lm_head, old_lm_head, num_tokens_to_copy, transposed, has_new_lm_head_bias )
src/transformers/src/transformers/modeling_utils.py:1805
↓ 2 callersMethod_create_and_check_torch_fx_tracing
(self, config, inputs_dict, output_loss=False)
src/transformers/tests/test_modeling_common.py:880
↓ 2 callersMethod_create_examples
(self, input_data, set_type)
src/transformers/src/transformers/data/processors/squad.py:650
↓ 2 callersMethod_create_examples
Creates examples for the training and dev sets.
src/transformers/examples/research_projects/adversarial/utils_hans.py:267
↓ 2 callersFunction_create_traced_decoder
(decoder, input_ids, encoder_state, attention_mask, past=None)
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:79
↓ 2 callersFunction_crop_past_key_values
Crops the past key values up to a certain maximum length.
src/transformers/src/transformers/generation/utils.py:4772
↓ 2 callersMethod_decay_weights_op
(self, var, learning_rate, apply_state)
src/transformers/src/transformers/optimization_tf.py:241
↓ 2 callersMethod_decoder_forward
(self, input_ids, encoder_output, attention_mask, past: List[torch.Tensor])
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:242
↓ 2 callersMethod_dict_from_json_file
(cls, json_file: Union[str, os.PathLike])
src/transformers/src/transformers/configuration_utils.py:801
↓ 2 callersFunction_dump_articles
(path: Path, articles: list)
src/transformers/examples/legacy/seq2seq/old_test_datasets.py:41
↓ 2 callersFunction_dump_articles
(path: Path, articles: list)
src/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py:82
↓ 2 callersFunction_dump_articles
(path: Path, articles: list)
src/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples.py:95
↓ 2 callersMethod_encoder_forward
(self, input_ids, attention_mask)
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:229
↓ 2 callersMethod_ensure_exactly_one_mask_token
(self, input_ids: GenericTensor)
src/transformers/src/transformers/pipelines/fill_mask.py:96
↓ 2 callersMethod_ensure_tsv_opened
(self)
src/utils/tsv_file.py:99
↓ 2 callersMethod_eval_end
(self, outputs)
src/transformers/examples/legacy/pytorch-lightning/run_glue.py:112
↓ 2 callersMethod_eval_end
Evaluation called for both Val and Test
src/transformers/examples/legacy/pytorch-lightning/run_ner.py:118
↓ 2 callersFunction_expand_for_data_format
Convert values to be in the format expected by np.pad based on the data format.
src/transformers/src/transformers/image_transforms.py:707
↓ 2 callersMethod_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
src/transformers/src/transformers/modeling_attn_mask_utils.py:174
↓ 2 callersMethod_extract_past_from_model_output
(self, outputs: ModelOutput, standardize_cache_format: bool = False)
src/transformers/src/transformers/generation/utils.py:833
↓ 2 callersFunction_find_text_in_file
Find the text in a file between two prompts. Args: filename (`str`): The name of the file to look into. start_prompt (`str`)
src/transformers/utils/check_copies.py:549
↓ 2 callersMethod_finish_current_push
(self)
src/transformers/src/transformers/trainer.py:3565
↓ 2 callersMethod_force_token_id_to_be_generated
force one of token_ids to be generated by setting prob of all other tokens to 0 (logprob=-float("inf"))
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:617
↓ 2 callersMethod_forward
_forward will receive the prepared dictionary from `preprocess` and run it on the model. This method might involve the GPU or the CPU
src/transformers/src/transformers/pipelines/base.py:1013
↓ 2 callersFunction_freeze_params
(module)
src/transformers/examples/pytorch/contrastive-image-text/run_clip.py:386
↓ 2 callersMethod_from_config
All context managers that the model should be initialized under go here.
src/transformers/src/transformers/modeling_tf_utils.py:1166
↓ 2 callersMethod_generate_dummy_images
( self, batch_size: int = 2, num_channels: int = 3, image_height: int = 40, image_width: int = 40
src/transformers/src/transformers/onnx/config.py:258
↓ 2 callersFunction_generate_supported_model_class_names
( model_name: Type[PretrainedConfig], supported_tasks: Optional[Union[str, List[str]]] = None, )
src/transformers/src/transformers/utils/fx.py:73
↓ 2 callersMethod_generative_step
(self, batch: dict)
src/transformers/examples/research_projects/seq2seq-distillation/finetune.py:212
↓ 2 callersMethod_generative_step
(self, batch: dict)
src/transformers/examples/research_projects/rag-end2end-retriever/finetune_rag.py:421
↓ 2 callersMethod_generative_step
(self, batch: dict)
src/transformers/examples/research_projects/rag/finetune_rag.py:308
↓ 2 callersFunction_get_best_indexes
Get the n-best logits from a list.
src/transformers/src/transformers/data/metrics/squad_metrics.py:349
↓ 2 callersMethod_get_bounding_box
Turns list [xmin, xmax, ymin, ymax] into dict { "xmin": xmin, ... } Args: box (`torch.Tensor`): Tensor containing the co
src/transformers/src/transformers/pipelines/object_detection.py:168
↓ 2 callersMethod_get_clip_similarity
(self, prompts, image, weights=None)
src/transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py:141
↓ 2 callersMethod_get_config_dict
( cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs )
src/transformers/src/transformers/configuration_utils.py:637
↓ 2 callersMethod_get_decoder_start_token_id
(self, decoder_start_token_id: int = None, bos_token_id: int = None)
src/transformers/src/transformers/generation/utils.py:790
↓ 2 callersMethod_get_eval_sampler
(self, eval_dataset: Dataset)
src/transformers/src/transformers/trainer.py:805
↓ 2 callersFunction_get_library_name
()
src/transformers/src/transformers/utils/logging.py:74
↓ 2 callersMethod_get_logits_warper
This class returns a [`TFLogitsProcessorList`] list object that contains all relevant [`TFLogitsWarper`] instances used for multinomi
src/transformers/src/transformers/generation/tf_utils.py:1421
↓ 2 callersMethod_get_lr
Retrieves the learning rate with the given state.
src/transformers/src/transformers/optimization_tf.py:254
↓ 2 callersMethod_get_lr
(param_group, param_state)
src/transformers/src/transformers/optimization.py:622
↓ 2 callersFunction_get_mapping_values
(mapping)
src/transformers/src/transformers/modelcard.py:350
↓ 2 callersMethod_get_module
(self, module_name: str)
src/transformers/src/transformers/utils/import_utils.py:1351
↓ 2 callersFunction_get_ngrams
Assume ngram_size=2 and prev_input_ids=tensor([[40, 2883, 2712, 4346]]). The output of generated ngrams look like this {(40,): [2883], (2883,
src/transformers/src/transformers/generation/logits_process.py:651
↓ 2 callersMethod_get_output_dir
(self, trial)
src/transformers/src/transformers/trainer.py:1992
↓ 2 callersMethod_get_resized_lm_head_decoder
Build a resized decoder from the old ones. Increasing the size will add newly initialized vectors at the end. Reducing the size will
src/transformers/src/transformers/modeling_tf_utils.py:2195
↓ 2 callersMethod_get_step_inputs
(batch, nb_instances)
src/transformers/src/transformers/trainer_tf.py:723
↓ 2 callersMethod_init_summary_writer
(self, args, log_dir=None)
src/transformers/src/transformers/integrations/integration_utils.py:613
↓ 2 callersFunction_insert_value
(metadata, name, value)
src/transformers/src/transformers/modelcard.py:334
↓ 2 callersFunction_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
src/transformers/examples/legacy/run_chinese_ref.py:11
↓ 2 callersFunction_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
src/transformers/examples/research_projects/mlm_wwm/run_chinese_ref.py:10
↓ 2 callersFunction_is_control
Checks whether `char` is a control character.
src/transformers/src/transformers/tokenization_utils.py:283
↓ 2 callersFunction_is_punctuation
Checks whether `char` is a punctuation character.
src/transformers/src/transformers/tokenization_utils.py:295
↓ 2 callersFunction_is_string
(x)
src/transformers/examples/research_projects/tapex/wikisql_utils.py:145
↓ 2 callersFunction_is_whitespace
Checks whether `char` is a whitespace character.
src/transformers/src/transformers/tokenization_utils.py:271
↓ 2 callersMethod_load_from_checkpoint
(self, resume_from_checkpoint, model=None)
src/transformers/src/transformers/trainer.py:2012
↓ 2 callersFunction_load_state_dict_into_meta_model
This is somewhat similar to `_load_state_dict_into_model`, but deals with a model that has some or all of its params on a `meta` device. It r
src/transformers/src/transformers/modeling_utils.py:631
↓ 2 callersFunction_load_state_dict_into_model
(model_to_load, state_dict, start_prefix)
src/transformers/src/transformers/modeling_utils.py:521
↓ 2 callersMethod_make_causal_mask
Make causal mask used for bi-directional self-attention.
src/transformers/src/transformers/modeling_attn_mask_utils.py:144
↓ 2 callersMethod_make_layer
(self, block, inplanes, planes, blocks, stride=1)
src/modeling/hrnet/hrnet_cls_net_gridfeat.py:398
↓ 2 callersMethod_make_layer
(self, block, inplanes, planes, blocks, stride=1)
src/modeling/hrnet/hrnet_cls_net.py:398
↓ 2 callersMethod_maybe_initialize_input_ids_for_generation
Initializes input ids for generation, if necessary.
src/transformers/src/transformers/generation/utils.py:664
↓ 2 callersMethod_maybe_initialize_input_ids_for_generation
Initializes input ids for generation, if necessary.
src/transformers/src/transformers/generation/tf_utils.py:1239
↓ 2 callersMethod_maybe_log_save_evaluate
(self, tr_loss, model, trial, epoch, ignore_keys_for_eval)
src/transformers/src/transformers/trainer.py:2219
↓ 2 callersMethod_measure_memory
(self, func: Callable[[], None])
src/transformers/src/transformers/benchmark/benchmark.py:226
↓ 2 callersMethod_measure_memory
(self, func: Callable[[], None])
src/transformers/src/transformers/benchmark/benchmark_tf.py:236
↓ 2 callersMethod_measure_speed
(self, func)
src/transformers/src/transformers/benchmark/benchmark.py:198
↓ 2 callersMethod_measure_speed
(self, func)
src/transformers/src/transformers/benchmark/benchmark_tf.py:217
↓ 2 callersMethod_merge_criteria_processor_list
( self, default_list: Union[LogitsProcessorList, StoppingCriteriaList], custom_list: U
src/transformers/src/transformers/generation/utils.py:1126
↓ 2 callersFunction_normalize_for_match
(x)
src/transformers/examples/research_projects/tapex/wikisql_utils.py:125
↓ 2 callersMethod_open
Open the current base file with the (original) mode and encoding. Return the resulting stream.
src/utils/logger.py:58
↓ 2 callersMethod_pad
Pad encoded inputs (on left/right and up to predefined length or max length in the batch) Args: encoded_inputs:
src/transformers/src/transformers/tokenization_utils_base.py:3596
↓ 2 callersMethod_pad_tensors_to_max_len
(self, tensor, max_length)
src/transformers/examples/legacy/seq2seq/seq2seq_trainer.py:236
↓ 2 callersMethod_parse_and_tokenize
(self, *args, truncation)
src/transformers/src/transformers/pipelines/text2text_generation.py:117
← previousnext →1,101–1,200 of 11,352, ranked by callers