MCPcopy Create free account

hub / github.com/XiangLi1999/PrefixTuning / functions

Functions3,725 in github.com/XiangLi1999/PrefixTuning

↓ 1 callersFunctionset_layer_weights_in_torch_lsh
(weights, torch_layer, hidden_size)
transformers/src/transformers/convert_reformer_trax_checkpoint_to_pytorch.py:40
↓ 1 callersFunctionset_model_weights_in_torch
(weights, torch_model, hidden_size)
transformers/src/transformers/convert_reformer_trax_checkpoint_to_pytorch.py:138
↓ 1 callersFunctionset_scores_to_inf_for_banned_tokens
Modifies the scores in place by setting the banned token positions to `-inf`. Banned token is expected to be a list of list of banned tokens to ba
transformers/src/transformers/generation_utils.py:972
↓ 1 callersMethodset_tgt_lang_special_tokens
Reset the special tokens to the target language setting. Prefix [tgt_lang_code], suffix =[eos].
transformers/src/transformers/tokenization_mbart.py:212
↓ 1 callersMethodset_truncation_and_padding
Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers library) and restore the tok
transformers/src/transformers/tokenization_utils_fast.py:275
↓ 1 callersMethodsetup_comet
Setup the optional Comet.ml integration. Environment: COMET_MODE: (Optional): str - "OFFLINE", "ONLINE",
transformers/src/transformers/trainer_prefix.py:669
↓ 1 callersMethodsetup_comet
Setup the optional Comet.ml integration. Environment: COMET_MODE: (Optional): str - "OFFLINE", "ONLINE",
transformers/src/transformers/trainer_tf.py:256
↓ 1 callersMethodsetup_comet
Setup the optional Comet.ml integration. Environment: COMET_MODE: (Optional): str - "OFFLINE", "ONLINE",
transformers/src/transformers/trainer.py:521
↓ 1 callersMethodsetup_comet
Setup the optional Comet.ml integration. Environment: COMET_MODE: (Optional): str - "OFFLINE", "ONLINE",
gpt2/trainer_prefix.py:559
↓ 1 callersMethodsetup_wandb
Setup the optional Weights & Biases (`wandb`) integration. One can subclass and override this method to customize the setup if neede
transformers/src/transformers/trainer_prefix.py:628
↓ 1 callersMethodsetup_wandb
Setup the optional Weights & Biases (`wandb`) integration. One can subclass and override this method to customize the setup if neede
transformers/src/transformers/trainer_tf.py:232
↓ 1 callersMethodsetup_wandb
Setup the optional Weights & Biases (`wandb`) integration. One can subclass and override this method to customize the setup if neede
transformers/src/transformers/trainer.py:480
↓ 1 callersMethodsetup_wandb
Setup the optional Weights & Biases (`wandb`) integration. One can subclass and override this method to customize the setup if neede
gpt2/trainer_prefix.py:518
↓ 1 callersFunctionshift_tokens_right
Shift input ids one token to the right, and wrap the last non pad token (usually <eos>).
transformers/src/transformers/modeling_fsmt.py:344
↓ 1 callersFunctionsix_ensure_text
(s, encoding="utf-8", errors="strict")
transformers/src/transformers/tokenization_flaubert.py:68
↓ 1 callersFunctionsrc_tgt_pair
(src_path, tgt_path)
data/dart/temp.py:71
↓ 1 callersMethodstride_pool_pos
Pool `pos_id` while keeping the cls token separate (if `config.separate_cls=True`).
transformers/src/transformers/modeling_funnel.py:291
↓ 1 callersMethodstride_pool_pos
Pool `pos_id` while keeping the cls token separate (if `self.separate_cls=True`).
transformers/src/transformers/modeling_tf_funnel.py:279
↓ 1 callersMethodtabulate
Inspired by: stackoverflow.com/a/8356620/593036 stackoverflow.com/questions/9535954/printing-lists-as-tabular-data
transformers/src/transformers/commands/user.py:127
↓ 1 callersMethodtest_dataloader
(self)
seq2seq/finetune.py:652
↓ 1 callersMethodtest_epoch_end
(self, outputs)
seq2seq/finetune.py:594
↓ 1 callersMethodtest_step
(self, batch, batch_idx)
seq2seq/finetune.py:591
↓ 1 callersFunctiontext_standardize
fixes some issues the spacy tokenizer had on books corpus also does some whitespace standardization
transformers/src/transformers/tokenization_openai.py:60
↓ 1 callersMethodtfds_map
Some tensorflow_datasets datasets are not formatted the same way the GLUE datasets are. This method converts examples to the correct format.
transformers/src/transformers/data/processors/utils.py:110
↓ 1 callersMethodtie_weights
Run this to be sure output and input (adaptive) softmax weights are tied
transformers/src/transformers/modeling_transfo_xl.py:981
↓ 1 callersMethodtie_weights
(self)
transformers/src/transformers/modeling_encoder_decoder.py:164
↓ 1 callersMethodto_diff_dict
Removes all attributes from config which correspond to the default config attributes for better readability and serializes to a Pytho
transformers/src/transformers/configuration_utils.py:451
↓ 1 callersMethodto_json_file
Save this instance to a json file.
transformers/src/transformers/modelcard.py:212
↓ 1 callersMethodto_json_file
Save this instance to a JSON file. Args: json_file_path (:obj:`str`): Path to the JSON file in which thi
transformers/src/transformers/configuration_utils.py:504
↓ 1 callersFunctionto_tf_var_name
(name: str)
transformers/src/transformers/convert_bert_pytorch_checkpoint_to_original_tf.py:64
↓ 1 callersMethodtoken_type_ids_to_mat
Convert `token_type_ids` to `token_type_mat`.
transformers/src/transformers/modeling_funnel.py:205
↓ 1 callersMethodtoken_type_ids_to_mat
Convert `token_type_ids` to `token_type_mat`.
transformers/src/transformers/modeling_tf_funnel.py:191
↓ 1 callersFunctiontokenize_numbers
Splits large comma-separated numbers and floating point values. This is done by replacing commas with ' @,@ ' and dots with ' @.@ '. Args
transformers/src/transformers/tokenization_transfo_xl.py:79
↓ 1 callersMethodtrain_memory
(self, *args, **kwargs)
transformers/src/transformers/benchmark/benchmark_utils.py:645
↓ 1 callersMethodtrain_speed
(self, *args, **kwargs)
transformers/src/transformers/benchmark/benchmark_utils.py:639
↓ 1 callersMethodtraining_step
Perform a training step on a batch of inputs. Subclass and override to inject custom behavior. Args: model (:ob
transformers/src/transformers/trainer_prefix.py:2060
↓ 1 callersMethodtraining_step
Perform a training step on a batch of inputs. Subclass and override to inject custom behavior. Args: model (:ob
transformers/src/transformers/trainer.py:1093
↓ 1 callersMethodtraining_step
Perform a training step on a batch of inputs. Subclass and override to inject custom behavior. Args: model (:ob
gpt2/trainer_prefix.py:1133
↓ 1 callersMethodtraining_step_amortized_pplm
Perform a training step on a batch of inputs. Subclass and override to inject custom behavior. Args: model (:ob
transformers/src/transformers/trainer_prefix.py:3379
↓ 1 callersFunctiontry_infer_format_from_ext
(path: str)
transformers/src/transformers/commands/run.py:12
↓ 1 callersFunctionunzip
(zip_path: str, dest_dir: str)
transformers/src/transformers/convert_marian_to_pytorch.py:728
↓ 1 callersFunctionupsample
Upsample tensor `x` to match `target_len` by repeating the tokens `stride` time on the sequence length dimension.
transformers/src/transformers/modeling_funnel.py:666
↓ 1 callersFunctionupsample
Upsample tensor `x` to match `target_len` by repeating the tokens `stride` time on the sequence length dimension.
transformers/src/transformers/modeling_tf_funnel.py:677
↓ 1 callersFunctionurl_to_filename
Convert `url` into a hashed filename in a repeatable way. If `etag` is specified, append its hash to the url's, delimited by a period.
transformers/src/transformers/file_utils.py:623
↓ 1 callersMethodvalidation_epoch_end
(self, outputs, prefix="val")
seq2seq/finetune.py:212
↓ 1 callersMethodvalidation_epoch_end
(self, outputs, prefix="val")
seq2seq/finetune.py:540
↓ 1 callersMethodwalk_dir
Recursively list all files in a folder.
transformers/src/transformers/commands/user.py:176
↓ 1 callersFunctionwhite_space_fix
(text)
transformers/src/transformers/data/metrics/squad_metrics.py:32
Method__call__
(self, step)
transformers/src/transformers/optimization_tf.py:57
Method__call__
Accumulates :obj:`gradients` on the current replica.
transformers/src/transformers/optimization_tf.py:315
Method__call__
( self, questions, titles: Optional[str] = None, texts: Optional[str] = None,
transformers/src/transformers/tokenization_dpr.py:215
Method__call__
(self, *args, **kwargs)
transformers/src/transformers/tokenization_rag.py:58
Method__call__
(self, *args, **kwargs)
transformers/src/transformers/pipelines.py:136
Method__call__
(self, *args, **kwargs)
transformers/src/transformers/pipelines.py:181
Method__call__
Extract the features of the input(s). Args: args (:obj:`str` or :obj:`List[str]`): One or several texts (or one list of
transformers/src/transformers/pipelines.py:727
Method__call__
Complete the prompt(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`): One or several prom
transformers/src/transformers/pipelines.py:811
Method__call__
Classify the text(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`): One or several texts
transformers/src/transformers/pipelines.py:962
Method__call__
(self, sequences, labels, hypothesis_template)
transformers/src/transformers/pipelines.py:1003
Method__call__
Classify the sequence(s) given as inputs. Args: sequences (:obj:`str` or :obj:`List[str]`): The sequence
transformers/src/transformers/pipelines.py:1062
Method__call__
Fill the masked token in the text(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`): One o
transformers/src/transformers/pipelines.py:1192
Method__call__
Classify each token of the text(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`): One or
transformers/src/transformers/pipelines.py:1354
Method__call__
(self, *args, **kwargs)
transformers/src/transformers/pipelines.py:1504
Method__call__
Answer the question(s) given as inputs by using the context(s). Args: args (:class:`~transformers.SquadExample` or a lis
transformers/src/transformers/pipelines.py:1622
Method__call__
r""" Summarize the text(s) given as inputs. Args: documents (`str` or :obj:`List[str]`): One or several a
transformers/src/transformers/pipelines.py:1878
Method__call__
r""" Translate the text(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`): Texts to be tran
transformers/src/transformers/pipelines.py:2004
Method__call__
r""" Generate the output text(s) using text(s) given as inputs. Args: args (:obj:`str` or :obj:`List[str]`):
transformers/src/transformers/pipelines.py:2117
Method__call__
r""" Generate responses for the conversation(s) given as inputs. Args: conversations (a :class:`~transformers.Conversatio
transformers/src/transformers/pipelines.py:2345
Method__call__
(self, inputs, mode="embedding")
transformers/src/transformers/modeling_tf_t5.py:525
Method__call__
Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of sequences. Args:
transformers/src/transformers/tokenization_utils_base.py:1860
Method__call__
Retrieves documents for specified :obj:`question_hidden_states`. Args: question_input_ids: (:obj:`List[List[int]]`) batc
transformers/src/transformers/retrieval_rag.py:428
Method__call__
(self, features: List[Dict[str, Union[List[int], torch.Tensor]]])
transformers/src/transformers/data/data_collator.py:102
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:131
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:211
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:264
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:351
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:439
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:524
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:657
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:736
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:808
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:890
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:974
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:1060
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:1108
Method__call__
(self, examples: List[Dict[str, torch.Tensor]])
transformers/src/transformers/data/data_collator.py:1186
Method__call__
( self, examples: List[Union[List[int], torch.Tensor, Dict[str, torch.Tensor]]] )
transformers/src/transformers/data/data_collator.py:1259
Method__call__
The input should contain negative examples, :class:`~transformers.DataCollatorForNextSentencePrediction` will not generate any negative examp
transformers/src/transformers/data/data_collator.py:1394
Method__delitem__
(self, *args, **kwargs)
transformers/src/transformers/file_utils.py:1025
Method__enter__
(self)
transformers/src/transformers/testing_utils.py:263
Method__enter__
(self)
transformers/src/transformers/testing_utils.py:340
Method__eq__
(self, other)
transformers/src/transformers/modelcard.py:197
Method__eq__
(self, other)
transformers/src/transformers/configuration_utils.py:445
Method__exit__
(self, *exc)
transformers/src/transformers/testing_utils.py:274
Method__exit__
(self, *exc)
transformers/src/transformers/testing_utils.py:344
Method__get__
(self, obj, objtype=None)
transformers/src/transformers/file_utils.py:921
Method__getattr__
(self, item: str)
transformers/src/transformers/tokenization_utils_base.py:213
Method__getitem__
(self, k)
transformers/src/transformers/file_utils.py:1037
Method__getitem__
If the key is a string, returns the value of the dict associated to :obj:`key` ('input_ids', 'attention_mask', etc.). If the
transformers/src/transformers/tokenization_utils_base.py:196
Method__getitem__
(self, i)
transformers/src/transformers/data/datasets/glue.py:146
Method__getitem__
(self, i)
transformers/src/transformers/data/datasets/language_modeling.py:95
← previousnext →1,101–1,200 of 3,725, ranked by callers