Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/microsoft/LoRA
/ types & classes
Types & classes
3,027 in github.com/microsoft/LoRA
⨍
Functions
11,821
◇
Types & classes
3,027
↳
Endpoints
107
↓ 86 callers
Class
ConfigTester
examples/NLU/tests/test_configuration_common.py:22
↓ 68 callers
Class
TFBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:`tf.Tensor` of shape :obj
examples/NLU/src/transformers/modeling_tf_outputs.py:24
↓ 45 callers
Class
BaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:`torch.FloatTensor` of sh
examples/NLU/src/transformers/modeling_outputs.py:24
↓ 44 callers
Class
AddedToken
AddedToken represents a token to be added to a Tokenizer An AddedToken can have special options defining the way it should behave.
examples/NLU/src/transformers/tokenization_utils_base.py:73
↓ 43 callers
Class
HfArgumentParser
This subclass of `argparse.ArgumentParser` uses type hints on dataclasses to generate arguments. The class is designed to play well with the
examples/NLU/src/transformers/hf_argparser.py:43
↓ 36 callers
Class
Trainer
Trainer is a simple but feature-complete training and eval loop for PyTorch, optimized for 🤗 Transformers. Args: model (:class:`~tra
examples/NLU/src/transformers/trainer.py:169
↓ 26 callers
Class
TFSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(batch_size, )`, `optional`, r
examples/NLU/src/transformers/modeling_tf_outputs.py:349
↓ 25 callers
Class
BasicTokenizer
Constructs a BasicTokenizer that will run basic tokenization (punctuation splitting, lower casing, etc.). Args: do_lower_case (:obj:
examples/NLU/src/transformers/models/bert/tokenization_bert.py:355
↓ 25 callers
Class
SequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, ret
examples/NLU/src/transformers/modeling_outputs.py:572
↓ 22 callers
Class
BatchEncoding
Holds the output of the :meth:`~transformers.tokenization_utils_base.PreTrainedTokenizerBase.encode_plus` and :meth:`~transformers.tokenizati
examples/NLU/src/transformers/tokenization_utils_base.py:156
↓ 22 callers
Class
TFMultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (:obj:`tf.Tensor` of shape `(batch_size, )`, `optional`, returned when
examples/NLU/src/transformers/modeling_tf_outputs.py:430
↓ 22 callers
Class
TFQuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(batch_size, )`, `optional`, return
examples/NLU/src/transformers/modeling_tf_outputs.py:490
↓ 22 callers
Class
TFTokenClassifierOutput
Base class for outputs of token classification models. Args: loss (:obj:`tf.Tensor` of shape :obj:`(n,)`, `optional`, where n is the
examples/NLU/src/transformers/modeling_tf_outputs.py:461
↓ 21 callers
Class
BaseModelOutputWithPastAndCrossAttentions
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (:
examples/NLU/src/transformers/modeling_outputs.py:201
↓ 21 callers
Class
Conversation
Utility class containing a conversation and its history. This class is meant to be used as an input to the :class:`~transformers.Conversation
examples/NLU/src/transformers/pipelines/conversational.py:19
↓ 21 callers
Class
InputExample
A single training/test example for simple sequence classification. Args: guid: Unique id for the example. text_a: string. Th
examples/NLU/src/transformers/data/processors/utils.py:31
↓ 21 callers
Class
TrainingArguments
TrainingArguments is the subset of the arguments we use in our example scripts **which relate to the training loop itself**. Using :clas
examples/NLU/src/transformers/training_args.py:59
↓ 20 callers
Class
LayerNorm
examples/NLG/src/model.py:52
↓ 20 callers
Class
RagRetriever
Retriever used to get documents from vector queries. It retrieves the documents embeddings as well as the documents contents, and it formats
examples/NLU/src/transformers/models/rag/retrieval_rag.py:332
↓ 20 callers
Class
TFMaskedLMOutput
Base class for masked language models outputs. Args: loss (:obj:`tf.Tensor` of shape :obj:`(n,)`, `optional`, where n is the number
examples/NLU/src/transformers/modeling_tf_outputs.py:238
↓ 20 callers
Class
TFWrappedEmbeddings
this class wraps a the TFSharedEmbeddingTokens layer into a python 'no-keras-layer' class to avoid problem with weight restoring. Also it mak
examples/NLU/src/transformers/modeling_tf_utils.py:1608
↓ 19 callers
Class
MaskedLMOutput
Base class for masked language models outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, returned when
examples/NLU/src/transformers/modeling_outputs.py:453
↓ 18 callers
Class
AdamW
Implements Adam algorithm with weight decay fix as introduced in `Decoupled Weight Decay Regularization <https://arxiv.org/abs/1711.05101>`__
examples/NLU/src/transformers/optimization.py:269
↓ 18 callers
Class
QuantAct
Quantizes the given activation. Args: activation_bit (:obj:`int`): Bitwidth for the quantized activation. act_ra
examples/NLU/src/transformers/models/ibert/quant_modules.py:116
↓ 16 callers
Class
BartConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.BartModel`. It is used to instantiate a BART model
examples/NLU/src/transformers/models/bart/configuration_bart.py:30
↓ 16 callers
Class
QuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, returned
examples/NLU/src/transformers/modeling_outputs.py:721
↓ 16 callers
Class
TFSeq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: loss (:obj:`tf.Tensor` of shape :obj:`(n,)`, `optional`, where n
examples/NLU/src/transformers/modeling_tf_outputs.py:267
↓ 16 callers
Class
TFSeq2SeqModelOutput
Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential decoding. Args:
examples/NLU/src/transformers/modeling_tf_outputs.py:120
↓ 16 callers
Class
TFSharedEmbeddings
examples/NLU/src/transformers/utils/dummy_tf_objects.py:33
↓ 16 callers
Class
TokenClassifierOutput
Base class for outputs of token classification models. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, return
examples/NLU/src/transformers/modeling_outputs.py:692
↓ 14 callers
Class
IndexMap
Index grouping entries within a tensor.
examples/NLU/src/transformers/models/tapas/modeling_tapas.py:1493
↓ 14 callers
Class
Memory
`Memory` NamedTuple have a single field `bytes` and you can get a human readable str of the number of mega bytes by calling `__repr__`
examples/NLU/src/transformers/benchmark/benchmark_utils.py:152
↓ 14 callers
Class
PyTorchBenchmark
examples/NLU/src/transformers/benchmark/benchmark.py:51
↓ 13 callers
Class
DPRConfig
r""" :class:`~transformers.DPRConfig` is the configuration class to store the configuration of a `DPRModel`. This is the configuration class
examples/NLU/src/transformers/models/dpr/configuration_dpr.py:33
↓ 13 callers
Class
DataCollatorWithPadding
Data collator that will dynamically pad the inputs received. Args: tokenizer (:class:`~transformers.PreTrainedTokenizer` or :class:`
examples/NLU/src/transformers/data/data_collator.py:86
↓ 13 callers
Class
MultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (:obj:`torch.FloatTensor` of shape `(1,)`, `optional`, returned when :o
examples/NLU/src/transformers/modeling_outputs.py:661
↓ 13 callers
Class
PyTorchBenchmarkArguments
examples/NLU/src/transformers/utils/dummy_pt_objects.py:10
↓ 13 callers
Class
TFBaseModelOutputWithPast
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (:
examples/NLU/src/transformers/modeling_tf_outputs.py:84
↓ 12 callers
Class
BatchFeature
r""" Holds the output of the :meth:`~transformers.SequenceFeatureExtractor.pad` and feature extractor specific ``__call__`` methods. This
examples/NLU/src/transformers/feature_extraction_utils.py:55
↓ 12 callers
Class
BertModel
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
examples/NLU/src/transformers/models/bert/modeling_bert.py:828
↓ 12 callers
Class
CausalLMOutputWithCrossAttentions
Base class for causal language model (or autoregressive) outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `option
examples/NLU/src/transformers/modeling_outputs.py:373
↓ 12 callers
Class
RegressionDataset
examples/NLU/tests/test_trainer.py:66
↓ 12 callers
Class
Seq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`,
examples/NLU/src/transformers/modeling_outputs.py:482
↓ 12 callers
Class
TensorFlowBenchmark
examples/NLU/src/transformers/utils/dummy_tf_objects.py:10
↓ 11 callers
Class
ReformerConfig
r""" This is the configuration class to store the configuration of a :class:`~transformers.ReformerModel`. It is used to instantiate a Reforme
examples/NLU/src/transformers/models/reformer/configuration_reformer.py:30
↓ 11 callers
Class
Seq2SeqModelOutput
Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential decoding. Args:
examples/NLU/src/transformers/modeling_outputs.py:247
↓ 11 callers
Class
StoppingCriteriaList
examples/NLU/src/transformers/generation_stopping_criteria.py:81
↓ 11 callers
Class
TFBaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (:obj:`tf.Tensor` of
examples/NLU/src/transformers/modeling_tf_outputs.py:50
↓ 11 callers
Class
TensorFlowBenchmarkArguments
examples/NLU/src/transformers/utils/dummy_tf_objects.py:5
↓ 10 callers
Class
BasicTokenizer
Constructs a BasicTokenizer that will run basic tokenization (punctuation splitting, lower casing, etc.). Args: do_lower_case (:obj:
examples/NLU/src/transformers/models/tapas/tokenization_tapas.py:1965
↓ 10 callers
Class
BeamSearchScorer
r""" :class:`transformers.BeamScorer` implementing standard beam search decoding. Adapted in part from `Facebook's XLM beam search code <
examples/NLU/src/transformers/generation_beam_search.py:118
↓ 10 callers
Class
Conv1D
examples/NLU/src/transformers/utils/dummy_pt_objects.py:190
↓ 10 callers
Class
IntLayerNorm
Quantized version of :obj:`torch.nn.LayerNorm`. Adds quantization-specific arguments on top of :obj:`torch.nn.LayerNorm`. Args:
examples/NLU/src/transformers/models/ibert/quant_modules.py:434
↓ 10 callers
Class
ModelOutputTest
examples/NLU/tests/test_model_output.py:24
↓ 10 callers
Class
StableDropout
Optimized dropout module for stabilizing the training Args: drop_prob (float): the dropout probabilities
examples/NLU/src/transformers/models/deberta_v2/modeling_deberta_v2.py:173
↓ 10 callers
Class
TFBertMainLayer
examples/NLU/src/transformers/models/bert/modeling_tf_bert.py:574
↓ 9 callers
Class
Attention
Multi-headed attention from 'Attention Is All You Need' paper
examples/NLU/src/transformers/models/fsmt/modeling_fsmt.py:797
↓ 9 callers
Class
BertModel
examples/NLU/src/transformers/utils/dummy_pt_objects.py:565
↓ 9 callers
Class
EncoderDecoderModel
examples/NLU/src/transformers/utils/dummy_pt_objects.py:1123
↓ 9 callers
Class
RegressionModel
examples/NLU/tests/test_trainer.py:150
↓ 9 callers
Class
SequenceSummary
r""" Compute a single vector summary of a sequence hidden states. Args: config (:class:`~transformers.PretrainedConfig`):
examples/NLU/src/transformers/modeling_utils.py:1545
↓ 9 callers
Class
SquadV1Processor
examples/NLU/src/transformers/data/processors/squad.py:686
↓ 8 callers
Class
AlmostAccuracy
examples/NLU/tests/test_trainer.py:118
↓ 8 callers
Class
ClassificationHead
Classification Head for transformer encoders
examples/NLU/examples/research_projects/pplm/pplm_classification_head.py:4
↓ 8 callers
Class
DataCollatorForLanguageModeling
Data collator used for language modeling. Inputs are dynamically padded to the maximum length of a batch if they are not all of the same leng
examples/NLU/src/transformers/data/data_collator.py:300
↓ 8 callers
Class
IntGELU
Quantized version of :obj:`torch.nn.GELU`. Adds quantization-specific arguments on top of :obj:`torch.nn.GELU`. Args: quant_mode (:o
examples/NLU/src/transformers/models/ibert/quant_modules.py:305
↓ 8 callers
Class
IntSoftmax
Quantized version of :obj:`torch.nn.Softmax`. Adds quantization-specific arguments on top of :obj:`torch.nn.Softmax`. Args: outp
examples/NLU/src/transformers/models/ibert/quant_modules.py:362
↓ 8 callers
Class
LogitsProcessorList
examples/NLU/src/transformers/utils/dummy_pt_objects.py:136
↓ 8 callers
Class
MecabTokenizer
Runs basic tokenization with MeCab morphological parser.
examples/NLU/src/transformers/models/bert_japanese/tokenization_bert_japanese.py:197
↓ 8 callers
Class
QuantLinear
Quantized version of :obj:`torch.nn.Linear`. Adds quantization-specific arguments on top of :obj:`torch.nn.Linear`. Args: weight_bit
examples/NLU/src/transformers/models/ibert/quant_modules.py:225
↓ 8 callers
Class
RagConfig
examples/NLU/src/transformers/models/rag/configuration_rag.py:84
↓ 8 callers
Class
TFConv1D
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
examples/NLU/src/transformers/modeling_tf_utils.py:1321
↓ 8 callers
Class
TFMobileBertMainLayer
examples/NLU/src/transformers/models/mobilebert/modeling_tf_mobilebert.py:656
↓ 8 callers
Class
TFSequenceSummary
examples/NLU/src/transformers/utils/dummy_tf_objects.py:28
↓ 7 callers
Class
BartForConditionalGeneration
examples/NLU/src/transformers/utils/dummy_pt_objects.py:439
↓ 7 callers
Class
BaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (:obj:`torch.FloatTen
examples/NLU/src/transformers/modeling_outputs.py:50
↓ 7 callers
Class
BertTokenizer
r""" Construct a BERT tokenizer. Based on WordPiece. This tokenizer inherits from :class:`~transformers.PreTrainedTokenizer` which contains m
examples/NLU/src/transformers/models/bert/tokenization_bert.py:117
↓ 7 callers
Class
HfApi
examples/NLU/src/transformers/hf_api.py:74
↓ 7 callers
Class
MaxLengthCriteria
This class can be used to stop generation whenever the full generated number of tokens exceeds :obj:`max_length`. Keep in mind for decoder-on
examples/NLU/src/transformers/generation_stopping_criteria.py:41
↓ 7 callers
Class
MobileBertModel
https://arxiv.org/pdf/2004.02984.pdf
examples/NLU/src/transformers/models/mobilebert/modeling_mobilebert.py:794
↓ 7 callers
Class
Seq2SeqDataset
A dataset that calls prepare_seq2seq_batch.
examples/NLU/examples/legacy/seq2seq/utils.py:255
↓ 7 callers
Class
SequentialDistributedSampler
Distributed Sampler that subsamples indices sequentially, making it easier to collate all results at the end. Even though we only use this s
examples/NLU/src/transformers/trainer_pt_utils.py:213
↓ 7 callers
Class
StableDropout
Optimized dropout module for stabilizing the training Args: drop_prob (float): the dropout probabilities
examples/NLU/src/transformers/models/deberta/modeling_deberta.py:166
↓ 7 callers
Class
T5Model
examples/NLU/src/transformers/models/t5/modeling_t5.py:1183
↓ 7 callers
Class
TFAlbertMainLayer
examples/NLU/src/transformers/models/albert/modeling_tf_albert.py:505
↓ 7 callers
Class
TFElectraMainLayer
examples/NLU/src/transformers/models/electra/modeling_tf_electra.py:475
↓ 6 callers
Class
AlbertModel
examples/NLU/src/transformers/models/albert/modeling_albert.py:615
↓ 6 callers
Class
ConvBertModel
examples/NLU/src/transformers/models/convbert/modeling_convbert.py:748
↓ 6 callers
Class
Dataset
examples/NLU/examples/research_projects/pplm/run_pplm_discrim_train.py:84
↓ 6 callers
Class
DebertaV2Model
examples/NLU/src/transformers/models/deberta_v2/modeling_deberta_v2.py:1015
↓ 6 callers
Class
ElectraModel
examples/NLU/src/transformers/models/electra/modeling_electra.py:787
↓ 6 callers
Class
FlaubertModel
examples/NLU/src/transformers/models/flaubert/modeling_flaubert.py:135
↓ 6 callers
Class
GPT2Config
examples/NLG/src/model.py:297
↓ 6 callers
Class
MaskedLinear
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/NLU/examples/research_projects/movement-pruning/emmental/modules/masked_nn.py:32
↓ 6 callers
Class
ProductIndexMap
The product of two indices.
examples/NLU/src/transformers/models/tapas/modeling_tapas.py:1519
↓ 6 callers
Class
ReformerForMaskedLM
examples/NLU/src/transformers/utils/dummy_pt_objects.py:2030
↓ 6 callers
Class
ReformerLayer
examples/NLU/src/transformers/utils/dummy_pt_objects.py:2057
↓ 6 callers
Class
ReformerModel
examples/NLU/src/transformers/utils/dummy_pt_objects.py:2062
↓ 6 callers
Class
ReformerModelWithLMHead
examples/NLU/src/transformers/utils/dummy_pt_objects.py:2071
↓ 6 callers
Class
RobertaModel
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
examples/NLU/src/transformers/models/roberta/modeling_roberta.py:720
next →
1–100 of 3,027, ranked by callers