Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cedrickchee/transformers-llama
/ types & classes
Types & classes
9,398 in github.com/cedrickchee/transformers-llama
⨍
Functions
36,568
◇
Types & classes
9,398
↳
Endpoints
539
↓ 835 callers
Class
OptionalDependencyNotAvailable
Internally used error class for signalling an optional dependency was not found.
src/transformers/utils/import_utils.py:1135
↓ 479 callers
Class
ANY
tests/pipelines/test_pipelines_common.py:70
↓ 276 callers
Class
ConfigTester
tests/test_configuration_common.py:95
↓ 224 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.
src/transformers/tokenization_utils_base.py:79
↓ 191 callers
Class
_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 callers
Class
BaseModelOutput
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 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
src/transformers/hf_argparser.py:116
↓ 80 callers
Class
BatchEncoding
Holds the output of the [`~tokenization_utils_base.PreTrainedTokenizerBase.__call__`], [`~tokenization_utils_base.PreTrainedTokenizerBase.enc
src/transformers/tokenization_utils_base.py:163
↓ 78 callers
Class
BatchFeature
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 callers
Class
TFBaseModelOutput
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 callers
Class
_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 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 (`
src/transformers/modeling_outputs.py:244
↓ 66 callers
Class
SequenceClassifierOutput
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 callers
Class
TFSequenceClassifierOutput
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 callers
Class
Trainer
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 callers
Class
TokenClassifierOutput
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 callers
Class
BasicTokenizer
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 callers
Class
MaskedLMOutput
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 callers
Class
QuestionAnsweringModelOutput
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 callers
Class
TFQuestionAnsweringModelOutput
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 callers
Class
TFTokenClassifierOutput
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 callers
Class
TFMaskedLMOutput
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 callers
Class
TrainingArguments
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 callers
Class
BaseModelOutputWithPooling
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 callers
Class
CaptureLogger
Context manager to capture `logging` streams Args: logger: 'logging` logger object Returns: The captured output is avai
src/transformers/testing_utils.py:940
↓ 36 callers
Class
CausalLMOutputWithCrossAttentions
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 callers
Class
MultipleChoiceModelOutput
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 callers
Class
TFMultipleChoiceModelOutput
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 callers
Class
FlaxBaseModelOutput
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 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
src/transformers/data/data_collator.py:607
↓ 30 callers
Class
FlaxBaseModelOutputWithPastAndCrossAttentions
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 callers
Class
Conversation
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 callers
Class
DataCollatorWithPadding
Data collator that will dynamically pad the inputs received. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]
src/transformers/data/data_collator.py:215
↓ 29 callers
Class
TFBaseModelOutputWithPastAndCrossAttentions
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 callers
Class
BaseModelOutputWithPoolingAndCrossAttentions
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 callers
Class
BertTokenizer
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 callers
Class
EsmFoldLinear
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 callers
Class
Rotation
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 callers
Class
AlmostAccuracy
tests/trainer/test_trainer.py:166
↓ 26 callers
Class
TFBaseModelOutputWithPooling
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 callers
Class
AdamW
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 callers
Class
TFSeq2SeqLMOutput
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 callers
Class
ContextManagers
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 callers
Class
Seq2SeqLMOutput
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 callers
Class
Conv1D
src/transformers/utils/dummy_pt_objects.py:7370
↓ 21 callers
Class
InputExample
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 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
src/transformers/models/rag/retrieval_rag.py:323
↓ 20 callers
Class
BartConfig
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 callers
Class
FlaxCausalLMOutputWithCrossAttentions
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 callers
Class
TFSeq2SeqModelOutput
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 callers
Class
DataCollatorForTokenClassification
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 callers
Class
RegressionDataset
tests/trainer/test_trainer.py:109
↓ 19 callers
Class
Seq2SeqModelOutput
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 callers
Class
EncoderDecoderModel
src/transformers/utils/dummy_pt_objects.py:2452
↓ 18 callers
Class
LogitsProcessorList
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 callers
Class
ModelPatterns
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 callers
Class
QuantAct
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 callers
Class
Rigid
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 callers
Class
StoppingCriteriaList
src/transformers/generation/stopping_criteria.py:110
↓ 18 callers
Class
TFCausalLMOutputWithCrossAttentions
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 callers
Class
BertConfig
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 callers
Class
BertModel
src/transformers/utils/dummy_pt_objects.py:911
↓ 16 callers
Class
TFBaseModelOutputWithPoolingAndCrossAttentions
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 callers
Class
Wav2Vec2Processor
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 callers
Class
Attention
Multi-headed attention from 'Attention Is All You Need' paper
src/transformers/models/fsmt/modeling_fsmt.py:856
↓ 15 callers
Class
ImageFeatureExtractionMixin
Mixin that contain utilities for preparing image features.
src/transformers/image_utils.py:287
↓ 14 callers
Class
EvalPrediction
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 callers
Class
IndexMap
Index grouping entries within a tensor.
src/transformers/models/tapas/modeling_tf_tapas.py:1715
↓ 14 callers
Class
IndexMap
Index grouping entries within a tensor.
src/transformers/models/tapas/modeling_tapas.py:1584
↓ 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__`
src/transformers/benchmark/benchmark_utils.py:151
↓ 14 callers
Class
MobileViTConvLayer
src/transformers/models/mobilevit/modeling_mobilevit.py:88
↓ 14 callers
Class
ModelOutputTest
tests/utils/test_model_output.py:24
↓ 14 callers
Class
PyTorchBenchmark
src/transformers/benchmark/benchmark.py:50
↓ 14 callers
Class
RegressionModelConfig
tests/trainer/test_trainer.py:176
↓ 14 callers
Class
TFMobileViTConvLayer
src/transformers/models/mobilevit/modeling_tf_mobilevit.py:82
↓ 13 callers
Class
BertModelTester
tests/models/bert/test_modeling_bert.py:47
↓ 13 callers
Class
DPRConfig
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 callers
Class
FlaxSeq2SeqLMOutput
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 callers
Class
PretrainedConfig
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 callers
Class
PyTorchBenchmarkArguments
src/transformers/utils/dummy_pt_objects.py:12
↓ 13 callers
Class
VisionEncoderDecoderModel
src/transformers/utils/dummy_pt_objects.py:6479
↓ 12 callers
Class
BaseModelOutputWithNoAttention
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 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
src/transformers/models/bert/modeling_bert.py:871
↓ 12 callers
Class
FlaxSequenceClassifierOutput
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 callers
Class
ImageClassifierOutputWithNoAttention
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 callers
Class
MobileNetV2ConvLayer
src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py:288
↓ 12 callers
Class
SequenceSummary
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 callers
Class
TFEncoderDecoderModel
src/transformers/utils/dummy_tf_objects.py:1151
↓ 12 callers
Class
TensorFlowBenchmark
src/transformers/utils/dummy_tf_objects.py:12
↓ 12 callers
Class
Wav2Vec2FeatureExtractor
src/transformers/models/wav2vec2/modeling_wav2vec2.py:459
↓ 11 callers
Class
BaseModelOutputWithPast
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 callers
Class
BaseModelOutputWithPoolingAndNoAttention
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 callers
Class
BeamSearchScorer
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 callers
Class
CausalLMOutput
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 callers
Class
Compose
examples/pytorch/semantic-segmentation/run_semantic_segmentation.py:68
↓ 11 callers
Class
FlaxMaskedLMOutput
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 callers
Class
Normalize
examples/pytorch/semantic-segmentation/run_semantic_segmentation.py:150
↓ 11 callers
Class
PushToHubCallback
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 callers
Class
ReformerConfig
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 callers
Class
RegressionModel
tests/trainer/test_trainer.py:226
next →
1–100 of 9,398, ranked by callers