Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XiangLi1999/PrefixTuning
/ functions
Functions
3,725 in github.com/XiangLi1999/PrefixTuning
⨍
Functions
3,725
◇
Types & classes
1,052
↳
Endpoints
47
Method
get_prompt_p2_shallow
(self, control_code=None, gpt2=None, bsz=None)
gpt2/train_control.py:223
Method
get_prompt_p3
(self, control_code, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:391
Method
get_prompt_p3
(self, control_code, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:937
Method
get_prompt_p3_infix
(self, src, control_code=None, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:370
Method
get_prompt_p3_infix
(self, src_x, control_code, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:914
Method
get_prompt_p4
(self, control_code, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:480
Method
get_prompt_p4
(self, control_code, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:958
Method
get_prompt_p5
(self, control_code=None, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:902
Method
get_prompt_p5
(self, control_code=None, gpt2=None, bsz=None)
gpt2/train_control.py:519
Method
get_prompt_p5_infix
(self, src, control_code=None, gpt2=None, bsz=None, attn_mask=None)
gpt2/train_control.py:241
Method
get_prompt_p6
(self, control_code=None, gpt2=None, bsz=None)
seq2seq/prefixTuning.py:469
Method
get_prompt_p7
(self, control_code=None, gpt2=None, bsz=None)
gpt2/train_control.py:530
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_xlm_roberta.py:202
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_roberta.py:203
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_albert.py:261
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_phobert.py:186
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_bertweet.py:204
Method
get_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_mbart.py:101
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_xlm.py:875
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_xlnet.py:265
Method
get_special_tokens_mask
Get list where entries are [1] if a token is [eos] or [pad] else 0.
transformers/src/transformers/tokenization_pegasus.py:75
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_bert.py:269
Method
get_special_tokens_mask
Get list where entries are [1] if a token is [eos] or [pad] else 0.
transformers/src/transformers/tokenization_marian.py:205
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_camembert.py:169
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_fsmt.py:392
Method
get_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_utils.py:665
Method
get_test_examples
Gets a collection of :class:`InputExample` for the test set.
transformers/src/transformers/data/processors/utils.py:102
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:183
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:225
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:254
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:279
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:322
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:364
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:454
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:496
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/glue.py:538
Method
get_test_examples
See base class.
transformers/src/transformers/data/processors/xnli.py:54
Function
get_tests_dir
returns the full path to the `tests` dir, so that the tests can be invoked from anywhere
transformers/src/transformers/testing_utils.py:187
Method
get_tgt_vocab
(self)
transformers/src/transformers/tokenization_fsmt.py:267
Method
get_top_docs
(self, question_hidden_states: np.ndarray, n_docs=5)
transformers/src/transformers/retrieval_rag.py:176
Method
get_top_docs
(self, question_hidden_states: np.ndarray, n_docs=5)
transformers/src/transformers/retrieval_rag.py:248
Method
get_train_examples
Gets a collection of :class:`InputExample` for the train set.
transformers/src/transformers/data/processors/utils.py:94
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:174
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:217
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:271
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:314
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:356
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:446
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:488
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/glue.py:530
Method
get_train_examples
See base class.
transformers/src/transformers/data/processors/xnli.py:36
Method
get_train_examples
Returns the training examples from the data directory. Args: data_dir: Directory containing the data files used for trai
transformers/src/transformers/data/processors/squad.py:582
Function
get_two_letter_code
(three_letter_code)
transformers/src/transformers/convert_marian_to_pytorch.py:334
Method
get_varlen_iter
(self, start=0, std=5, min_len=5, max_deviation=3)
transformers/src/transformers/tokenization_transfo_xl.py:671
Function
get_verbosity
Return the current level for the 🤗 Transformers's root logger as an int. Returns: :obj:`int`: The logging level. .. note::
transformers/src/transformers/utils/logging.py:117
Method
get_vocab
(self)
transformers/src/transformers/tokenization_bert_generation.py:99
Method
get_vocab
(self)
transformers/src/transformers/tokenization_xlm_roberta.py:262
Method
get_vocab
(self)
transformers/src/transformers/tokenization_openai.py:130
Method
get_vocab
(self)
transformers/src/transformers/tokenization_albert.py:161
Method
get_vocab
(self)
transformers/src/transformers/tokenization_phobert.py:245
Method
get_vocab
(self)
transformers/src/transformers/tokenization_reformer.py:121
Method
get_vocab
(self)
transformers/src/transformers/tokenization_bertweet.py:263
Method
get_vocab
(self)
transformers/src/transformers/tokenization_gpt2.py:191
Method
get_vocab
(self)
transformers/src/transformers/tokenization_transfo_xl.py:446
Method
get_vocab
(self)
transformers/src/transformers/tokenization_ctrl.py:155
Method
get_vocab
(self)
transformers/src/transformers/tokenization_xlm.py:697
Method
get_vocab
(self)
transformers/src/transformers/tokenization_xlnet.py:164
Method
get_vocab
(self)
transformers/src/transformers/tokenization_pegasus.py:60
Method
get_vocab
(self)
transformers/src/transformers/tokenization_bert.py:213
Method
get_vocab
(self)
transformers/src/transformers/tokenization_marian.py:180
Method
get_vocab
(self)
transformers/src/transformers/tokenization_fsmt.py:222
Method
get_vocab
Returns the vocabulary as a dictionary of token to index. :obj:`tokenizer.get_vocab()[token]` is equivalent to :obj:`tokenizer.conve
transformers/src/transformers/tokenization_utils.py:135
Function
glue_compute_metrics
(task_name, preds, labels)
transformers/src/transformers/data/metrics/__init__.py:54
Method
gpu_list
(self)
transformers/src/transformers/benchmark/benchmark_args_tf.py:123
Function
helper_token2bpe
(offsets)
gpt2/trainer_prefix.py:129
Method
hidden_size
(self)
transformers/src/transformers/configuration_bart.py:206
Method
hidden_size
(self)
transformers/src/transformers/configuration_ctrl.py:128
Method
hidden_size
(self)
transformers/src/transformers/configuration_openai.py:167
Method
hidden_size
(self)
transformers/src/transformers/configuration_fsmt.py:207
Method
hidden_size
(self)
transformers/src/transformers/configuration_xlm.py:240
Method
hidden_size
(self)
transformers/src/transformers/configuration_distilbert.py:129
Method
hidden_size
(self)
transformers/src/transformers/configuration_t5.py:116
Method
hidden_size
(self)
transformers/src/transformers/configuration_xlnet.py:228
Method
hidden_size
(self)
transformers/src/transformers/configuration_transfo_xl.py:196
Method
hidden_size
(self)
transformers/src/transformers/configuration_funnel.py:172
Method
hidden_size
(self)
transformers/src/transformers/configuration_gpt2.py:176
Method
hyperparameter_search
Launch an hyperparameter search using ``optuna`` or ``Ray Tune``. The optimized quantity is determined by :obj:`compute_objectie`, wh
transformers/src/transformers/trainer_prefix.py:1901
Method
hyperparameter_search
Launch an hyperparameter search using ``optuna`` or ``Ray Tune``. The optimized quantity is determined by :obj:`compute_objectie`, wh
transformers/src/transformers/trainer.py:935
Method
hyperparameter_search
Launch an hyperparameter search using ``optuna`` or ``Ray Tune``. The optimized quantity is determined by :obj:`compute_objectie`, wh
gpt2/trainer_prefix.py:974
Method
ids_to_clean_text
(self, tokenizer, generated_ids)
transformers/src/transformers/trainer_prefix.py:1537
Function
info_command_factory
(_)
transformers/src/transformers/commands/env.py:9
Method
init_index
(self)
transformers/src/transformers/retrieval_rag.py:154
Method
init_index
(self)
transformers/src/transformers/retrieval_rag.py:228
Method
init_mems
(self, bsz)
transformers/src/transformers/modeling_tf_transfo_xl.py:869
Method
init_mems
(self, bsz)
transformers/src/transformers/modeling_transfo_xl.py:1012
Method
init_weights
Initializes and prunes weights if needed.
transformers/src/transformers/modeling_utils.py:645
Method
init_weights
(self)
transformers/src/transformers/modeling_dpr.py:277
Method
init_weights
(self)
transformers/src/transformers/modeling_dpr.py:291
Method
init_weights
(self)
transformers/src/transformers/modeling_dpr.py:305
Method
is_fast
(self)
transformers/src/transformers/tokenization_utils_fast.py:78
← previous
next →
3,201–3,300 of 3,725, ranked by callers