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
Function
set_verbosity_debug
Set the verbosity to the :obj:`DEBUG` level.
transformers/src/transformers/utils/logging.py:168
Function
set_verbosity_error
Set the verbosity to the :obj:`ERROR` level.
transformers/src/transformers/utils/logging.py:173
Function
set_verbosity_info
Set the verbosity to the :obj:`INFO` level.
transformers/src/transformers/utils/logging.py:158
Function
set_verbosity_warning
Set the verbosity to the :obj:`WARNING` level.
transformers/src/transformers/utils/logging.py:163
Method
setup
(self, mode)
seq2seq/lightning_base.py:252
Method
setup
(self, mode)
seq2seq/lightning_base.py:553
Method
shape
separate heads
transformers/src/transformers/modeling_distilbert.py:178
Method
shape
projection
transformers/src/transformers/modeling_xlm.py:161
Method
shape
separate heads
transformers/src/transformers/modeling_tf_distilbert.py:222
Method
shape
projection
transformers/src/transformers/modeling_tf_flaubert.py:272
Method
shape
projection
transformers/src/transformers/modeling_tf_xlm.py:155
Method
shape
projection
transformers/src/transformers/modeling_tf_t5.py:250
Method
shift_tokens_right
Shift input ids one token to the right, and pad with start_token_id
transformers/src/transformers/modeling_rag.py:1429
Function
slow
Decorator marking a test as slow. Slow tests are skipped by default. Set the RUN_SLOW environment variable to a truthy value to run them
transformers/src/transformers/testing_utils.py:56
Method
span_to_answer
When decoding from token probalities, this method maps token indexes to actual word in the initial context. Args:
transformers/src/transformers/pipelines.py:1801
Method
special_tokens_map
:obj:`Dict[str, Union[str, List[str]]]`: A dictionary mapping special token class attributes (:obj:`cls_token`, :obj:`unk_token`, etc
transformers/src/transformers/tokenization_utils_base.py:985
Method
special_tokens_map_extended
:obj:`Dict[str, Union[str, tokenizers.AddedToken, List[Union[str, tokenizers.AddedToken]]]]`: A dictionary mapping special token clas
transformers/src/transformers/tokenization_utils_base.py:1000
Method
split_on_token
(tok, text)
transformers/src/transformers/tokenization_utils.py:277
Method
split_on_tokens
(tok_list, text)
transformers/src/transformers/tokenization_utils.py:330
Function
squad_convert_example_to_features
( example, max_seq_length, doc_stride, max_query_length, padding_strategy, is_training )
transformers/src/transformers/data/processors/squad.py:91
Function
squad_convert_example_to_features_init
(tokenizer_for_convert)
transformers/src/transformers/data/processors/squad.py:289
Function
squad_evaluate
(examples, preds, no_answer_probs=None, no_answer_probability_threshold=1.0)
transformers/src/transformers/data/metrics/squad_metrics.py:212
Method
src_vocab_size
(self)
transformers/src/transformers/tokenization_fsmt.py:257
Method
step
Number of accumulated steps.
transformers/src/transformers/optimization_tf.py:296
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
transformers/src/transformers/optimization.py:442
Method
strategy
The strategy used for distributed training.
transformers/src/transformers/training_args_tf.py:168
Method
strategy
(self)
transformers/src/transformers/benchmark/benchmark_args_tf.py:118
Function
swish
(x)
transformers/src/transformers/activations.py:12
Method
tearDown
(self)
transformers/src/transformers/testing_utils.py:434
Method
test_dataloader
(self)
seq2seq/finetune.py:335
Method
test_dataloader
(self)
seq2seq/lightning_base.py:265
Method
test_dataloader
(self)
seq2seq/lightning_base.py:566
Method
test_epoch_end
(self, outputs)
seq2seq/finetune.py:277
Method
test_epoch_end
(self, outputs)
seq2seq/lightning_base.py:241
Method
test_epoch_end
(self, outputs)
seq2seq/lightning_base.py:542
Method
test_postprocess_next_token_scores
(self)
transformers/src/transformers/data/test_generation_utils.py:28
Method
test_postprocess_next_token_scores_large_bad_words_list
(self)
transformers/src/transformers/data/test_generation_utils.py:62
Method
test_step
(self, batch, batch_idx)
seq2seq/finetune.py:274
Method
test_step
(self, batch, batch_nb)
seq2seq/lightning_base.py:238
Method
test_step
(self, batch, batch_nb)
seq2seq/lightning_base.py:539
Function
tf_required
(func)
transformers/src/transformers/file_utils.py:947
Method
tgt_lens
Length in characters of target documents
seq2seq/utils.py:134
Method
tgt_vocab_size
(self)
transformers/src/transformers/tokenization_fsmt.py:261
Method
tie_encoder_to_decoder_recursively
( decoder_pointer: nn.Module, encoder_pointer: nn.Module, module_name: str
transformers/src/transformers/modeling_utils.py:485
Method
tie_weights
Tie the weights between the input embeddings and the output embeddings. If the `torchscript` flag is set in the configuration, can't
transformers/src/transformers/modeling_mobilebert.py:951
Method
tie_weights
Tie the weights between the input embeddings and the output embeddings. If the `torchscript` flag is set in the configuration, can't
transformers/src/transformers/modeling_mobilebert.py:1071
Method
to_dict
Serializes this instance to a Python dictionary. Override the default `to_dict()` from `PretrainedConfig`. Returns: :obj
transformers/src/transformers/configuration_fsmt.py:210
Method
to_json_string
Serializes this instance to a JSON string.
transformers/src/transformers/training_args.py:394
Method
to_json_string
Serializes this instance to a JSON string.
transformers/src/transformers/benchmark/benchmark_args_utils.py:126
Method
to_json_string
Serializes this instance to a JSON string.
transformers/src/transformers/data/processors/utils.py:50
Method
to_json_string
Serializes this instance to a JSON string.
transformers/src/transformers/data/processors/utils.py:77
Method
to_py_obj
(obj)
transformers/src/transformers/tokenization_utils_base.py:2280
Method
token_to_chars
Get the character span corresponding to an encoded token in a sequence of the batch. Character spans are returned as a :class:`~tran
transformers/src/transformers/tokenization_utils_base.py:364
Method
token_to_word
Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch. Can be called as:
transformers/src/transformers/tokenization_utils_base.py:281
Method
tokenize
Converts a string in a sequence of tokens, using the backend Rust tokenizer. Args: text (:obj:`str`): Th
transformers/src/transformers/tokenization_utils_fast.py:258
Method
tokenize
Tokenizes a piece of text into characters. For example: input = "apple" output = ["a", "p", "p", "l", "e"] Ar
transformers/src/transformers/tokenization_bert_japanese.py:293
Method
tokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
transformers/src/transformers/tokenization_bert.py:515
Method
tokens
Return the list of tokens (sub-parts of the input strings after word/subword splitting and before converstion to integer indices) at
transformers/src/transformers/tokenization_utils_base.py:250
Function
torch_distributed_zero_first
Decorator to make all processes in distributed training wait for each local_master to do something. Args: local_rank (:obj:`int`): T
transformers/src/transformers/trainer_prefix.py:116
Function
torch_distributed_zero_first
Decorator to make all processes in distributed training wait for each local_master to do something. Args: local_rank (:obj:`int`): T
transformers/src/transformers/trainer.py:103
Function
torch_distributed_zero_first
Decorator to make all processes in distributed training wait for each local_master to do something. Args: local_rank (:obj:`int`): T
gpt2/trainer_prefix.py:116
Function
torch_required
(func)
transformers/src/transformers/file_utils.py:935
Method
total_steps
The number of total training steps that will be run. Used for lr scheduler purposes.
seq2seq/lightning_base.py:245
Method
total_steps
The number of total training steps that will be run. Used for lr scheduler purposes.
seq2seq/lightning_base.py:546
Function
traceit
Tracing method executed before running each line in a module or sub-module Record memory allocated in a list with debugging information
transformers/src/transformers/benchmark/benchmark_utils.py:373
Method
train
Train method to train the model.
transformers/src/transformers/trainer_tf.py:470
Method
train_amortized_pplm
Main training entry point. Args: model_path (:obj:`str`, `optional`): Local path to the model if the mod
transformers/src/transformers/trainer_prefix.py:3059
Method
train_batch_size
The actual batch size for training (may differ from :obj:`per_gpu_train_batch_size` in distributed training).
transformers/src/transformers/training_args_tf.py:183
Method
train_batch_size
The actual batch size for training (may differ from :obj:`per_gpu_train_batch_size` in distributed training).
transformers/src/transformers/training_args.py:308
Function
train_command_factory
Factory function used to instantiate training command from provided command line arguments. :return: TrainCommand
transformers/src/transformers/commands/train.py:19
Method
train_dataless
Main training entry point. Args: model_path (:obj:`str`, `optional`): Local path to the model if the mod
transformers/src/transformers/trainer_prefix.py:1149
Method
train_dataloader
(self)
seq2seq/finetune.py:328
Method
train_dataloader
(self)
seq2seq/finetune.py:645
Method
train_dataloader
(self)
seq2seq/lightning_base.py:259
Method
train_dataloader
(self)
seq2seq/lightning_base.py:560
Method
training_step
(self, batch, batch_idx)
seq2seq/finetune.py:188
Method
training_step
(self, batch, batch_idx)
seq2seq/finetune.py:525
Method
transform
(self, X)
transformers/src/transformers/pipelines.py:448
Method
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
transformers/src/transformers/data/datasets/language_modeling.py:1751
Method
unk_token
:obj:`str`: Unknown token. Log an error if used while not having been set.
transformers/src/transformers/tokenization_utils_base.py:802
Method
unk_token_id
:obj:`Optional[int]`: Id of the unknown token in the vocabulary. Returns :obj:`None` if the token has not been set.
transformers/src/transformers/tokenization_utils_base.py:918
Method
unshape
group heads
transformers/src/transformers/modeling_distilbert.py:182
Method
unshape
compute context
transformers/src/transformers/modeling_xlm.py:165
Method
unshape
group heads
transformers/src/transformers/modeling_tf_distilbert.py:226
Method
unshape
compute context
transformers/src/transformers/modeling_tf_flaubert.py:276
Method
unshape
compute context
transformers/src/transformers/modeling_tf_xlm.py:159
Method
unshape
compute context
transformers/src/transformers/modeling_t5.py:344
Method
unshape
compute context
transformers/src/transformers/modeling_tf_t5.py:254
Method
update
Updates attributes of this class with attributes from ``config_dict``. Args: config_dict (:obj:`Dict[str, Any]`): Dictio
transformers/src/transformers/configuration_utils.py:518
Method
update_gumbel_temp
(self, curr_step, total_step)
transformers/src/transformers/trainer_prefix.py:1526
Method
use_return_dict
:obj:`bool`: Whether or not return :class:`~transformers.file_utils.ModelOutput` instead of tuples.
transformers/src/transformers/configuration_utils.py:218
Method
val_dataloader
(self)
seq2seq/finetune.py:332
Method
val_dataloader
(self)
seq2seq/finetune.py:649
Method
val_dataloader
(self)
seq2seq/lightning_base.py:262
Method
val_dataloader
(self)
seq2seq/lightning_base.py:563
Method
validation_step
(self, batch, batch_idx)
seq2seq/finetune.py:209
Method
vocab_size
(self)
transformers/src/transformers/tokenization_bert_generation.py:96
Method
vocab_size
(self)
transformers/src/transformers/tokenization_xlm_roberta.py:259
Method
vocab_size
(self)
transformers/src/transformers/tokenization_openai.py:127
Method
vocab_size
(self)
transformers/src/transformers/tokenization_albert.py:158
← previous
next →
3,601–3,700 of 3,725, ranked by callers