MCPcopy Create free account

hub / github.com/XiangLi1999/PrefixTuning / types & classes

Types & classes1,052 in github.com/XiangLi1999/PrefixTuning

↓ 21 callersClassBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:`torch.FloatTensor` o
transformers/src/transformers/modeling_outputs.py:10
↓ 21 callersClassInputExample
A single training/test example for simple sequence classification. Args: guid: Unique id for the example. text_a: string. Th
transformers/src/transformers/data/processors/utils.py:31
↓ 17 callersClassConv1D
1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2). Basically works like a linear layer but the wei
transformers/src/transformers/modeling_utils.py:1073
↓ 14 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__` -
transformers/src/transformers/benchmark/benchmark_utils.py:137
↓ 13 callersClassTFBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:`tf.Tensor` of shape
transformers/src/transformers/modeling_tf_outputs.py:10
↓ 12 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
transformers/src/transformers/modeling_bert.py:712
↓ 11 callersClassMaskedLMOutput
Base class for masked language models outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, returned w
transformers/src/transformers/modeling_outputs.py:221
↓ 11 callersClassSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`,
transformers/src/transformers/modeling_outputs.py:331
↓ 10 callersClassQuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, retu
transformers/src/transformers/modeling_outputs.py:472
↓ 10 callersClassTokenClassifierOutput
Base class for outputs of token classification models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, re
transformers/src/transformers/modeling_outputs.py:443
↓ 9 callersClassBatchEncoding
Holds the output of the :meth:`~transformers.tokenization_utils_base.PreTrainedTokenizerBase.encode_plus` and :meth:`~transformers.tokenizati
transformers/src/transformers/tokenization_utils_base.py:148
↓ 9 callersClassMultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (:obj:`torch.FloatTensor` of shape `(1,)`, `optional`, returned whe
transformers/src/transformers/modeling_outputs.py:412
↓ 9 callersClassTFBertMainLayer
transformers/src/transformers/modeling_tf_bert.py:508
↓ 9 callersClassTFQuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(1,)`, `optional`, returned whe
transformers/src/transformers/modeling_tf_outputs.py:473
↓ 9 callersClassTFSharedEmbeddings
r""" Construct shared token embeddings. The weights of the embedding layer is usually shared with the weights of the linear decoder when doin
transformers/src/transformers/modeling_tf_utils.py:713
↓ 8 callersClassBaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (:obj:`torch.Floa
transformers/src/transformers/modeling_outputs.py:36
↓ 8 callersClassSequenceSummary
r""" Compute a single vector summary of a sequence hidden states. Args: config (:class:`~transformers.PretrainedConfig`):
transformers/src/transformers/modeling_utils.py:1413
↓ 8 callersClassTFConv1D
1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2). Basically works like a linear layer but the wei
transformers/src/transformers/modeling_tf_utils.py:673
↓ 8 callersClassTFMaskedLMOutput
Base class for masked language models outputs. Args: loss (:obj:`tf.Tensor` of shape :obj:`(1,)`, `optional`, returned when :obj
transformers/src/transformers/modeling_tf_outputs.py:225
↓ 8 callersClassTFMobileBertMainLayer
transformers/src/transformers/modeling_tf_mobilebert.py:679
↓ 8 callersClassTFMultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (:obj:`tf.Tensor` of shape `(1,)`, `optional`, returned when :obj:`
transformers/src/transformers/modeling_tf_outputs.py:413
↓ 8 callersClassTFSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(1,)`, `optional`, returne
transformers/src/transformers/modeling_tf_outputs.py:332
↓ 8 callersClassTFTokenClassifierOutput
Base class for outputs of token classification models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(1,)`, `optional`, returned w
transformers/src/transformers/modeling_tf_outputs.py:444
↓ 7 callersClassBaseModelOutputWithPast
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_stat
transformers/src/transformers/modeling_outputs.py:68
↓ 7 callersClassMobileBertModel
https://arxiv.org/pdf/2004.02984.pdf
transformers/src/transformers/modeling_mobilebert.py:812
↓ 7 callersClassTFAlbertMainLayer
transformers/src/transformers/modeling_tf_albert.py:466
↓ 7 callersClassTFElectraMainLayer
transformers/src/transformers/modeling_tf_electra.py:450
↓ 7 callersClassTFSequenceSummary
Compute a single vector summary of a sequence hidden states. Args: config (:class:`~transformers.PretrainedConfig`): The
transformers/src/transformers/modeling_tf_utils.py:812
↓ 6 callersClassAlbertModel
transformers/src/transformers/modeling_albert.py:584
↓ 6 callersClassElectraModel
transformers/src/transformers/modeling_electra.py:670
↓ 6 callersClassFlaubertModel
transformers/src/transformers/modeling_flaubert.py:135
↓ 6 callersClassRobertaModel
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
transformers/src/transformers/modeling_roberta.py:551
↓ 6 callersClassTFDistilBertMainLayer
transformers/src/transformers/modeling_tf_distilbert.py:395
↓ 6 callersClassTFFlaubertMainLayer
transformers/src/transformers/modeling_tf_flaubert.py:346
↓ 6 callersClassTFRobertaMainLayer
transformers/src/transformers/modeling_tf_roberta.py:452
↓ 6 callersClassTFXLMMainLayer
transformers/src/transformers/modeling_tf_xlm.py:228
↓ 6 callersClassTFXLNetMainLayer
transformers/src/transformers/modeling_tf_xlnet.py:417
↓ 6 callersClassXLMModel
transformers/src/transformers/modeling_xlm.py:402
↓ 6 callersClassXLNetModel
transformers/src/transformers/modeling_xlnet.py:935
↓ 5 callersClassAdamW
Implements Adam algorithm with weight decay fix as introduced in `Decoupled Weight Decay Regularization <https://arxiv.org/abs/1711.05101>`__
transformers/src/transformers/optimization.py:219
↓ 5 callersClassBasicTokenizer
Constructs a BasicTokenizer that will run basic tokenization (punctuation splitting, lower casing, etc.). Args: do_lower_case (:obj:
transformers/src/transformers/tokenization_bert.py:359
↓ 5 callersClassCausalLMOutputWithPast
Base class for causal language model (or autoregressive) outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `op
transformers/src/transformers/modeling_outputs.py:185
↓ 5 callersClassDistilBertModel
transformers/src/transformers/modeling_distilbert.py:433
↓ 5 callersClassLongformerModel
This class copied code from :class:`~transformers.RobertaModel` and overwrote standard self-attention with longformer self-attention to provi
transformers/src/transformers/modeling_longformer.py:1067
↓ 5 callersClassTFBaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (:obj:`tf.Tensor`
transformers/src/transformers/modeling_tf_outputs.py:36
↓ 5 callersClassTFFunnelMainLayer
Base model with decoder
transformers/src/transformers/modeling_tf_funnel.py:843
↓ 5 callersClassTrainOutput
transformers/src/transformers/trainer_utils.py:59
↓ 4 callersClassBartModel
transformers/src/transformers/modeling_bart.py:1201
↓ 4 callersClassCausalLMOutput
Base class for causal language model (or autoregressive) outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `op
transformers/src/transformers/modeling_outputs.py:156
↓ 4 callersClassEvalPrediction
Evaluation output (always contains labels), to be used to compute metrics. Parameters: predictions (:obj:`np.ndarray`): Predictions
transformers/src/transformers/trainer_utils.py:40
↓ 4 callersClassFunnelModel
transformers/src/transformers/modeling_funnel.py:967
↓ 4 callersClassIdentity
r"""A placeholder identity operator that is argument-insensitive.
transformers/src/transformers/modeling_utils.py:53
↓ 4 callersClassPredictionOutput
transformers/src/transformers/trainer_utils.py:53
↓ 4 callersClassReformerModel
transformers/src/transformers/modeling_reformer.py:1979
↓ 4 callersClassSeq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optiona
transformers/src/transformers/modeling_outputs.py:250
↓ 4 callersClassSquadExample
A single training/test example for the Squad dataset, as loaded from disk. Args: qas_id: The example's unique identifier que
transformers/src/transformers/data/processors/squad.py:672
↓ 4 callersClassT5LayerNorm
transformers/src/transformers/modeling_t5.py:156
↓ 4 callersClassT5Stack
transformers/src/transformers/modeling_t5.py:644
↓ 4 callersClassTFT5LayerNorm
transformers/src/transformers/modeling_tf_t5.py:68
↓ 4 callersClassTFT5MainLayer
transformers/src/transformers/modeling_tf_t5.py:540
↓ 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 mak
transformers/src/transformers/modeling_tf_t5.py:505
↓ 3 callersClassAdapter
transformers/src/transformers/modeling_gpt2_adapter.py:261
↓ 3 callersClassAttention
Multi-headed attention from 'Attention Is All You Need' paper
transformers/src/transformers/modeling_bart.py:702
↓ 3 callersClassAttention
Multi-headed attention from 'Attention Is All You Need' paper
transformers/src/transformers/modeling_fsmt.py:722
↓ 3 callersClassDPRConfig
r""" :class:`~transformers.DPRConfig` is the configuration class to store the configuration of a `DPRModel`. This is the configuration cl
transformers/src/transformers/configuration_dpr.py:30
↓ 3 callersClassDPREncoder
transformers/src/transformers/modeling_dpr.py:143
↓ 3 callersClassDataCollatorForKeywordLanguageModeling
Data collator used for language modeling. - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for
transformers/src/transformers/data/data_collator.py:1097
↓ 3 callersClassDataCollatorWithPadding
Data collator that will dynamically pad the inputs received. Args: tokenizer (:class:`~transformers.PreTrainedTokenizer` or :class:`
transformers/src/transformers/data/data_collator.py:71
↓ 3 callersClassGPT2Model
transformers/src/transformers/modeling_gpt2.py:491
↓ 3 callersClassHPSearchBackend
transformers/src/transformers/trainer_utils.py:134
↓ 3 callersClassLxmertIntermediate
transformers/src/transformers/modeling_lxmert.py:429
↓ 3 callersClassLxmertOutput
transformers/src/transformers/modeling_lxmert.py:441
↓ 3 callersClassLxmertSelfAttentionLayer
transformers/src/transformers/modeling_lxmert.py:408
↓ 3 callersClassMemoryState
`MemoryState` are namedtuples listing frame + CPU/GPU memory with the following fields: - `frame` (`Frame`): the current frame (see above) -
transformers/src/transformers/benchmark/benchmark_utils.py:149
↓ 3 callersClassOpenAIGPTModel
transformers/src/transformers/modeling_openai.py:405
↓ 3 callersClassPipelineException
Raised by a :class:`~transformers.Pipeline` when handling __call__. Args: task (:obj:`str`): The task of the pipeline. model
transformers/src/transformers/pipelines.py:113
↓ 3 callersClassSeq2SeqModelOutput
Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential decoding. Args:
transformers/src/transformers/modeling_outputs.py:104
↓ 3 callersClassTFBertMLMHead
transformers/src/transformers/modeling_tf_bert.py:481
↓ 3 callersClassTFFunnelBaseLayer
Base model without decoder
transformers/src/transformers/modeling_tf_funnel.py:752
↓ 3 callersClassTFGPT2MainLayer
transformers/src/transformers/modeling_tf_gpt2.py:207
↓ 3 callersClassTFLongformerMainLayer
transformers/src/transformers/modeling_tf_longformer.py:1225
↓ 3 callersClassTFLxmertIntermediate
transformers/src/transformers/modeling_tf_lxmert.py:361
↓ 3 callersClassTFLxmertOutput
transformers/src/transformers/modeling_tf_lxmert.py:380
↓ 3 callersClassTFLxmertSelfAttentionLayer
transformers/src/transformers/modeling_tf_lxmert.py:417
↓ 3 callersClassTFOpenAIGPTMainLayer
transformers/src/transformers/modeling_tf_openai.py:190
↓ 3 callersClassTrainingArguments
TrainingArguments is the subset of the arguments we use in our example scripts **which relate to the training loop itself**. Using :clas
transformers/src/transformers/training_args.py:36
↓ 3 callersClassTruncationStrategy
Possible values for the ``truncation`` argument in :meth:`PreTrainedTokenizerBase.__call__`. Useful for tab-completion in an IDE.
transformers/src/transformers/tokenization_utils_base.py:88
↓ 2 callersClassAdafactor
AdaFactor pytorch implementation can be used as a drop in replacement for Adam original fairseq code: https://github.com/pytorch/fairseq/blob
transformers/src/transformers/optimization.py:321
↓ 2 callersClassAlbertMLMHead
transformers/src/transformers/modeling_albert.py:824
↓ 2 callersClassAttention
transformers/src/transformers/modeling_gpt2.py:120
↓ 2 callersClassAttention
transformers/src/transformers/modeling_gpt2_adapter.py:120
↓ 2 callersClassBartForConditionalGeneration
transformers/src/transformers/modeling_bart.py:1355
↓ 2 callersClassBertAttention
transformers/src/transformers/modeling_bert.py:299
↓ 2 callersClassBertEncoder
transformers/src/transformers/modeling_bert.py:434
↓ 2 callersClassBertGenerationEncoder
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
transformers/src/transformers/modeling_bert_generation.py:255
↓ 2 callersClassBertLMPredictionHead
transformers/src/transformers/modeling_bert.py:530
↓ 2 callersClassBertOnlyMLMHead
transformers/src/transformers/modeling_bert.py:550
↓ 2 callersClassBestRun
The best run found by an hyperparameter search (see :class:`~transformers.Trainer.hyperparameter_search`). Parameters: run_id (:obj:
transformers/src/transformers/trainer_utils.py:73
↓ 2 callersClassBottleneckLayer
transformers/src/transformers/modeling_mobilebert.py:410
↓ 2 callersClassCharSpan
Character span in the original string. Args: start (:obj:`int`): Index of the first character in the original string. end (:
transformers/src/transformers/tokenization_utils_base.py:122
next →1–100 of 1,052, ranked by callers