MCPcopy Create free account

hub / github.com/cedrickchee/transformers-llama / types & classes

Types & classes9,398 in github.com/cedrickchee/transformers-llama

↓ 835 callersClassOptionalDependencyNotAvailable
Internally used error class for signalling an optional dependency was not found.
src/transformers/utils/import_utils.py:1135
↓ 479 callersClassANY
tests/pipelines/test_pipelines_common.py:70
↓ 276 callersClassConfigTester
tests/test_configuration_common.py:95
↓ 224 callersClassAddedToken
AddedToken represents a token to be added to a Tokenizer An AddedToken can have special options defining the way it should behave.
src/transformers/tokenization_utils_base.py:79
↓ 191 callersClass_LazyModule
Module class that surfaces all objects but only performs associated imports when the objects are requested.
src/transformers/utils/import_utils.py:1075
↓ 146 callersClassBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (`torch.FloatTensor` of shape `
src/transformers/modeling_outputs.py:24
↓ 98 callersClassHfArgumentParser
This subclass of `argparse.ArgumentParser` uses type hints on dataclasses to generate arguments. The class is designed to play well with the
src/transformers/hf_argparser.py:116
↓ 80 callersClassBatchEncoding
Holds the output of the [`~tokenization_utils_base.PreTrainedTokenizerBase.__call__`], [`~tokenization_utils_base.PreTrainedTokenizerBase.enc
src/transformers/tokenization_utils_base.py:163
↓ 78 callersClassBatchFeature
r""" Holds the output of the image processor specific `__call__` methods. This class is derived from a python dictionary and can be used as a
src/transformers/image_processing_utils.py:42
↓ 76 callersClassTFBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (`tf.Tensor` of shape `(batch_s
src/transformers/modeling_tf_outputs.py:24
↓ 70 callersClass_LazyAutoMapping
" A mapping config to object (model or tokenizer for instance) that will load keys and values when it is accessed. Args: - config_ma
src/transformers/models/auto/auto_factory.py:576
↓ 68 callersClassBaseModelOutputWithPastAndCrossAttentions
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (`
src/transformers/modeling_outputs.py:244
↓ 66 callersClassSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when
src/transformers/modeling_outputs.py:896
↓ 60 callersClassTFSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: loss (`tf.Tensor` of shape `(batch_size, )`, *optional*, returned wh
src/transformers/modeling_tf_outputs.py:571
↓ 60 callersClassTrainer
Trainer is a simple but feature-complete training and eval loop for PyTorch, optimized for 🤗 Transformers. Args: model ([`PreTrained
src/transformers/trainer.py:221
↓ 49 callersClassTokenClassifierOutput
Base class for outputs of token classification models. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `l
src/transformers/modeling_outputs.py:1016
↓ 46 callersClassBasicTokenizer
Constructs a BasicTokenizer that will run basic tokenization (punctuation splitting, lower casing, etc.). Args: do_lower_case (`bool
src/transformers/models/bert/tokenization_bert.py:370
↓ 45 callersClassMaskedLMOutput
Base class for masked language models outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` i
src/transformers/modeling_outputs.py:702
↓ 45 callersClassQuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `lab
src/transformers/modeling_outputs.py:1045
↓ 44 callersClassTFQuestionAnsweringModelOutput
Base class for outputs of question answering models. Args: loss (`tf.Tensor` of shape `(batch_size, )`, *optional*, returned when `s
src/transformers/modeling_tf_outputs.py:811
↓ 44 callersClassTFTokenClassifierOutput
Base class for outputs of token classification models. Args: loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of
src/transformers/modeling_tf_outputs.py:782
↓ 42 callersClassTFMaskedLMOutput
Base class for masked language models outputs. Args: loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-mas
src/transformers/modeling_tf_outputs.py:453
↓ 41 callersClassTrainingArguments
TrainingArguments is the subset of the arguments we use in our example scripts **which relate to the training loop itself**. Using [`HfA
src/transformers/training_args.py:148
↓ 37 callersClassBaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (`torch.FloatTensor`
src/transformers/modeling_outputs.py:69
↓ 37 callersClassCaptureLogger
Context manager to capture `logging` streams Args: logger: 'logging` logger object Returns: The captured output is avai
src/transformers/testing_utils.py:940
↓ 36 callersClassCausalLMOutputWithCrossAttentions
Base class for causal language model (or autoregressive) outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, retur
src/transformers/modeling_outputs.py:622
↓ 35 callersClassMultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (`torch.FloatTensor` of shape *(1,)*, *optional*, returned when `labels
src/transformers/modeling_outputs.py:985
↓ 34 callersClassTFMultipleChoiceModelOutput
Base class for outputs of multiple choice models. Args: loss (`tf.Tensor` of shape *(batch_size, )*, *optional*, returned when `labe
src/transformers/modeling_tf_outputs.py:751
↓ 33 callersClassFlaxBaseModelOutput
Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (`jnp.ndarray` of shape `(batch
src/transformers/modeling_flax_outputs.py:23
↓ 31 callersClassDataCollatorForLanguageModeling
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
src/transformers/data/data_collator.py:607
↓ 30 callersClassFlaxBaseModelOutputWithPastAndCrossAttentions
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (`
src/transformers/modeling_flax_outputs.py:159
↓ 29 callersClassConversation
Utility class containing a conversation and its history. This class is meant to be used as an input to the [`ConversationalPipeline`]. The co
src/transformers/pipelines/conversational.py:18
↓ 29 callersClassDataCollatorWithPadding
Data collator that will dynamically pad the inputs received. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]
src/transformers/data/data_collator.py:215
↓ 29 callersClassTFBaseModelOutputWithPastAndCrossAttentions
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (`
src/transformers/modeling_tf_outputs.py:242
↓ 28 callersClassBaseModelOutputWithPoolingAndCrossAttentions
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (`torch.FloatTensor`
src/transformers/modeling_outputs.py:195
↓ 28 callersClassBertTokenizer
r""" Construct a BERT tokenizer. Based on WordPiece. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main met
src/transformers/models/bert/tokenization_bert.py:137
↓ 28 callersClassEsmFoldLinear
A Linear layer with built-in nonstandard initializations. Called just like torch.nn.Linear. Implements the initializers in 1.11.4, plus some
src/transformers/models/esm/modeling_esmfold.py:267
↓ 28 callersClassRotation
A 3D rotation. Depending on how the object is initialized, the rotation is represented by either a rotation matrix or a quaternion, though bo
src/transformers/models/esm/openfold_utils/rigid_utils.py:252
↓ 26 callersClassAlmostAccuracy
tests/trainer/test_trainer.py:166
↓ 26 callersClassTFBaseModelOutputWithPooling
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (`tf.Tensor` of shape
src/transformers/modeling_tf_outputs.py:69
↓ 25 callersClassAdamW
Implements Adam algorithm with weight decay fix as introduced in [Decoupled Weight Decay Regularization](https://arxiv.org/abs/1711.05101).
src/transformers/optimization.py:358
↓ 25 callersClassTFSeq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the num
src/transformers/modeling_tf_outputs.py:482
↓ 23 callersClassContextManagers
Wrapper for `contextlib.ExitStack` which enters a collection of context managers. Adaptation of `ContextManagers` in the `fastcore` library.
src/transformers/utils/generic.py:344
↓ 23 callersClassSeq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned w
src/transformers/modeling_outputs.py:731
↓ 22 callersClassConv1D
src/transformers/utils/dummy_pt_objects.py:7370
↓ 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:30
↓ 21 callersClassRagRetriever
Retriever used to get documents from vector queries. It retrieves the documents embeddings as well as the documents contents, and it formats
src/transformers/models/rag/retrieval_rag.py:323
↓ 20 callersClassBartConfig
r""" This is the configuration class to store the configuration of a [`BartModel`]. It is used to instantiate a BART model according to the sp
src/transformers/models/bart/configuration_bart.py:35
↓ 20 callersClassFlaxCausalLMOutputWithCrossAttentions
Base class for causal language model (or autoregressive) outputs. Args: logits (`jnp.ndarray` of shape `(batch_size, sequence_length
src/transformers/modeling_flax_outputs.py:266
↓ 20 callersClassTFSeq2SeqModelOutput
Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential decoding. Args:
src/transformers/modeling_tf_outputs.py:285
↓ 19 callersClassDataCollatorForTokenClassification
Data collator that will dynamically pad the inputs received, as well as the labels. Args: tokenizer ([`PreTrainedTokenizer`] or [`Pr
src/transformers/data/data_collator.py:266
↓ 19 callersClassRegressionDataset
tests/trainer/test_trainer.py:109
↓ 19 callersClassSeq2SeqModelOutput
Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential decoding. Args:
src/transformers/modeling_outputs.py:424
↓ 18 callersClassEncoderDecoderModel
src/transformers/utils/dummy_pt_objects.py:2452
↓ 18 callersClassLogitsProcessorList
This class can be used to create a list of [`LogitsProcessor`] or [`LogitsWarper`] to subsequently process a `scores` input tensor. This clas
src/transformers/generation/logits_process.py:73
↓ 18 callersClassModelPatterns
Holds the basic information about a new model for the add-new-model-like command. Args: model_name (`str`): The model name.
src/transformers/commands/add_new_model_like.py:41
↓ 18 callersClassQuantAct
Quantizes the given activation. Args: activation_bit (`int`): Bitwidth for the quantized activation. act_range_m
src/transformers/models/ibert/quant_modules.py:114
↓ 18 callersClassRigid
A class representing a rigid transformation. Little more than a wrapper around two objects: a Rotation object and a [*, 3] translation Design
src/transformers/models/esm/openfold_utils/rigid_utils.py:729
↓ 18 callersClassStoppingCriteriaList
src/transformers/generation/stopping_criteria.py:110
↓ 18 callersClassTFCausalLMOutputWithCrossAttentions
Base class for causal language model (or autoregressive) outputs. Args: loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is th
src/transformers/modeling_tf_outputs.py:410
↓ 16 callersClassBertConfig
r""" This is the configuration class to store the configuration of a [`BertModel`] or a [`TFBertModel`]. It is used to instantiate a BERT mode
src/transformers/models/bert/configuration_bert.py:72
↓ 16 callersClassBertModel
src/transformers/utils/dummy_pt_objects.py:911
↓ 16 callersClassTFBaseModelOutputWithPoolingAndCrossAttentions
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (`tf.Tensor` of shape
src/transformers/modeling_tf_outputs.py:125
↓ 16 callersClassWav2Vec2Processor
r""" Constructs a Wav2Vec2 processor which wraps a Wav2Vec2 feature extractor and a Wav2Vec2 CTC tokenizer into a single processor. [`Wav
src/transformers/models/wav2vec2/processing_wav2vec2.py:26
↓ 15 callersClassAttention
Multi-headed attention from 'Attention Is All You Need' paper
src/transformers/models/fsmt/modeling_fsmt.py:856
↓ 15 callersClassImageFeatureExtractionMixin
Mixin that contain utilities for preparing image features.
src/transformers/image_utils.py:287
↓ 14 callersClassEvalPrediction
Evaluation output (always contains labels), to be used to compute metrics. Parameters: predictions (`np.ndarray`): Predictions of th
src/transformers/trainer_utils.py:100
↓ 14 callersClassIndexMap
Index grouping entries within a tensor.
src/transformers/models/tapas/modeling_tf_tapas.py:1715
↓ 14 callersClassIndexMap
Index grouping entries within a tensor.
src/transformers/models/tapas/modeling_tapas.py:1584
↓ 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__`
src/transformers/benchmark/benchmark_utils.py:151
↓ 14 callersClassMobileViTConvLayer
src/transformers/models/mobilevit/modeling_mobilevit.py:88
↓ 14 callersClassModelOutputTest
tests/utils/test_model_output.py:24
↓ 14 callersClassPyTorchBenchmark
src/transformers/benchmark/benchmark.py:50
↓ 14 callersClassRegressionModelConfig
tests/trainer/test_trainer.py:176
↓ 14 callersClassTFMobileViTConvLayer
src/transformers/models/mobilevit/modeling_tf_mobilevit.py:82
↓ 13 callersClassBertModelTester
tests/models/bert/test_modeling_bert.py:47
↓ 13 callersClassDPRConfig
r""" [`DPRConfig`] is the configuration class to store the configuration of a *DPRModel*. This is the configuration class to store the config
src/transformers/models/dpr/configuration_dpr.py:45
↓ 13 callersClassFlaxSeq2SeqLMOutput
Base class for sequence-to-sequence language models outputs. Args: logits (`jnp.ndarray` of shape `(batch_size, sequence_length, con
src/transformers/modeling_flax_outputs.py:336
↓ 13 callersClassPretrainedConfig
r""" Base class for all configuration classes. Handles a few parameters common to all models' configurations as well as methods for loading/do
src/transformers/configuration_utils.py:48
↓ 13 callersClassPyTorchBenchmarkArguments
src/transformers/utils/dummy_pt_objects.py:12
↓ 13 callersClassVisionEncoderDecoderModel
src/transformers/utils/dummy_pt_objects.py:6479
↓ 12 callersClassBaseModelOutputWithNoAttention
Base class for model's outputs, with potential hidden states. Args: last_hidden_state (`torch.FloatTensor` of shape `(batch_size, nu
src/transformers/modeling_outputs.py:50
↓ 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
src/transformers/models/bert/modeling_bert.py:871
↓ 12 callersClassFlaxSequenceClassifierOutput
Base class for outputs of sentence classification models. Args: logits (`jnp.ndarray` of shape `(batch_size, config.num_labels)`):
src/transformers/modeling_flax_outputs.py:420
↓ 12 callersClassImageClassifierOutputWithNoAttention
Base class for outputs of image classification models. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `l
src/transformers/modeling_outputs.py:1206
↓ 12 callersClassMobileNetV2ConvLayer
src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py:288
↓ 12 callersClassSequenceSummary
r""" Compute a single vector summary of a sequence hidden states. Args: config ([`PretrainedConfig`]): The config used by
src/transformers/modeling_utils.py:3447
↓ 12 callersClassTFEncoderDecoderModel
src/transformers/utils/dummy_tf_objects.py:1151
↓ 12 callersClassTensorFlowBenchmark
src/transformers/utils/dummy_tf_objects.py:12
↓ 12 callersClassWav2Vec2FeatureExtractor
src/transformers/models/wav2vec2/modeling_wav2vec2.py:459
↓ 11 callersClassBaseModelOutputWithPast
Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding). Args: last_hidden_state (`
src/transformers/modeling_outputs.py:123
↓ 11 callersClassBaseModelOutputWithPoolingAndNoAttention
Base class for model's outputs that also contains a pooling of the last hidden states. Args: last_hidden_state (`torch.FloatTensor`
src/transformers/modeling_outputs.py:101
↓ 11 callersClassBeamSearchScorer
r""" [`BeamScorer`] implementing standard beam search decoding. Adapted in part from [Facebook's XLM beam search code](https://github.com
src/transformers/generation/beam_search.py:119
↓ 11 callersClassCausalLMOutput
Base class for causal language model (or autoregressive) outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, retur
src/transformers/modeling_outputs.py:557
↓ 11 callersClassCompose
examples/pytorch/semantic-segmentation/run_semantic_segmentation.py:68
↓ 11 callersClassFlaxMaskedLMOutput
Base class for masked language models outputs. Args: logits (`jnp.ndarray` of shape `(batch_size, sequence_length, config.vocab_size
src/transformers/modeling_flax_outputs.py:307
↓ 11 callersClassNormalize
examples/pytorch/semantic-segmentation/run_semantic_segmentation.py:150
↓ 11 callersClassPushToHubCallback
Callback that will save and push the model to the Hub regularly. By default, it pushes once per epoch, but this can be changed with the `save
src/transformers/keras_callbacks.py:268
↓ 11 callersClassReformerConfig
r""" This is the configuration class to store the configuration of a [`ReformerModel`]. It is used to instantiate a Reformer model according t
src/transformers/models/reformer/configuration_reformer.py:32
↓ 11 callersClassRegressionModel
tests/trainer/test_trainer.py:226
next →1–100 of 9,398, ranked by callers