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
is_fast
:obj:`bool`: Indicate whether this :class:`~transformers.BatchEncoding` was generated from the result of a :class:`~transformers.PreT
transformers/src/transformers/tokenization_utils_base.py:189
Method
is_fast
(self)
transformers/src/transformers/tokenization_utils.py:125
Method
is_gpu
(self)
transformers/src/transformers/benchmark/benchmark_args.py:113
Method
is_gpu
(self)
transformers/src/transformers/benchmark/benchmark_args_tf.py:134
Method
is_initialized
Returns :obj:`True` if index is already initialized.
transformers/src/transformers/retrieval_rag.py:74
Method
is_initialized
(self)
transformers/src/transformers/retrieval_rag.py:151
Method
is_initialized
(self)
transformers/src/transformers/retrieval_rag.py:225
Method
is_local_master
Whether or not this process is the local (e.g., on one machine if training in a distributed fashion on several machines) main process
transformers/src/transformers/trainer_prefix.py:2588
Method
is_local_master
Whether or not this process is the local (e.g., on one machine if training in a distributed fashion on several machines) main process
transformers/src/transformers/trainer.py:1164
Method
is_local_master
Whether or not this process is the local (e.g., on one machine if training in a distributed fashion on several machines) main process
gpt2/trainer_prefix.py:1260
Function
is_memory_tracing_enabled
()
transformers/src/transformers/benchmark/benchmark_utils.py:103
Method
is_tpu
(self)
transformers/src/transformers/benchmark/benchmark_args.py:93
Method
is_tpu
(self)
transformers/src/transformers/benchmark/benchmark_args_tf.py:113
Method
is_valid_mbart
Is the configuration aligned with the MBART paper.
transformers/src/transformers/configuration_bart.py:209
Function
keras_serializable
Decorate a Keras Layer class to support Keras serialization. This is done by: 1. Adding a :obj:`transformers_config` dict to the Keras
transformers/src/transformers/modeling_tf_utils.py:60
Method
load_dpr_model
(self)
transformers/src/transformers/convert_dpr_original_checkpoint_to_pytorch.py:42
Method
load_dpr_model
(self)
transformers/src/transformers/convert_dpr_original_checkpoint_to_pytorch.py:59
Method
load_dpr_model
(self)
transformers/src/transformers/convert_dpr_original_checkpoint_to_pytorch.py:76
Method
load_hf_checkpoint
(self, *args, **kwargs)
seq2seq/lightning_base.py:197
Method
load_hf_checkpoint
(self, *args, **kwargs)
seq2seq/lightning_base.py:498
Function
load_json
(path)
seq2seq/utils.py:366
Function
load_pytorch_model_in_tf2_model
Load pytorch checkpoints in a TF 2.0 model
transformers/src/transformers/modeling_tf_pytorch_utils.py:97
Function
load_tf_weights_in_gpt2
Load tf checkpoints in a pytorch model
transformers/src/transformers/modeling_gpt2_adapter.py:63
Method
logits
(self)
transformers/src/transformers/modeling_transfo_xl.py:661
Function
lr_lambda
(current_step: int)
transformers/src/transformers/optimization.py:63
Function
make_tatoeba_registry
(repo_path="Tatoeba-Challenge/models")
transformers/src/transformers/convert_marian_to_pytorch.py:385
Method
mask_token
:obj:`str`: Mask token, to use when training a model with masked-language modeling. Log an error if used while not having been set.
transformers/src/transformers/tokenization_utils_base.py:844
Method
mask_token_id
:obj:`Optional[int]`: Id of the mask token in the vocabulary, used when training a model with masked-language modeling. Returns :obj:
transformers/src/transformers/tokenization_utils_base.py:967
Method
mask_tokens
Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original.
transformers/src/transformers/data/data_collator.py:926
Method
mask_tokens
Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original.
transformers/src/transformers/data/data_collator.py:1143
Method
max_len
:obj:`int`: **Deprecated** Kept here for backward compatibility. Now renamed to :obj:`model_max_length` to avoid ambiguity.
transformers/src/transformers/tokenization_utils_base.py:1317
Method
max_len_sentences_pair
:obj:`int`: The maximum combined length of a pair of sentences that can be fed to the model.
transformers/src/transformers/tokenization_utils_base.py:1336
Method
max_len_single_sentence
:obj:`int`: The maximum length of a sentence that can be fed to the model.
transformers/src/transformers/tokenization_utils_base.py:1329
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_ctrl.py:124
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_openai.py:163
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_t5.py:112
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_xlnet.py:216
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_transfo_xl.py:182
Method
max_position_embeddings
(self)
transformers/src/transformers/configuration_gpt2.py:172
Function
mish
(x)
transformers/src/transformers/activations_tf.py:36
Function
mish
(x)
transformers/src/transformers/modeling_mobilebert.py:143
Function
mish
(x)
transformers/src/transformers/activations.py:43
Function
mockenv
this is a convenience wrapper, that allows this: @mockenv(USE_CUDA=True, USE_TF=False) def test_something(): use_cuda = os.getenv("US
transformers/src/transformers/testing_utils.py:441
Function
modelForQuestionAnswering
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForQuestionAnswering', 'bert-b
transformers/hubconf.py:113
Function
modelForSequenceClassification
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForSequenceClassif
transformers/hubconf.py:94
Function
modelWithLMHead
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelWithLMHead', 'bert-base-uncase
transformers/hubconf.py:76
Method
model_info
(self)
transformers/src/transformers/commands/serving.py:160
Method
model_names
(self)
transformers/src/transformers/benchmark/benchmark_args_utils.py:133
Method
move_added_token
Moves an added token to a specific position in the vocab. This method should be used when resizing an embedding layer other than the
transformers/src/transformers/tokenization_transfo_xl.py:354
Function
multi_process_func
(*args, **kwargs)
transformers/src/transformers/benchmark/benchmark_utils.py:77
Method
n_gpu
The number of replicas (CPUs, GPUs or TPU cores) used in this training.
transformers/src/transformers/training_args_tf.py:210
Method
n_gpu
The number of GPUs used by this process. Note: This will only be greater than one when you have multiple GPUs available
transformers/src/transformers/training_args.py:374
Method
n_gpu
(self)
transformers/src/transformers/benchmark/benchmark_args.py:109
Method
n_gpu
(self)
transformers/src/transformers/benchmark/benchmark_args_tf.py:128
Method
n_replicas
The number of replicas (CPUs, GPUs or TPU cores) used in this training.
transformers/src/transformers/training_args_tf.py:176
Method
n_token
(self)
transformers/src/transformers/configuration_xlnet.py:220
Method
n_token
(self)
transformers/src/transformers/configuration_transfo_xl.py:188
Method
n_words
(self)
transformers/src/transformers/configuration_xlm.py:232
Function
nested_detach
Detach `tensors` (even if it's a nested list/tuple of tensors).
transformers/src/transformers/trainer_utils.py:165
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_bart.py:202
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_ctrl.py:132
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_openai.py:171
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_fsmt.py:203
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_xlm.py:244
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_distilbert.py:133
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_t5.py:120
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_xlnet.py:232
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_transfo_xl.py:200
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_funnel.py:176
Method
num_attention_heads
(self)
transformers/src/transformers/configuration_gpt2.py:180
Method
num_blocks
(self)
transformers/src/transformers/configuration_funnel.py:184
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_ctrl.py:136
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_openai.py:175
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_xlm.py:248
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_distilbert.py:137
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_t5.py:124
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_xlnet.py:236
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_transfo_xl.py:204
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_funnel.py:180
Method
num_hidden_layers
(self)
transformers/src/transformers/configuration_gpt2.py:184
Method
num_labels
:obj:`int`: The number of labels for classification models.
transformers/src/transformers/configuration_utils.py:226
Method
num_parameters
Get the number of (optionally, trainable) parameters in the model. Args: only_trainable (:obj:`bool`, `optional`, defaul
transformers/src/transformers/modeling_tf_utils.py:43
Method
num_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. .. note:: This encodes a dummy input an
transformers/src/transformers/tokenization_utils_fast.py:214
Method
num_special_tokens_to_add
Just EOS
transformers/src/transformers/tokenization_pegasus.py:65
Method
num_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. .. note:: This encodes a dummy input an
transformers/src/transformers/tokenization_utils.py:218
Method
num_tokens_in_example
(i)
seq2seq/utils.py:149
Method
on_batch_end
(self, trainer, pl_module)
seq2seq/callbacks.py:24
Method
on_batch_end
(self, trainer, pl_module)
seq2seq/lightning_base.py:653
Method
on_epoch_end
(self)
seq2seq/finetune.py:203
Method
on_save_checkpoint
(self, checkpoint: Dict[str, Any], filepath=None)
seq2seq/lightning_base.py:284
Method
on_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
seq2seq/callbacks.py:76
Method
on_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
seq2seq/lightning_base.py:666
Method
on_train_start
(self, trainer, pl_module)
seq2seq/callbacks.py:65
Method
on_validation_end
(self, trainer: pl.Trainer, pl_module)
seq2seq/callbacks.py:81
Method
on_validation_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
seq2seq/lightning_base.py:658
Method
pad
(self)
seq2seq/finetune.py:185
Method
pad
(self)
seq2seq/finetune.py:522
Method
pad_token
:obj:`str`: Padding token. Log an error if used while not having been set.
transformers/src/transformers/tokenization_utils_base.py:823
Method
pad_token_id
:obj:`Optional[int]`: Id of the padding token in the vocabulary. Returns :obj:`None` if the token has not been set.
transformers/src/transformers/tokenization_utils_base.py:938
Method
pad_token_type_id
:obj:`int`: Id of the padding token type in the vocabulary.
transformers/src/transformers/tokenization_utils_base.py:948
← previous
next →
3,301–3,400 of 3,725, ranked by callers