MCPcopy Create free account

hub / github.com/XiangLi1999/PrefixTuning / functions

Functions3,725 in github.com/XiangLi1999/PrefixTuning

Methodcat_input_and_doc
(doc_title, doc_text, input_string, prefix)
transformers/src/transformers/retrieval_rag.py:347
Methodchar_to_token
Get the index of the token in the encoded output comprising a character in the original string for a sequence of the batch.
transformers/src/transformers/tokenization_utils_base.py:401
Methodchar_to_word
Get the word in the original string corresponding to a character in the original string of a sequence of the batch. Can be c
transformers/src/transformers/tokenization_utils_base.py:478
Functioncheck_if_models_are_dominated
Make a blacklist for models where we have already ported the same language pair, and the ported model has higher BLEU score.
transformers/src/transformers/convert_marian_to_pytorch.py:39
Functionchunks
Yield successive n-sized chunks from lst.
seq2seq/utils.py:462
Methodcls_token
:obj:`str`: Classification token, to extract a summary of an input sequence leveraging self-attention along the full depth of the mod
transformers/src/transformers/tokenization_utils_base.py:833
Methodcls_token_id
:obj:`Optional[int]`: Id of the classification token in the vocabulary, to extract a summary of an input sequence leveraging self-att
transformers/src/transformers/tokenization_utils_base.py:955
Methodcollate_fn
(self, batch)
seq2seq/utils.py:172
Methodcollate_fn
(self, batch)
seq2seq/utils.py:196
Methodcollate_fn
Call prepare_seq2seq_batch.
seq2seq/utils.py:223
Methodcompute_loss
(self, labels, logits)
transformers/src/transformers/modeling_tf_utils.py:135
Methodcompute_loss
(self, labels, logits)
transformers/src/transformers/modeling_tf_utils.py:152
Methodcompute_loss
(self, labels, logits)
transformers/src/transformers/modeling_tf_utils.py:172
Methodcompute_loss
(self, labels, logits)
transformers/src/transformers/modeling_tf_utils.py:194
Methodcompute_loss_and_backprob_encoder
()
transformers/src/transformers/benchmark/benchmark.py:179
Methodcompute_loss_and_backprob_encoder_decoder
()
transformers/src/transformers/benchmark/benchmark.py:184
Functioncompute_predictions_log_probs
XLNet write prediction logic (more complex than Bert's). Write final predictions to the json file and log-odds of null if needed. Requires ut
transformers/src/transformers/data/metrics/squad_metrics.py:577
Functioncompute_predictions_logits
Write final predictions to the json file and log-odds of null if needed.
transformers/src/transformers/data/metrics/squad_metrics.py:372
Functionconfig
r""" # Using torch.hub ! import torch config = torch.hub.load('huggingface/transformers', 'config', '
transformers/hubconf.py:23
Methodconfig
(self)
transformers/src/transformers/data/test_generation_utils.py:20
Methodconfigure_optimizers
Prepare optimizer and schedule (linear warmup and decay)
seq2seq/lightning_base.py:209
Methodconfigure_optimizers
Prepare optimizer and schedule (linear warmup and decay)
seq2seq/lightning_base.py:510
Functionconvert_all_sentencepiece_models
Requires 300GB
transformers/src/transformers/convert_marian_to_pytorch.py:400
Functionconvert_command_factory
Factory function used to convert a model TF 1.0 checkpoint in a PyTorch checkpoint. :return: ServeCommand
transformers/src/transformers/commands/convert.py:8
Methodconvert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens.
transformers/src/transformers/tokenization_utils_fast.py:232
Methodconvert_tokens
(self, src_tokenizer, tgt_tokenizer)
transformers/src/transformers/trainer_prefix.py:2188
Methodconvert_tokens_to_ids
Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the vocabulary. Args:
transformers/src/transformers/tokenization_utils_fast.py:177
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_bert_generation.py:139
Methodconvert_tokens_to_string
Converts a sequence of tokens (strings for sub-words) in a single string.
transformers/src/transformers/tokenization_xlm_roberta.py:285
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_openai.py:200
Methodconvert_tokens_to_string
(self, tokens)
transformers/src/transformers/tokenization_albert.py:231
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_phobert.py:310
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_reformer.py:162
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_bertweet.py:382
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_gpt2.py:254
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string. Additionally, the split numbers are converted back into it's original form
transformers/src/transformers/tokenization_transfo_xl.py:431
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_ctrl.py:220
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_xlm.py:842
Methodconvert_tokens_to_string
Converts a sequence of tokens (strings for sub-words) in a single string.
transformers/src/transformers/tokenization_xlnet.py:234
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_bert.py:238
Methodconvert_tokens_to_string
Uses target language sentencepiece model
transformers/src/transformers/tokenization_marian.py:117
Methodconvert_tokens_to_string
Converts a sequence of tokens (strings for sub-words) in a single string.
transformers/src/transformers/tokenization_camembert.py:262
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
transformers/src/transformers/tokenization_fsmt.py:355
Functionconvert_whole_dir
(path=Path("marian_ckpt/"))
transformers/src/transformers/convert_marian_to_pytorch.py:435
Methodcount_sents
sents : a list of sentences, each a list of tokenized symbols
transformers/src/transformers/tokenization_transfo_xl.py:242
Methodcreate_custom_forward
(module)
transformers/src/transformers/modeling_bert.py:461
Methodcreate_custom_forward
(module)
transformers/src/transformers/modeling_roberta.py:403
Methodcreate_custom_forward
(module)
transformers/src/transformers/modeling_layoutlm.py:382
Methodcreate_custom_forward
(module)
transformers/src/transformers/modeling_electra.py:457
Methodcreate_custom_forward
(module)
transformers/src/transformers/modeling_longformer.py:891
Methodcreate_from_examples
(cls, texts_or_text_and_labels, labels=None, **kwargs)
transformers/src/transformers/data/processors/utils.py:159
Functioncreate_sinusoidal_embeddings
(n_pos, dim, out)
transformers/src/transformers/modeling_tf_xlm.py:79
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does not make use of token
transformers/src/transformers/tokenization_xlm_roberta.py:233
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not make use of token typ
transformers/src/transformers/tokenization_roberta.py:233
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not make use of token typ
transformers/src/transformers/tokenization_roberta.py:400
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT sequence pair mask has the f
transformers/src/transformers/tokenization_albert.py:292
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. PhoBERT does not make use of token typ
transformers/src/transformers/tokenization_phobert.py:217
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. BERTweet does not make use of token ty
transformers/src/transformers/tokenization_bertweet.py:235
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet sequence pair mask has the fo
transformers/src/transformers/tokenization_xlnet.py:296
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence pair mask has the foll
transformers/src/transformers/tokenization_bert.py:300
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence pair mask has the foll
transformers/src/transformers/tokenization_bert.py:678
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like RoBERTa, does not make
transformers/src/transformers/tokenization_camembert.py:199
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A FAIRSEQ Transformer sequence pair ma
transformers/src/transformers/tokenization_fsmt.py:428
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel Transformer sequence pair mas
transformers/src/transformers/tokenization_funnel.py:109
Methodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel Transformer sequence pair mas
transformers/src/transformers/tokenization_funnel.py:191
Methodcustom_forward
(*inputs)
transformers/src/transformers/modeling_bert.py:462
Methodcustom_forward
(*inputs)
transformers/src/transformers/modeling_roberta.py:404
Methodcustom_forward
(*inputs)
transformers/src/transformers/modeling_layoutlm.py:383
Methodcustom_forward
(*inputs)
transformers/src/transformers/modeling_electra.py:458
Methodcustom_forward
(*inputs)
transformers/src/transformers/modeling_longformer.py:892
Functioncustom_tokenizers
Decorator marking a test for a custom tokenizer. Custom tokenizers require additional dependencies, and are skipped by default. Set the
transformers/src/transformers/testing_utils.py:70
Methoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
transformers/src/transformers/tokenization_utils_fast.py:489
Methoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
transformers/src/transformers/tokenization_utils.py:742
Methoddecode_best_spans
Get the span predictions for the extractive Q&A model. Outputs: `List` of `DPRReaderOutput` sorted by descending `(relevance_score, s
transformers/src/transformers/tokenization_dpr.py:271
Functiondefault_compute_objective
The default objective to maximize/minimize when doing an hyperparameter search. It is the evaluation loss if no metrics are provided to the :
transformers/src/transformers/trainer_utils.py:92
Functiondefault_data_collator
Very simple data collator that: - simply collates batches of dict-like objects - Performs special handling for potential keys named:
transformers/src/transformers/data/data_collator.py:21
Functiondefault_hp_space_optuna
(trial)
transformers/src/transformers/trainer_utils.py:108
Functiondefault_hp_space_ray
(trial)
transformers/src/transformers/trainer_utils.py:120
Functiondefault_logdir
Same default as PyTorch
transformers/src/transformers/training_args.py:24
Methoddevice_idx
(self)
transformers/src/transformers/benchmark/benchmark_args.py:98
Functiondisable_default_handler
Disable the default handler of the HuggingFace Transformers's root logger.
transformers/src/transformers/utils/logging.py:178
Functiondisable_propagation
Disable propagation of the library log outputs. Note that log propagation is disabled by default.
transformers/src/transformers/utils/logging.py:196
Methoddo_multi_processing
(self)
transformers/src/transformers/benchmark/benchmark_args_utils.py:140
Functiondocstring_decorator
(fn)
transformers/src/transformers/configuration_auto.py:188
Functiondocstring_decorator
(fn)
transformers/src/transformers/file_utils.py:194
Functiondownload_command_factory
(args)
transformers/src/transformers/commands/download.py:6
Methoddtype
:obj:`torch.dtype`: The dtype of the module (assuming that all the module parameters have the same dtype).
transformers/src/transformers/modeling_utils.py:162
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_electra.py:1030
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_albert.py:1191
Methoddummy_inputs
(self)
transformers/src/transformers/modeling_bart.py:182
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_mobilebert.py:1356
Methoddummy_inputs
:obj:`Dict[str, torch.Tensor]`: Dummy inputs to do a forward pass in the network.
transformers/src/transformers/modeling_utils.py:405
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_lxmert.py:669
Methoddummy_inputs
(self)
transformers/src/transformers/modeling_tf_lxmert.py:857
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_lxmert.py:1184
Methoddummy_inputs
(self)
transformers/src/transformers/modeling_xlm.py:243
Methoddummy_inputs
Dummy inputs to build the network. Returns: :obj:`Dict[str, tf.Tensor]`: The dummy inputs.
transformers/src/transformers/modeling_tf_utils.py:240
Methoddummy_inputs
(self)
transformers/src/transformers/modeling_tf_longformer.py:1474
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_bert.py:1172
Methoddummy_inputs
Dummy inputs to build the network. Returns: tf.Tensor with dummy inputs
transformers/src/transformers/modeling_tf_distilbert.py:893
← previousnext →2,501–2,600 of 3,725, ranked by callers