MCPcopy Create free account

hub / github.com/huggingface/transformers / functions

Functions4,119 in github.com/huggingface/transformers

Methodsave_vocabulary
Save the sentencepiece vocabulary (copy original file) and special tokens file to a directory. Args: save_directory (:ob
src/transformers/tokenization_camembert.py:268
Methodsave_vocabulary
Save the tokenizer vocabulary to a directory. This method does *NOT* save added tokens and special token mappings. Please us
src/transformers/tokenization_utils.py:902
Methodsep_token
Separation token (string). E.g. separate context and query in an input sequence. Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:742
Methodsep_token_id
Id of the separation token in the vocabulary. E.g. separate context and query in an input sequence. Log an error if used while not having been set.
src/transformers/tokenization_utils_base.py:835
Functionserve_command_factory
Factory function used to instantiate serving server from provided command line arguments. :return: ServeCommand
src/transformers/commands/serving.py:30
MethodsetUp
(self)
templates/adding_a_new_model/tests/test_tokenization_xxx.py:29
MethodsetUp
(self)
templates/adding_a_new_model/tests/test_modeling_tf_xxx.py:222
MethodsetUp
(self)
templates/adding_a_new_model/tests/test_modeling_xxx.py:243
MethodsetUp
(self)
tests/test_modeling_roberta.py:234
MethodsetUp
(self)
tests/test_modeling_tf_albert.py:232
MethodsetUp
(self)
tests/test_tokenization_common.py:64
MethodsetUp
(self)
tests/test_modeling_bart.py:128
MethodsetUp
(self)
tests/test_modeling_transfo_xl.py:194
MethodsetUp
(self)
tests/test_modeling_tf_transfo_xl.py:175
MethodsetUp
(self)
tests/test_modeling_tf_distilbert.py:208
MethodsetUp
(self)
tests/test_modeling_tf_electra.py:190
MethodsetUp
(self)
tests/test_tokenization_ctrl.py:29
MethodsetUp
(self)
tests/test_modeling_albert.py:277
MethodsetUp
(self)
tests/test_tokenization_xlnet.py:33
MethodsetUp
(self)
tests/test_modeling_gpt2.py:315
MethodsetUp
(self)
tests/test_modeling_tf_mobilebert.py:277
MethodsetUp
(self)
tests/test_modeling_bert.py:449
MethodsetUp
(self)
tests/test_tokenization_transfo_xl.py:35
MethodsetUp
(self)
tests/test_modeling_mobilebert.py:385
MethodsetUp
(self)
tests/test_modeling_tf_bert.py:273
MethodsetUp
(self)
tests/test_modeling_tf_ctrl.py:164
MethodsetUp
(self)
tests/test_modeling_tf_gpt2.py:282
MethodsetUp
(self)
tests/test_tokenization_albert.py:32
MethodsetUp
(self)
tests/test_tokenization_gpt2.py:31
MethodsetUp
(self)
tests/test_tokenization_fast.py:44
MethodsetUp
(self)
tests/test_modeling_distilbert.py:248
MethodsetUp
(self)
tests/test_modeling_tf_xlnet.py:390
MethodsetUp
(self)
tests/test_tokenization_bert.py:40
MethodsetUp
(self)
tests/test_modeling_openai.py:180
MethodsetUp
(self)
tests/test_modeling_t5.py:312
MethodsetUp
(self)
tests/test_modeling_ctrl.py:174
MethodsetUp
(self)
tests/test_tokenization_roberta.py:30
MethodsetUp
(self)
tests/test_modeling_tf_xlm.py:283
MethodsetUp
(self)
tests/test_modeling_longformer.py:290
MethodsetUp
(self)
tests/test_modeling_tf_t5.py:226
MethodsetUp
(self)
tests/test_modeling_tf_roberta.py:207
MethodsetUp
(self)
tests/test_model_card.py:26
MethodsetUp
(self)
tests/test_tokenization_xlm_roberta.py:34
MethodsetUp
(self)
tests/test_tokenization_xlm.py:31
MethodsetUp
(self)
tests/test_modeling_tf_openai_gpt.py:195
MethodsetUp
(self)
tests/test_modeling_xlm.py:358
MethodsetUp
(self)
tests/test_modeling_xlnet.py:471
MethodsetUp
(self)
tests/test_tokenization_bert_japanese.py:163
MethodsetUp
(self)
tests/test_tokenization_openai.py:30
MethodsetUp
(self)
tests/test_tokenization_t5.py:33
MethodsetUp
(self)
tests/test_pipelines.py:46
MethodsetUp
(self)
tests/test_modeling_reformer.py:513
MethodsetUp
(self)
tests/test_modeling_reformer.py:569
MethodsetUp
(self)
tests/test_modeling_flaubert.py:328
MethodsetUp
(self)
tests/test_tokenization_marian.py:40
MethodsetUp
(self)
tests/test_modeling_electra.py:333
MethodsetUp
(self)
examples/seq2seq/bertabs/test_utils_summarization.py:24
MethodsetUpClass
(cls)
tests/test_modeling_bart.py:223
MethodsetUpClass
(cls)
tests/test_modeling_marian.py:77
MethodsetUpClass
Share this valid token in all tests below.
tests/test_hf_api.py:58
MethodsetUpClass
(cls)
examples/seq2seq/test_seq2seq_examples.py:106
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_electra.py:221
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_distilbert.py:401
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_ctrl.py:320
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_albert.py:526
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_transfo_xl.py:473
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_xlnet.py:655
Methodset_input_embeddings
(self, value)
src/transformers/modeling_bart.py:888
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_openai.py:232
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_xlm.py:388
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_bert.py:516
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_distilbert.py:431
Methodset_input_embeddings
(self, value)
src/transformers/modeling_reformer.py:1525
Methodset_input_embeddings
(self, value)
src/transformers/modeling_bert.py:657
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_gpt2.py:242
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_gpt2.py:364
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_xlnet.py:398
Methodset_input_embeddings
(self, value)
src/transformers/modeling_albert.py:462
Methodset_input_embeddings
(self, value)
src/transformers/modeling_mobilebert.py:741
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_xlm.py:316
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_t5.py:872
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_t5.py:1008
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_openai.py:350
Methodset_input_embeddings
(self, value)
src/transformers/modeling_roberta.py:161
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_tf_t5.py:894
Methodset_input_embeddings
(self, new_embeddings)
src/transformers/modeling_tf_t5.py:1037
Methodset_input_embeddings
(self, value)
src/transformers/modeling_electra.py:256
Methodset_input_embeddings
(self, value)
src/transformers/modeling_mmbt.py:275
Methodset_input_embeddings
(self, value)
src/transformers/modeling_tf_ctrl.py:219
Methodset_input_embeddings
(self, value)
examples/movement-pruning/emmental/modeling_bert_masked.py:491
Methodset_patience
(self, patience)
examples/bert-loses-patience/pabee/modeling_pabee_albert.py:78
Methodset_regression_threshold
(self, threshold)
examples/bert-loses-patience/pabee/modeling_pabee_albert.py:75
Methodshape
separate heads
src/transformers/modeling_distilbert.py:159
Methodshape
projection
src/transformers/modeling_xlm.py:142
Methodshape
separate heads
src/transformers/modeling_tf_distilbert.py:243
Methodshape
projection
src/transformers/modeling_tf_xlm.py:154
Methodshape
projection
src/transformers/modeling_tf_t5.py:234
Methodshape
projection
examples/seq2seq/bertabs/modeling_bertabs.py:449
Functionslow
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
tests/utils.py:47
Methodspan_to_answer
When decoding from token probalities, this method maps token indexes to actual word in the initial context. Args:
src/transformers/pipelines.py:1307
← previousnext →3,301–3,400 of 4,119, ranked by callers