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
Method
forward
r""" Return: :obj:`tuple(torch.FloatTensor)` comprising various elements depending on the configuration (:class:`~transformers.BertConfig`
examples/bert-loses-patience/pabee/modeling_pabee_bert.py:96
Method
forward
r""" labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size,)`, `optional`, defaults to :obj:`None`): Labels for computing the
examples/bert-loses-patience/pabee/modeling_pabee_bert.py:258
Method
forward_chunk
(self, hidden_states)
src/transformers/modeling_reformer.py:1074
Method
forward_chunk
(self, hidden_states)
src/transformers/modeling_reformer.py:1407
Method
framework_version
(self)
src/transformers/benchmark/benchmark.py:62
Method
framework_version
(self)
src/transformers/benchmark/benchmark_utils.py:601
Method
framework_version
(self)
src/transformers/benchmark/benchmark_tf.py:85
Method
freeze_embeds
(self)
examples/seq2seq/distillation.py:300
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:521
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:669
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:826
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:961
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:1102
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:1235
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:1385
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_auto.py:1528
Method
from_config
(cls, config)
src/transformers/modeling_auto.py:1676
Method
from_config
Creates an optimizer from its config with WarmUp custom object.
src/transformers/optimization_tf.py:127
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:300
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:449
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:616
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:775
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:927
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:1087
Method
from_config
r""" Instantiates one of the base model classes of the library from a configuration. Note: Loading a model from its confi
src/transformers/modeling_tf_auto.py:1229
Method
from_json_file
Constructs a `Config` from the path to a json file of parameters. Args: json_file (:obj:`string`): Path
src/transformers/configuration_utils.py:307
Method
from_pretrained
r"""Instantiate a pretrained pytorch model from a pre-trained model configuration. The model is set in evaluation mode by default using ``mod
src/transformers/modeling_utils.py:509
Method
from_pretrained
r""" Instantiates one of the model classes of the library -with the architecture used for pretraining this model– from a pre-trained model configurati
src/transformers/modeling_auto.py:563
Method
from_pretrained
r""" Instantiates one of the language modeling model classes of the library from a pre-trained model configuration. The `from_pretrai
src/transformers/modeling_auto.py:715
Method
from_pretrained
r""" Instantiates one of the language modeling model classes of the library from a pre-trained model configuration. The `from_pretrai
src/transformers/modeling_auto.py:863
Method
from_pretrained
r""" Instantiates one of the language modeling model classes of the library from a pre-trained model configuration. The `from_pretrai
src/transformers/modeling_auto.py:1001
Method
from_pretrained
r""" Instantiates one of the language modeling model classes of the library from a pre-trained model configuration. The `from_pretrai
src/transformers/modeling_auto.py:1138
Method
from_pretrained
r""" Instantiates one of the sequence classification model classes of the library from a pre-trained model configuration. The `from_p
src/transformers/modeling_auto.py:1277
Method
from_pretrained
r""" Instantiates one of the question answering model classes of the library from a pre-trained model configuration. The `from_pretra
src/transformers/modeling_auto.py:1424
Method
from_pretrained
r""" Instantiates one of the question answering model classes of the library from a pre-trained model configuration. The `from_pretra
src/transformers/modeling_auto.py:1570
Method
from_pretrained
(cls, pretrained_model_name_or_path, *model_args, **kwargs)
src/transformers/modeling_auto.py:1691
Method
from_pretrained
r"""Instantiate a pretrained TF 2.0 model from a pre-trained model configuration. The warning ``Weights from XXX not initialized from pretrai
src/transformers/modeling_tf_utils.py:332
Method
from_pretrained
r""" Instantiates one of the configuration classes of the library from a pre-trained model configuration. The configuration class to
src/transformers/configuration_auto.py:133
Method
from_pretrained
r""" Instantiates one of the model classes of the library -with the architecture used for pretraining this model– from a pre-trained model configurati
src/transformers/modeling_tf_auto.py:488
Method
from_pretrained
r""" Instantiates one of the language modeling model classes of the library from a pre-trained model configuration. The `from_pretrai
src/transformers/modeling_tf_auto.py:655
Method
from_pretrained
r""" Instantiates one of the multiple choice model classes of the library from a pre-trained model configuration. The `from_pretraine
src/transformers/modeling_tf_auto.py:808
Method
from_pretrained
r""" Instantiates one of the sequence classification model classes of the library from a pre-trained model configuration. The `from_p
src/transformers/modeling_tf_auto.py:964
Method
from_pretrained
r""" Instantiates one of the question answering model classes of the library from a pre-trained model configuration. The `from_pretra
src/transformers/modeling_tf_auto.py:1125
Method
from_pretrained
r""" Instantiates one of the question answering model classes of the library from a pre-trained model configuration. The `from_pretra
src/transformers/modeling_tf_auto.py:1265
Method
from_pretrained
Instantiate a pre-processed corpus.
src/transformers/tokenization_transfo_xl.py:665
Method
from_pretrained
r""" Instantiate one of the tokenizer classes of the library from a pre-trained model vocabulary. The tokenizer class to instantiate
src/transformers/tokenization_auto.py:139
Method
from_pretrained
r""" Instantiate a :class:`~transformers.PreTrainedTokenizer` (or a derived class) from a predefined tokenizer. Args: pre
src/transformers/tokenization_utils_base.py:1088
Method
from_pretrained
r""" Instantiate a :class:`~transformers.PretrainedConfig` (or a derived class) from a pre-trained model configuration. Args:
src/transformers/configuration_utils.py:145
Function
gelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: floa
src/transformers/modeling_tf_openai.py:49
Function
gelu
Gaussian Error Linear Unit. Original Implementation of the gelu activation function in Google Bert repo when initially created. For infor
src/transformers/modeling_tf_bert.py:74
Function
gelu
Gaussian Error Linear Unit. Original Implementation of the gelu activation function in Google Bert repo when initially created. For infor
src/transformers/modeling_tf_distilbert.py:63
Function
gelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: floa
src/transformers/modeling_tf_gpt2.py:53
Function
gelu
Implementation of the gelu activation function. XLNet is using OpenAI GPT's gelu Also see https://arxiv.org/abs/1606.08415
src/transformers/modeling_tf_xlnet.py:59
Function
gelu
(x)
examples/seq2seq/bertabs/modeling_bertabs.py:626
Function
gelu_fast
(x)
src/transformers/activations.py:38
Function
gelu_new
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: floa
src/transformers/modeling_tf_bert.py:85
Function
gelu_new
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: floa
src/transformers/modeling_tf_distilbert.py:74
Function
gen
()
src/transformers/data/processors/glue.py:82
Function
gen
()
src/transformers/data/processors/squad.py:390
Method
gen
()
src/transformers/data/processors/utils.py:321
Method
gen
()
examples/multiple-choice/utils_multiple_choice.py:169
Method
gen
()
examples/token-classification/utils_ner.py:183
Method
gen
()
examples/adversarial/utils_hans.py:196
Method
generate
r""" Generates sequences for models with a LM head. The method currently supports greedy or penalized greedy decoding, sampling with top-k or nucleus
src/transformers/modeling_tf_utils.py:552
Function
getFrameworkSpans
docs/source/_static/js/custom.js:165
Method
get_added_vocab
(self)
src/transformers/tokenization_utils_fast.py:126
Function
get_clean_model_id_mapping
(multiling_model_ids)
src/transformers/convert_marian_to_pytorch.py:185
Method
get_clean_sequence
(self, tokenizer)
tests/test_tokenization_bert_japanese.py:68
Function
get_config
(self)
src/transformers/modeling_tf_utils.py:95
Method
get_config
(self)
src/transformers/optimization_tf.py:176
Method
get_dataset
(self, type_path)
examples/seq2seq/distillation.py:118
Method
get_dataset
(self)
examples/adversarial/utils_hans.py:233
Method
get_decoder
(self)
src/transformers/modeling_encoder_decoder.py:81
Method
get_decoder
(self)
src/transformers/modeling_t5.py:1019
Method
get_decoder
(self)
src/transformers/modeling_tf_t5.py:907
Method
get_decoder
(self)
src/transformers/modeling_tf_t5.py:1049
Method
get_dev_examples
Gets a collection of :class:`InputExample` for the dev set.
src/transformers/data/processors/utils.py:98
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:184
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:226
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:255
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:280
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:323
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:365
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:455
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:497
Method
get_dev_examples
See base class.
src/transformers/data/processors/glue.py:539
Method
get_dev_examples
Returns the evaluation example from the data directory. Args: data_dir: Directory containing the data files used for tra
src/transformers/data/processors/squad.py:535
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
examples/multiple-choice/utils_multiple_choice.py:223
Method
get_dev_examples
See base class.
examples/multiple-choice/utils_multiple_choice.py:248
Method
get_dev_examples
See base class.
examples/multiple-choice/utils_multiple_choice.py:311
Method
get_dev_examples
See base class.
examples/multiple-choice/utils_multiple_choice.py:357
Method
get_emb
(self, emb)
examples/seq2seq/bertabs/modeling_bertabs.py:278
Method
get_encoder
(self)
src/transformers/modeling_bart.py:1064
Method
get_encoder
(self)
src/transformers/modeling_encoder_decoder.py:78
Method
get_encoder
(self)
src/transformers/modeling_t5.py:1016
Method
get_encoder
(self)
src/transformers/modeling_tf_t5.py:904
Method
get_encoder
(self)
src/transformers/modeling_tf_t5.py:1046
Method
get_example_from_tensor_dict
Gets an example from a dict with tensorflow tensors. Args: tensor_dict: Keys and values should match the corresponding Glue
src/transformers/data/processors/utils.py:85
Method
get_example_from_tensor_dict
See base class.
src/transformers/data/processors/glue.py:170
Method
get_example_from_tensor_dict
See base class.
src/transformers/data/processors/glue.py:213
← previous
next →
2,801–2,900 of 4,119, ranked by callers