MCPcopy Create free account

hub / github.com/huggingface/transformers / types & classes

Types & classes939 in github.com/huggingface/transformers

↓ 33 callersClassConfigTester
tests/test_configuration_common.py:22
↓ 21 callersClassInputExample
A single training/test example for simple sequence classification. Args: guid: Unique id for the example. text_a: string. Th
src/transformers/data/processors/utils.py:31
↓ 20 callersClassBertModel
The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of cross-attention is added betwee
src/transformers/modeling_bert.py:627
↓ 20 callersClassHfArgumentParser
This subclass of `argparse.ArgumentParser` uses type hints on dataclasses to generate arguments. The class is designed to play well with
src/transformers/hf_argparser.py:14
↓ 18 callersClassAdamW
Implements Adam algorithm with weight decay fix. Parameters: lr (float): learning rate. Default 1e-3. betas (tuple of 2 floats):
src/transformers/optimization.py:96
↓ 13 callersClassPyTorchBenchmark
src/transformers/benchmark/benchmark.py:55
↓ 12 callersClassPyTorchBenchmarkArguments
src/transformers/benchmark/benchmark_args.py:36
↓ 10 callersClassBartForConditionalGeneration
src/transformers/modeling_bart.py:900
↓ 10 callersClassBasicTokenizer
Runs basic tokenization (punctuation splitting, lower casing, etc.).
src/transformers/tokenization_bert.py:351
↓ 10 callersClassReformerConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.ReformerModel`. It is used to instantiate a
src/transformers/configuration_reformer.py:32
↓ 10 callersClassTensorFlowBenchmark
src/transformers/benchmark/benchmark_tf.py:78
↓ 9 callersClassMobileBertModel
https://arxiv.org/pdf/2004.02984.pdf
src/transformers/modeling_mobilebert.py:724
↓ 9 callersClassReformerModelWithLMHead
src/transformers/modeling_reformer.py:1704
↓ 9 callersClassTFSharedEmbeddings
Construct shared token embeddings.
src/transformers/modeling_tf_utils.py:1616
↓ 9 callersClassTensorFlowBenchmarkArguments
src/transformers/benchmark/benchmark_args_tf.py:33
↓ 8 callersClassBertLMHeadModel
src/transformers/modeling_bert.py:894
↓ 8 callersClassTFBertMainLayer
src/transformers/modeling_tf_bert.py:499
↓ 8 callersClassTFMobileBertMainLayer
src/transformers/modeling_tf_mobilebert.py:631
↓ 8 callersClassXLNetModel
src/transformers/modeling_xlnet.py:632
↓ 7 callersClassAlbertModel
src/transformers/modeling_albert.py:442
↓ 7 callersClassBartConfig
r""" Configuration class for Bart. Parameters are renamed from the fairseq implementation
src/transformers/configuration_bart.py:36
↓ 7 callersClassElectraModel
src/transformers/modeling_electra.py:238
↓ 7 callersClassReformerLayer
src/transformers/modeling_reformer.py:1080
↓ 7 callersClassReformerModel
src/transformers/modeling_reformer.py:1509
↓ 7 callersClassTFAlbertMainLayer
src/transformers/modeling_tf_albert.py:505
↓ 7 callersClassTrainer
Trainer is a simple but feature-complete training and eval loop for PyTorch, optimized for Transformers.
src/transformers/trainer.py:133
↓ 6 callersClassBartModel
src/transformers/modeling_bart.py:808
↓ 6 callersClassBatchEncoding
BatchEncoding hold the output of the encode and batch_encode methods (tokens, attention_masks, etc). This class is derived from a python Dict
src/transformers/tokenization_utils_base.py:129
↓ 6 callersClassDistilBertModel
src/transformers/modeling_distilbert.py:389
↓ 6 callersClassEncoderDecoderModel
r""" :class:`~transformers.EncoderDecoder` is a generic model class that will be instantiated as a transformer architecture with one o
src/transformers/modeling_encoder_decoder.py:29
↓ 6 callersClassGPT2Model
src/transformers/modeling_gpt2.py:349
↓ 6 callersClassHfApi
src/transformers/hf_api.py:98
↓ 6 callersClassLongformerModel
This class overrides :class:`~transformers.RobertaModel` to provide the ability to process long sequences following the selfattention approac
src/transformers/modeling_longformer.py:501
↓ 6 callersClassRobertaModel
This class overrides :class:`~transformers.BertModel`. Please check the superclass for the appropriate documentation alongside usage examples
src/transformers/modeling_roberta.py:143
↓ 6 callersClassSequenceSummary
r""" Compute a single vector summary of a sequence hidden states according to various possibilities: Args of the config class: sum
src/transformers/modeling_utils.py:2020
↓ 6 callersClassT5Model
src/transformers/modeling_t5.py:854
↓ 6 callersClassTFDistilBertMainLayer
src/transformers/modeling_tf_distilbert.py:416
↓ 6 callersClassTFFlaubertMainLayer
src/transformers/modeling_tf_flaubert.py:121
↓ 6 callersClassTFRobertaMainLayer
Same as TFBertMainLayer but uses TFRobertaEmbeddings.
src/transformers/modeling_tf_roberta.py:103
↓ 6 callersClassTFSequenceSummary
r""" Compute a single vector summary of a sequence hidden states according to various possibilities: Args of the config class: sum
src/transformers/modeling_tf_utils.py:1687
↓ 6 callersClassTFXLMMainLayer
src/transformers/modeling_tf_xlm.py:220
↓ 6 callersClassTFXLNetMainLayer
src/transformers/modeling_tf_xlnet.py:370
↓ 6 callersClassXLMModel
src/transformers/modeling_xlm.py:316
↓ 5 callersClassConv1D
src/transformers/modeling_utils.py:1766
↓ 5 callersClassFlaubertModel
src/transformers/modeling_flaubert.py:114
↓ 5 callersClassGlueDataset
This will be superseded by a framework-agnostic approach soon.
src/transformers/data/datasets/glue.py:58
↓ 5 callersClassMecabTokenizer
Runs basic tokenization with MeCab morphological parser.
src/transformers/tokenization_bert_japanese.py:167
↓ 5 callersClassSinusoidalPositionalEmbedding
This module produces sinusoidal positional embeddings of any length.
src/transformers/modeling_bart.py:1250
↓ 5 callersClassTFElectraMainLayer
src/transformers/modeling_tf_electra.py:205
↓ 5 callersClassTFXxxMainLayer
templates/adding_a_new_model/modeling_tf_xxx.py:92
↓ 5 callersClassXxxModel
r""" Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs: **last_hidden_state**: ``torch.Float
templates/adding_a_new_model/modeling_xxx.py:272
↓ 4 callersClassInputExample
A single training/test example for multiple choice Args: example_id: Unique id for the example. question: string. The untoke
examples/multiple-choice/utils_multiple_choice.py:38
↓ 4 callersClassLineByLineTextDataset
This will be superseded by a framework-agnostic approach soon.
src/transformers/data/datasets/language_modeling.py:78
↓ 4 callersClassMaskedBertModel
The `MaskedBertModel` class replicates the :class:`~transformers.BertModel` class and adds specific inputs to compute the adaptive mask on th
examples/movement-pruning/emmental/modeling_bert_masked.py:470
↓ 4 callersClassMaskedLinear
Fully Connected layer with on the fly adaptive mask. If needed, a score matrix is created to store the importance of each associated weight.
examples/movement-pruning/emmental/modules/masked_nn.py:32
↓ 4 callersClassOpenAIGPTModel
src/transformers/modeling_openai.py:336
↓ 4 callersClassSquadV1Processor
src/transformers/data/processors/squad.py:598
↓ 4 callersClassSquadV2Processor
src/transformers/data/processors/squad.py:603
↓ 4 callersClassT5LayerNorm
src/transformers/modeling_t5.py:146
↓ 4 callersClassTFConv1D
src/transformers/modeling_tf_utils.py:1589
↓ 4 callersClassTFT5LayerNorm
src/transformers/modeling_tf_t5.py:58
↓ 4 callersClassTFTrainer
src/transformers/trainer_tf.py:31
↓ 4 callersClassTransfoXLTokenizer
Transformer-XL tokenizer adapted from Vocab class in https://github.com/kimiyoung/transformer-xl This tokenizer inherits from :class:`~trans
src/transformers/tokenization_transfo_xl.py:73
↓ 4 callersClassWordpieceTokenizer
Runs WordPiece tokenization.
src/transformers/tokenization_bert.py:490
↓ 4 callersClassXLNetTokenizer
Constructs an XLNet tokenizer. Based on `SentencePiece <https://github.com/google/sentencepiece>`__ This tokenizer inherits from :class:`~tr
src/transformers/tokenization_xlnet.py:53
↓ 4 callersClass_NoLayerEmbedTokens
this class wraps a the TFSharedEmbeddingTokens layer into a python 'no-keras-layer' class to avoid problem with weight restoring. Also it m
src/transformers/modeling_tf_t5.py:481
↓ 3 callersClassAlbertTokenizer
Constructs an ALBERT tokenizer. Based on `SentencePiece <https://github.com/google/sentencepiece>`__ This tokenizer inherits from :class:`~t
src/transformers/tokenization_albert.py:57
↓ 3 callersClassBertConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.BertModel`. It is used to instantiate an BE
src/transformers/configuration_bert.py:53
↓ 3 callersClassDataCollatorForLanguageModeling
Data collator used for language modeling. - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for
src/transformers/data/data_collator.py:68
↓ 3 callersClassGPT2Config
This is the configuration class to store the configuration of a :class:`~transformers.GPT2Model`. It is used to instantiate an GPT-2
src/transformers/configuration_gpt2.py:35
↓ 3 callersClassGlueDataTrainingArguments
Arguments pertaining to what data we are going to input our model for training and eval. Using `HfArgumentParser` we can turn this class
src/transformers/data/datasets/glue.py:24
↓ 3 callersClassGradientAccumulator
Gradient accumulation utility. When used with a distribution strategy, the accumulator should be called in a replica context. Gradients will b
src/transformers/optimization_tf.py:199
↓ 3 callersClassMemory
`Memory` NamedTuple have a single field `bytes` and you can get a human readable str of the number of mega bytes by calling `__repr__`
src/transformers/benchmark/benchmark_utils.py:137
↓ 3 callersClassOpenAIGPTConfig
This is the configuration class to store the configuration of a :class:`~transformers.OpenAIGPTModel`. It is used to instantiate an G
src/transformers/configuration_openai.py:31
↓ 3 callersClassRobertaConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.RobertaModel`. It is used to instantiate an
src/transformers/configuration_roberta.py:36
↓ 3 callersClassRobertaEmbeddings
Same as BertEmbeddings with a tiny tweak for positional embeddings indexing.
src/transformers/modeling_roberta.py:46
↓ 3 callersClassSquadExample
A single training/test example for the Squad dataset, as loaded from disk. Args: qas_id: The example's unique identifier que
src/transformers/data/processors/squad.py:608
↓ 3 callersClassSquadResult
Constructs a SquadResult which can be used to evaluate a model's output on the SQuAD dataset. Args: unique_id: The unique identifier
src/transformers/data/processors/squad.py:733
↓ 3 callersClassSummarizationDataset
examples/seq2seq/utils.py:79
↓ 3 callersClassT5Config
r""" :class:`~transformers.T5Config` is the configuration class to store the configuration of a `T5Model`. Arguments:
src/transformers/configuration_t5.py:34
↓ 3 callersClassT5ForConditionalGeneration
src/transformers/modeling_t5.py:986
↓ 3 callersClassTFGPT2MainLayer
src/transformers/modeling_tf_gpt2.py:213
↓ 3 callersClassTFGPT2Model
src/transformers/modeling_tf_gpt2.py:489
↓ 3 callersClassTFOpenAIGPTMainLayer
src/transformers/modeling_tf_openai.py:206
↓ 3 callersClassTFT5Model
src/transformers/modeling_tf_t5.py:869
↓ 3 callersClassTextDataset
This will be superseded by a framework-agnostic approach soon.
src/transformers/data/datasets/language_modeling.py:16
↓ 3 callersClassTransfoXLConfig
This is the configuration class to store the configuration of a :class:`~transformers.TransfoXLModel`. It is used to instantiate a Tr
src/transformers/configuration_transfo_xl.py:31
↓ 2 callersClassAlbertConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.AlbertModel`. It is used to instantiate an
src/transformers/configuration_albert.py:33
↓ 2 callersClassAlbertForPreTraining
src/transformers/modeling_albert.py:581
↓ 2 callersClassAlbertMLMHead
src/transformers/modeling_albert.py:700
↓ 2 callersClassBartForSequenceClassification
src/transformers/modeling_bart.py:1075
↓ 2 callersClassBertEncoder
src/transformers/modeling_bert.py:394
↓ 2 callersClassBertForPreTraining
src/transformers/modeling_bert.py:778
↓ 2 callersClassBertLMPredictionHead
src/transformers/modeling_bert.py:490
↓ 2 callersClassBertModelTester
tests/test_modeling_bert.py:42
↓ 2 callersClassBertOnlyMLMHead
src/transformers/modeling_bert.py:510
↓ 2 callersClassCTRLConfig
This is the configuration class to store the configuration of a :class:`~transformers.CTRLModel`. It is used to instantiate an CTRL m
src/transformers/configuration_ctrl.py:28
↓ 2 callersClassCTRLModel
src/transformers/modeling_ctrl.py:298
↓ 2 callersClassCharSpan
Character span in the original string Args: start: index of the first character in the original string end: index of
src/transformers/tokenization_utils_base.py:105
↓ 2 callersClassCharacterTokenizer
Runs Character tokenziation.
src/transformers/tokenization_bert_japanese.py:219
next →1–100 of 939, ranked by callers