Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/huggingface/transformers
/ functions
Functions
4,119 in github.com/huggingface/transformers
⨍
Functions
4,119
◇
Types & classes
939
↳
Endpoints
4
Function
make_qa_retriever_batch
(qa_list, tokenizer, max_len=64, device="cuda:0")
examples/longform-qa/eli5_utils.py:193
Function
make_qa_retriever_model
(model_name="google/bert_uncased_L-8_H-512_A-8", from_file=None, device="cuda:0")
examples/longform-qa/eli5_utils.py:177
Method
map_batch_fn
(self, fn)
examples/seq2seq/bertabs/modeling_bertabs.py:612
Method
mask_token
Mask token (string). E.g. when training a model with masked-language modeling. Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:766
Method
mask_token_id
Id of the mask token in the vocabulary. E.g. when training a model with masked-language modeling. Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:861
Method
max_len
Kept here for backward compatibility. Now renamed to `model_max_length` to avoid ambiguity.
src/transformers/tokenization_utils_base.py:1049
Method
max_len_sentences_pair
(self)
src/transformers/tokenization_utils_base.py:1060
Method
max_len_single_sentence
(self)
src/transformers/tokenization_utils_base.py:1056
Method
max_position_embeddings
(self)
templates/adding_a_new_model/configuration_xxx.py:101
Method
max_position_embeddings
(self)
src/transformers/configuration_ctrl.py:125
Method
max_position_embeddings
(self)
src/transformers/configuration_openai.py:159
Method
max_position_embeddings
(self)
src/transformers/configuration_t5.py:100
Method
max_position_embeddings
(self)
src/transformers/configuration_xlnet.py:199
Method
max_position_embeddings
(self)
src/transformers/configuration_transfo_xl.py:186
Method
max_position_embeddings
(self)
src/transformers/configuration_gpt2.py:164
Function
mish
(x)
src/transformers/modeling_tf_mobilebert.py:55
Function
mish
(x)
src/transformers/modeling_reformer.py:53
Function
mish
(x)
src/transformers/modeling_bert.py:138
Function
mish
(x)
src/transformers/modeling_mobilebert.py:124
Function
modelForQuestionAnswering
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForQuestionAnswering', 'bert-b
hubconf.py:113
Function
modelForSequenceClassification
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForSequenceClassif
hubconf.py:94
Function
modelWithLMHead
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelWithLMHead', 'bert-base-uncase
hubconf.py:76
Method
model_info
(self)
src/transformers/commands/serving.py:159
Method
model_names
(self)
src/transformers/benchmark/benchmark_args_utils.py:116
Function
multi_process_func
(*args, **kwargs)
src/transformers/benchmark/benchmark_utils.py:77
Method
n_gpu
(self)
src/transformers/training_args_tf.py:66
Method
n_gpu
(self)
src/transformers/training_args.py:200
Method
n_gpu
(self)
src/transformers/benchmark/benchmark_args.py:81
Method
n_gpu
(self)
src/transformers/benchmark/benchmark_args_tf.py:98
Method
n_token
(self)
src/transformers/configuration_xlnet.py:203
Method
n_token
(self)
src/transformers/configuration_transfo_xl.py:190
Method
n_words
(self)
src/transformers/configuration_xlm.py:235
Method
normalize
(truth)
examples/multiple-choice/utils_multiple_choice.py:430
Method
num_attention_heads
(self)
templates/adding_a_new_model/configuration_xxx.py:109
Method
num_attention_heads
(self)
src/transformers/configuration_bart.py:131
Method
num_attention_heads
(self)
src/transformers/configuration_ctrl.py:133
Method
num_attention_heads
(self)
src/transformers/configuration_openai.py:167
Method
num_attention_heads
(self)
src/transformers/configuration_xlm.py:247
Method
num_attention_heads
(self)
src/transformers/configuration_distilbert.py:134
Method
num_attention_heads
(self)
src/transformers/configuration_t5.py:108
Method
num_attention_heads
(self)
src/transformers/configuration_xlnet.py:215
Method
num_attention_heads
(self)
src/transformers/configuration_transfo_xl.py:202
Method
num_attention_heads
(self)
src/transformers/configuration_gpt2.py:172
Method
num_hidden_layers
(self)
templates/adding_a_new_model/configuration_xxx.py:113
Method
num_hidden_layers
(self)
src/transformers/configuration_ctrl.py:137
Method
num_hidden_layers
(self)
src/transformers/configuration_openai.py:171
Method
num_hidden_layers
(self)
src/transformers/configuration_xlm.py:251
Method
num_hidden_layers
(self)
src/transformers/configuration_distilbert.py:138
Method
num_hidden_layers
(self)
src/transformers/configuration_t5.py:112
Method
num_hidden_layers
(self)
src/transformers/configuration_xlnet.py:219
Method
num_hidden_layers
(self)
src/transformers/configuration_transfo_xl.py:206
Method
num_hidden_layers
(self)
src/transformers/configuration_gpt2.py:176
Method
num_labels
(self)
src/transformers/configuration_utils.py:118
Method
num_parameters
Get number of (optionally, trainable) parameters in the model.
src/transformers/modeling_tf_utils.py:39
Method
num_special_tokens_to_add
(self, pair: bool = False)
src/transformers/tokenization_utils_fast.py:218
Function
onLoad
()
docs/source/_static/js/custom.js:249
Method
on_save_checkpoint
(self, checkpoint: Dict[str, Any])
examples/lightning_base.py:167
Method
on_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/lightning_base.py:223
Method
on_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/seq2seq/callbacks.py:70
Method
on_train_start
(self, trainer, pl_module)
examples/seq2seq/callbacks.py:59
Method
on_validation_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/lightning_base.py:214
Method
pad_token
Padding token (string). Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:750
Method
pad_token_id
Id of the padding token in the vocabulary. Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:842
Method
pad_token_type_id
Id of the padding token type in the vocabulary.
src/transformers/tokenization_utils_base.py:849
Method
partial_encode
(*inputs)
src/transformers/modeling_retribert.py:110
Method
partial_encode
(*inputs)
examples/longform-qa/eli5_utils.py:139
Method
pre_init
(self, hparams)
examples/seq2seq/distillation.py:269
Method
predict
(self, X)
src/transformers/pipelines.py:316
Method
predict
Scikit / Keras interface to transformers' pipelines. This method will forward to __call__().
src/transformers/pipelines.py:424
Method
prepare_config_and_inputs_for_common
(self)
templates/adding_a_new_model/tests/test_modeling_tf_xxx.py:208
Method
prepare_config_and_inputs_for_common
(self)
templates/adding_a_new_model/tests/test_modeling_xxx.py:229
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_roberta.py:203
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_albert.py:202
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_transfo_xl.py:158
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_distilbert.py:182
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_electra.py:166
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_albert.py:245
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_gpt2.py:283
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_mobilebert.py:263
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_bert.py:416
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_mobilebert.py:352
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_bert.py:240
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_ctrl.py:139
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_gpt2.py:253
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_distilbert.py:221
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_xlnet.py:351
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_openai.py:150
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_t5.py:288
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_ctrl.py:144
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_xlm.py:243
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_longformer.py:235
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_t5.py:207
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_roberta.py:177
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_openai_gpt.py:166
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_xlm.py:324
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_xlnet.py:431
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_reformer.py:401
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_flaubert.py:297
Method
prepare_config_and_inputs_for_common
(self)
tests/test_modeling_electra.py:301
Function
prepare_ctrl_input
(args, _, tokenizer, prompt_text)
examples/text-generation/run_generation.py:86
← previous
next →
3,101–3,200 of 4,119, ranked by callers