MCPcopy Create free account

hub / github.com/huggingface/transformers / functions

Functions4,119 in github.com/huggingface/transformers

Functionmake_qa_retriever_batch
(qa_list, tokenizer, max_len=64, device="cuda:0")
examples/longform-qa/eli5_utils.py:193
Functionmake_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
Methodmap_batch_fn
(self, fn)
examples/seq2seq/bertabs/modeling_bertabs.py:612
Methodmask_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
Methodmask_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
Methodmax_len
Kept here for backward compatibility. Now renamed to `model_max_length` to avoid ambiguity.
src/transformers/tokenization_utils_base.py:1049
Methodmax_len_sentences_pair
(self)
src/transformers/tokenization_utils_base.py:1060
Methodmax_len_single_sentence
(self)
src/transformers/tokenization_utils_base.py:1056
Methodmax_position_embeddings
(self)
templates/adding_a_new_model/configuration_xxx.py:101
Methodmax_position_embeddings
(self)
src/transformers/configuration_ctrl.py:125
Methodmax_position_embeddings
(self)
src/transformers/configuration_openai.py:159
Methodmax_position_embeddings
(self)
src/transformers/configuration_t5.py:100
Methodmax_position_embeddings
(self)
src/transformers/configuration_xlnet.py:199
Methodmax_position_embeddings
(self)
src/transformers/configuration_transfo_xl.py:186
Methodmax_position_embeddings
(self)
src/transformers/configuration_gpt2.py:164
Functionmish
(x)
src/transformers/modeling_tf_mobilebert.py:55
Functionmish
(x)
src/transformers/modeling_reformer.py:53
Functionmish
(x)
src/transformers/modeling_bert.py:138
Functionmish
(x)
src/transformers/modeling_mobilebert.py:124
FunctionmodelForQuestionAnswering
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForQuestionAnswering', 'bert-b
hubconf.py:113
FunctionmodelForSequenceClassification
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelForSequenceClassif
hubconf.py:94
FunctionmodelWithLMHead
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'modelWithLMHead', 'bert-base-uncase
hubconf.py:76
Methodmodel_info
(self)
src/transformers/commands/serving.py:159
Methodmodel_names
(self)
src/transformers/benchmark/benchmark_args_utils.py:116
Functionmulti_process_func
(*args, **kwargs)
src/transformers/benchmark/benchmark_utils.py:77
Methodn_gpu
(self)
src/transformers/training_args_tf.py:66
Methodn_gpu
(self)
src/transformers/training_args.py:200
Methodn_gpu
(self)
src/transformers/benchmark/benchmark_args.py:81
Methodn_gpu
(self)
src/transformers/benchmark/benchmark_args_tf.py:98
Methodn_token
(self)
src/transformers/configuration_xlnet.py:203
Methodn_token
(self)
src/transformers/configuration_transfo_xl.py:190
Methodn_words
(self)
src/transformers/configuration_xlm.py:235
Methodnormalize
(truth)
examples/multiple-choice/utils_multiple_choice.py:430
Methodnum_attention_heads
(self)
templates/adding_a_new_model/configuration_xxx.py:109
Methodnum_attention_heads
(self)
src/transformers/configuration_bart.py:131
Methodnum_attention_heads
(self)
src/transformers/configuration_ctrl.py:133
Methodnum_attention_heads
(self)
src/transformers/configuration_openai.py:167
Methodnum_attention_heads
(self)
src/transformers/configuration_xlm.py:247
Methodnum_attention_heads
(self)
src/transformers/configuration_distilbert.py:134
Methodnum_attention_heads
(self)
src/transformers/configuration_t5.py:108
Methodnum_attention_heads
(self)
src/transformers/configuration_xlnet.py:215
Methodnum_attention_heads
(self)
src/transformers/configuration_transfo_xl.py:202
Methodnum_attention_heads
(self)
src/transformers/configuration_gpt2.py:172
Methodnum_hidden_layers
(self)
templates/adding_a_new_model/configuration_xxx.py:113
Methodnum_hidden_layers
(self)
src/transformers/configuration_ctrl.py:137
Methodnum_hidden_layers
(self)
src/transformers/configuration_openai.py:171
Methodnum_hidden_layers
(self)
src/transformers/configuration_xlm.py:251
Methodnum_hidden_layers
(self)
src/transformers/configuration_distilbert.py:138
Methodnum_hidden_layers
(self)
src/transformers/configuration_t5.py:112
Methodnum_hidden_layers
(self)
src/transformers/configuration_xlnet.py:219
Methodnum_hidden_layers
(self)
src/transformers/configuration_transfo_xl.py:206
Methodnum_hidden_layers
(self)
src/transformers/configuration_gpt2.py:176
Methodnum_labels
(self)
src/transformers/configuration_utils.py:118
Methodnum_parameters
Get number of (optionally, trainable) parameters in the model.
src/transformers/modeling_tf_utils.py:39
Methodnum_special_tokens_to_add
(self, pair: bool = False)
src/transformers/tokenization_utils_fast.py:218
FunctiononLoad
()
docs/source/_static/js/custom.js:249
Methodon_save_checkpoint
(self, checkpoint: Dict[str, Any])
examples/lightning_base.py:167
Methodon_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/lightning_base.py:223
Methodon_test_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/seq2seq/callbacks.py:70
Methodon_train_start
(self, trainer, pl_module)
examples/seq2seq/callbacks.py:59
Methodon_validation_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
examples/lightning_base.py:214
Methodpad_token
Padding token (string). Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:750
Methodpad_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
Methodpad_token_type_id
Id of the padding token type in the vocabulary.
src/transformers/tokenization_utils_base.py:849
Methodpartial_encode
(*inputs)
src/transformers/modeling_retribert.py:110
Methodpartial_encode
(*inputs)
examples/longform-qa/eli5_utils.py:139
Methodpre_init
(self, hparams)
examples/seq2seq/distillation.py:269
Methodpredict
(self, X)
src/transformers/pipelines.py:316
Methodpredict
Scikit / Keras interface to transformers' pipelines. This method will forward to __call__().
src/transformers/pipelines.py:424
Methodprepare_config_and_inputs_for_common
(self)
templates/adding_a_new_model/tests/test_modeling_tf_xxx.py:208
Methodprepare_config_and_inputs_for_common
(self)
templates/adding_a_new_model/tests/test_modeling_xxx.py:229
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_roberta.py:203
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_albert.py:202
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_transfo_xl.py:158
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_distilbert.py:182
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_electra.py:166
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_albert.py:245
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_gpt2.py:283
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_mobilebert.py:263
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_bert.py:416
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_mobilebert.py:352
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_bert.py:240
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_ctrl.py:139
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_gpt2.py:253
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_distilbert.py:221
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_xlnet.py:351
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_openai.py:150
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_t5.py:288
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_ctrl.py:144
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_xlm.py:243
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_longformer.py:235
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_t5.py:207
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_roberta.py:177
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_tf_openai_gpt.py:166
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_xlm.py:324
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_xlnet.py:431
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_reformer.py:401
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_flaubert.py:297
Methodprepare_config_and_inputs_for_common
(self)
tests/test_modeling_electra.py:301
Functionprepare_ctrl_input
(args, _, tokenizer, prompt_text)
examples/text-generation/run_generation.py:86
← previousnext →3,101–3,200 of 4,119, ranked by callers