text
stringlengths
5
58.6k
source
stringclasses
470 values
url
stringlengths
49
167
source_section
stringlengths
0
90
file_type
stringclasses
1 value
id
stringlengths
3
6
[[autodoc]] modeling_flax_outputs.FlaxSeq2SeqLMOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxseq2seqlmoutput
#flaxseq2seqlmoutput
.md
458_57
[[autodoc]] modeling_flax_outputs.FlaxNextSentencePredictorOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxnextsentencepredictoroutput
#flaxnextsentencepredictoroutput
.md
458_58
[[autodoc]] modeling_flax_outputs.FlaxSequenceClassifierOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxsequenceclassifieroutput
#flaxsequenceclassifieroutput
.md
458_59
[[autodoc]] modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxseq2seqsequenceclassifieroutput
#flaxseq2seqsequenceclassifieroutput
.md
458_60
[[autodoc]] modeling_flax_outputs.FlaxMultipleChoiceModelOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxmultiplechoicemodeloutput
#flaxmultiplechoicemodeloutput
.md
458_61
[[autodoc]] modeling_flax_outputs.FlaxTokenClassifierOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxtokenclassifieroutput
#flaxtokenclassifieroutput
.md
458_62
[[autodoc]] modeling_flax_outputs.FlaxQuestionAnsweringModelOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxquestionansweringmodeloutput
#flaxquestionansweringmodeloutput
.md
458_63
[[autodoc]] modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/output.md
https://huggingface.co/docs/transformers/en/main_classes/output/#flaxseq2seqquestionansweringmodeloutput
#flaxseq2seqquestionansweringmodeloutput
.md
458_64
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/
.md
459_0
Processors can mean two different things in the Transformers library: - the objects that pre-process inputs for multi-modal models such as [Wav2Vec2](../model_doc/wav2vec2) (speech and text) or [CLIP](../model_doc/clip) (text and vision) - deprecated objects that were used in older versions of the library to preprocess...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#processors
#processors
.md
459_1
Any multi-modal model will require an object to encode or decode the data that groups several modalities (among text, vision and audio). This is handled by objects called processors, which group together two or more processing objects such as tokenizers (for the text modality), image processors (for vision) and feature...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#multi-modal-processors
#multi-modal-processors
.md
459_2
All processors follow the same architecture which is that of the [`~data.processors.utils.DataProcessor`]. The processor returns a list of [`~data.processors.utils.InputExample`]. These [`~data.processors.utils.InputExample`] can be converted to [`~data.processors.utils.InputFeatures`] in order to be fed to the model. ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#deprecated-processors
#deprecated-processors
.md
459_3
[General Language Understanding Evaluation (GLUE)](https://gluebenchmark.com/) is a benchmark that evaluates the performance of models across a diverse set of existing NLU tasks. It was released together with the paper [GLUE: A multi-task benchmark and analysis platform for natural language understanding](https://openr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#glue
#glue
.md
459_4
[The Cross-Lingual NLI Corpus (XNLI)](https://www.nyu.edu/projects/bowman/xnli/) is a benchmark that evaluates the quality of cross-lingual text representations. XNLI is crowd-sourced dataset based on [*MultiNLI*](http://www.nyu.edu/projects/bowman/multinli/): pairs of text are labeled with textual entailment annotatio...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#xnli
#xnli
.md
459_5
[The Stanford Question Answering Dataset (SQuAD)](https://rajpurkar.github.io/SQuAD-explorer//) is a benchmark that evaluates the performance of models on question answering. Two versions are available, v1.1 and v2.0. The first version (v1.1) was released together with the paper [SQuAD: 100,000+ Questions for Machine C...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#squad
#squad
.md
459_6
Those processors are: - [`~data.processors.utils.SquadV1Processor`] - [`~data.processors.utils.SquadV2Processor`] They both inherit from the abstract class [`~data.processors.utils.SquadProcessor`] data.processors.squad.SquadProcessor Processor for the SQuAD data set. overridden by SquadV1Processor and SquadV2P...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#processors
#processors
.md
459_7
Here is an example using the processors as well as the conversion method using data files: ```python # Loading a V2 processor processor = SquadV2Processor() examples = processor.get_dev_examples(squad_v2_data_dir) # Loading a V1 processor processor = SquadV1Processor() examples = processor.get_dev_examples(squad_v1_...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/processors.md
https://huggingface.co/docs/transformers/en/main_classes/processors/#example-usage
#example-usage
.md
459_8
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/
.md
460_0
The [`Trainer`] class provides an API for feature-complete training in PyTorch, and it supports distributed training on multiple GPUs/TPUs, mixed precision for [NVIDIA GPUs](https://nvidia.github.io/apex/), [AMD GPUs](https://rocm.docs.amd.com/en/latest/rocm.html), and [`torch.amp`](https://pytorch.org/docs/stable/amp....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/#trainer
#trainer
.md
460_1
Trainer is a simple but feature-complete training and eval loop for PyTorch, optimized for 🤗 Transformers. Args: model ([`PreTrainedModel`] or `torch.nn.Module`, *optional*): The model to train, evaluate or use for predictions. If not provided, a `model_init` must be passed. <Tip> [`Trainer`] is optimized to wor...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/#trainerapi-reference
#trainerapi-reference
.md
460_2
Seq2SeqTrainer - evaluate - predict
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/#seq2seqtrainer
#seq2seqtrainer
.md
460_3
TrainingArguments is the subset of the arguments we use in our example scripts **which relate to the training loop itself**. Using [`HfArgumentParser`] we can turn this class into [argparse](https://docs.python.org/3/library/argparse#module-argparse) arguments that can be specified on the command line. Parameters: ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/#trainingarguments
#trainingarguments
.md
460_4
TrainingArguments is the subset of the arguments we use in our example scripts **which relate to the training loop itself**. Using [`HfArgumentParser`] we can turn this class into [argparse](https://docs.python.org/3/library/argparse#module-argparse) arguments that can be specified on the command line. Parameters: ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/trainer.md
https://huggingface.co/docs/transformers/en/main_classes/trainer/#seq2seqtrainingarguments
#seq2seqtrainingarguments
.md
460_5
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/
.md
461_0
Data collators are objects that will form a batch by using a list of dataset elements as input. These elements are of the same type as the elements of `train_dataset` or `eval_dataset`. To be able to build batches, data collators may apply some processing (like padding). Some of them (like [`DataCollatorForLanguageMo...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#data-collator
#data-collator
.md
461_1
data.data_collator.default_data_collator Very simple data collator that simply collates batches of dict-like objects and performs special handling for potential keys named: - `label`: handles a single value (int or float) per object - `label_ids`: handles a list of values per object Does not do any additional pre...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#default-data-collator
#default-data-collator
.md
461_2
data.data_collator.DefaultDataCollator Very simple data collator that simply collates batches of dict-like objects and performs special handling for potential keys named: - `label`: handles a single value (int or float) per object - `label_ids`: handles a list of values per object Does not do any additional prepr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#defaultdatacollator
#defaultdatacollator
.md
461_3
data.data_collator.DataCollatorWithPadding Data collator that will dynamically pad the inputs received. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]): The tokenizer used for encoding the data. padding (`bool`, `str` or [`~utils.PaddingStrategy`], *optional*, defaults to `True`): Select a ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorwithpadding
#datacollatorwithpadding
.md
461_4
data.data_collator.DataCollatorForTokenClassification Data collator that will dynamically pad the inputs received, as well as the labels. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]): The tokenizer used for encoding the data. padding (`bool`, `str` or [`~utils.PaddingStrategy`], *optiona...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorfortokenclassification
#datacollatorfortokenclassification
.md
461_5
data.data_collator.DataCollatorForSeq2Seq Data collator that will dynamically pad the inputs received, as well as the labels. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]): The tokenizer used for encoding the data. model ([`PreTrainedModel`], *optional*): The model that is being trained. ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorforseq2seq
#datacollatorforseq2seq
.md
461_6
data.data_collator.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 length. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTrainedTokenizerFast`]): The tokenizer used for encoding the data. mlm ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorforlanguagemodeling
#datacollatorforlanguagemodeling
.md
461_7
data.data_collator.DataCollatorForWholeWordMask Data collator used for language modeling that masks entire words. - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling <Tip> This collator relies on details of the implementation of subword tokeniz...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorforwholewordmask
#datacollatorforwholewordmask
.md
461_8
data.data_collator.DataCollatorForPermutationLanguageModeling Data collator used for permutation language modeling. - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for permutation language modeling with procedures specific to XLNet - numpy_mask_tokens - tf_mask_tokens - ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorforpermutationlanguagemodeling
#datacollatorforpermutationlanguagemodeling
.md
461_9
data.data_collator.DataCollatorWithFlattening Data collator used for padding free approach. Does the following: - concatate the entire mini batch into single long sequence [1, total_tokens] - uses `separator_id` to separate sequences within the concatenated `labels`, default value is -100 - no padding will be added...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/data_collator.md
https://huggingface.co/docs/transformers/en/main_classes/data_collator/#datacollatorwithflattening
#datacollatorwithflattening
.md
461_10
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/deepspeed.md
https://huggingface.co/docs/transformers/en/main_classes/deepspeed/
.md
462_0
[DeepSpeed](https://github.com/microsoft/DeepSpeed), powered by Zero Redundancy Optimizer (ZeRO), is an optimization library for training and fitting very large models onto a GPU. It is available in several ZeRO stages, where each stage progressively saves more GPU memory by partitioning the optimizer state, gradients,...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/deepspeed.md
https://huggingface.co/docs/transformers/en/main_classes/deepspeed/#deepspeed
#deepspeed
.md
462_1
integrations.HfDeepSpeedConfig This object contains a DeepSpeed configuration dictionary and can be quickly queried for things like zero stage. A `weakref` of this object is stored in the module's globals to be able to access the config from areas where things like the Trainer object is not available (e.g. `from_pr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/deepspeed.md
https://huggingface.co/docs/transformers/en/main_classes/deepspeed/#hfdeepspeedconfig
#hfdeepspeedconfig
.md
462_2
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/configuration.md
https://huggingface.co/docs/transformers/en/main_classes/configuration/
.md
463_0
The base class [`PretrainedConfig`] implements the common methods for loading/saving a configuration either from a local file or directory, or from a pretrained model configuration provided by the library (downloaded from HuggingFace's AWS S3 repository). Each derived config class implements model specific attributes...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/configuration.md
https://huggingface.co/docs/transformers/en/main_classes/configuration/#configuration
#configuration
.md
463_1
Base class for all configuration classes. Handles a few parameters common to all models' configurations as well as methods for loading/downloading/saving configurations. <Tip> A configuration file can be loaded and saved to disk. Loading the configuration file and using this file to initialize a model does **not** ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/configuration.md
https://huggingface.co/docs/transformers/en/main_classes/configuration/#pretrainedconfig
#pretrainedconfig
.md
463_2
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/logging.md
https://huggingface.co/docs/transformers/en/main_classes/logging/
.md
464_0
🤗 Transformers has a centralized logging system, so that you can setup the verbosity of the library easily. Currently the default verbosity of the library is `WARNING`. To change the level of verbosity, just use one of the direct setters. For instance, here is how to change the verbosity to the INFO level. ```py...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/logging.md
https://huggingface.co/docs/transformers/en/main_classes/logging/#logging
#logging
.md
464_1
Python has two logging systems that are often used in conjunction: `logging`, which is explained above, and `warnings`, which allows further classification of warnings in specific buckets, e.g., `FutureWarning` for a feature or path that has already been deprecated and `DeprecationWarning` to indicate an upcoming depre...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/logging.md
https://huggingface.co/docs/transformers/en/main_classes/logging/#logging-vs-warnings
#logging-vs-warnings
.md
464_2
[[autodoc]] logging.set_verbosity: No module named 'transformers.logging'_error: No module named 'transformers.logging' [[autodoc]] logging.set_verbosity: No module named 'transformers.logging'_warning: No module named 'transformers.logging' [[autodoc]] logging.set_verbosity: No module named 'transformers.logging'_...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/logging.md
https://huggingface.co/docs/transformers/en/main_classes/logging/#base-setters
#base-setters
.md
464_3
[[autodoc]] logging.get_verbosity: No module named 'transformers.logging' [[autodoc]] logging.set_verbosity: No module named 'transformers.logging' [[autodoc]] logging.get_logger: No module named 'transformers.logging' [[autodoc]] logging.enable_default_handler: No module named 'transformers.logging' [[autodoc]...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/logging.md
https://huggingface.co/docs/transformers/en/main_classes/logging/#other-functions
#other-functions
.md
464_4
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/
.md
465_0
An image processor is in charge of preparing input features for vision models and post processing their outputs. This includes transformations such as resizing, normalization, and conversion to PyTorch, TensorFlow, Flax and Numpy tensors. It may also include model specific post-processing such as converting logits to s...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/#image-processor
#image-processor
.md
465_1
image_processing_utils.ImageProcessingMixin This is an image processor mixin used to provide saving/loading functionality for sequential and image feature extractors. - from_pretrained - save_pretrained
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/#imageprocessingmixin
#imageprocessingmixin
.md
465_2
Holds the output of the [`~SequenceFeatureExtractor.pad`] and feature extractor specific `__call__` methods. This class is derived from a python dictionary and can be used as a dictionary. Args: data (`dict`, *optional*): Dictionary of lists/arrays/tensors returned by the __call__/pad methods ('input_values', 'atte...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/#batchfeature
#batchfeature
.md
465_3
image_processing_utils.BaseImageProcessor
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/#baseimageprocessor
#baseimageprocessor
.md
465_4
image_processing_utils_fast.BaseImageProcessorFast
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/image_processor.md
https://huggingface.co/docs/transformers/en/main_classes/image_processor/#baseimageprocessorfast
#baseimageprocessorfast
.md
465_5
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/
.md
466_0
Callbacks are objects that can customize the behavior of the training loop in the PyTorch [`Trainer`] (this feature is not yet implemented in TensorFlow) that can inspect the training loop state (for progress reporting, logging on TensorBoard or other ML platforms...) and take decisions (like early stopping). Callbac...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/#callbacks
#callbacks
.md
466_1
Here is the list of the available [`TrainerCallback`] in the library: integrations.CometCallback A [`TrainerCallback`] that sends the logs to [Comet ML](https://www.comet.com/site/). - setup A [`TrainerCallback`] that handles the default flow of the training loop for logs, evaluation and checkpoints. A bare [...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/#available-callbacks
#available-callbacks
.md
466_2
A class for objects that will inspect the state of the training loop at some events and take some decisions. At each of those events the following arguments are available: Args: args ([`TrainingArguments`]): The training arguments used to instantiate the [`Trainer`]. state ([`TrainerState`]): The current state of the...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/#trainercallback
#trainercallback
.md
466_3
A class containing the [`Trainer`] inner state that will be saved along the model and optimizer when checkpointing and passed to the [`TrainerCallback`]. <Tip> In all this class, one step is to be understood as one update step. When using gradient accumulation, one update step may require several forward and backwa...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/#trainerstate
#trainerstate
.md
466_4
A class that handles the [`Trainer`] control flow. This class is used by the [`TrainerCallback`] to activate some switches in the training loop. Args: should_training_stop (`bool`, *optional*, defaults to `False`): Whether or not the training should be interrupted. If `True`, this variable will not be set back to `...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/callback.md
https://huggingface.co/docs/transformers/en/main_classes/callback/#trainercontrol
#trainercontrol
.md
466_5
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/
.md
467_0
A backbone is a model used for feature extraction for higher level computer vision tasks such as object detection and image classification. Transformers provides an [`AutoBackbone`] class for initializing a Transformers backbone from pretrained model weights, and two utility classes: * [`~utils.BackboneMixin`] enable...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#backbone
#backbone
.md
467_1
AutoBackbone
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#autobackbone
#autobackbone
.md
467_2
utils.BackboneMixin
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#backbonemixin
#backbonemixin
.md
467_3
utils.BackboneConfigMixin A Mixin to support handling the `out_features` and `out_indices` attributes for the backbone configurations.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#backboneconfigmixin
#backboneconfigmixin
.md
467_4
models.timm_backbone.TimmBackbone Wrapper class for timm models to be used as backbones. This enables using the timm models interchangeably with the other models in the library keeping the same API.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#timmbackbone
#timmbackbone
.md
467_5
models.timm_backbone.TimmBackbone Wrapper class for timm models to be used as backbones. This enables using the timm models interchangeably with the other models in the library keeping the same API. Config
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/backbones.md
https://huggingface.co/docs/transformers/en/main_classes/backbones/#timmbackboneconfig
#timmbackboneconfig
.md
467_6
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/
.md
468_0
Quantization techniques reduce memory and computational costs by representing weights and activations with lower-precision data types like 8-bit integers (int8). This enables loading larger models you normally wouldn't be able to fit into memory, and speeding up inference. Transformers supports the AWQ and GPTQ quantiz...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#quantization
#quantization
.md
468_1
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `quanto`. Args: weights (`str`, *optional*, defaults to `"int8"`): The target dtype for the weights after quantization. Supported values are ("float8","int8","int4","int2") activations (`str`, ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#quantoconfig
#quantoconfig
.md
468_2
This is a wrapper class about `aqlm` parameters. Args: in_group_size (`int`, *optional*, defaults to 8): The group size along the input dimension. out_group_size (`int`, *optional*, defaults to 1): The group size along the output dimension. It's recommended to always use 1. num_codebooks (`int`, *optional*, defaults ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#aqlmconfig
#aqlmconfig
.md
468_3
This is a wrapper class about `vptq` parameters. Args: enable_proxy_error (`bool`, *optional*, defaults to `False`): calculate proxy error for each layer config_for_layers (`Dict`, *optional*, defaults to `{}`): quantization params for each layer shared_layer_config (`Dict`, *optional*, defaults to `{}`): shared quan...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#vptqconfig
#vptqconfig
.md
468_4
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `auto-awq` library awq quantization relying on auto_awq backend. Args: bits (`int`, *optional*, defaults to 4): The number of bits to quantize to. group_size (`int`, *optional*, defaults to 128...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#awqconfig
#awqconfig
.md
468_5
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `eetq`. Args: weights (`str`, *optional*, defaults to `"int8"`): The target dtype for the weights. Supported value is only "int8" modules_to_not_convert (`list`, *optional*, default to `None`):...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#eetqconfig
#eetqconfig
.md
468_6
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `optimum` api for gptq quantization relying on auto_gptq backend. Args: bits (`int`): The number of bits to quantize to, supported numbers are (2, 3, 4, 8). tokenizer (`str` or `PreTrainedToken...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#gptqconfig
#gptqconfig
.md
468_7
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `bitsandbytes`. This replaces `load_in_8bit` or `load_in_4bit`therefore both options are mutually exclusive. Currently only supports `LLM.int8()`, `FP4`, and `NF4` quantization. If more metho...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#bitsandbytesconfig
#bitsandbytesconfig
.md
468_8
quantizers.base.HfQuantizer Abstract class of the HuggingFace quantizer. Supports for now quantizing HF transformers models for inference and/or quantization. This class is used only for transformers.PreTrainedModel.from_pretrained and cannot be easily used outside the scope of that method yet. Attributes quantizat...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#hfquantizer
#hfquantizer
.md
468_9
HiggsConfig is a configuration class for quantization using the HIGGS method. Args: bits (int, *optional*, defaults to 4): Number of bits to use for quantization. Can be 2, 3 or 4. Default is 4. p (int, *optional*, defaults to 2): Quantization grid dimension. 1 and 2 are supported. 2 is always better in practice. Def...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#higgsconfig
#higgsconfig
.md
468_10
This is wrapper around hqq's BaseQuantizeConfig. Args: nbits (`int`, *optional*, defaults to 4): Number of bits. Supported values are (8, 4, 3, 2, 1). group_size (`int`, *optional*, defaults to 64): Group-size value. Supported values are any value that is divisble by weight.shape[axis]). view_as_float (`bool`, *optio...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#hqqconfig
#hqqconfig
.md
468_11
This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using fbgemm fp8 quantization. Args: activation_scale_ub (`float`, *optional*, defaults to 1200.0): The activation scale upper bound. This is used when quantizing the input activation. modules_to_not...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#fbgemmfp8config
#fbgemmfp8config
.md
468_12
This is a wrapper class that handles compressed-tensors quantization config options. It is a wrapper around `compressed_tensors.QuantizationConfig` Args: config_groups (`typing.Dict[str, typing.Union[ForwardRef('QuantizationScheme'), typing.List[str]]]`, *optional*): dictionary mapping group name to a quantization sche...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#compressedtensorsconfig
#compressedtensorsconfig
.md
468_13
This is a config class for torchao quantization/sparsity techniques. Args: quant_type (`str`): The type of quantization we want to use, currently supporting: `int4_weight_only`, `int8_weight_only` and `int8_dynamic_activation_int8_weight`. modules_to_not_convert (`list`, *optional*, default to `None`): The list of mo...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#torchaoconfig
#torchaoconfig
.md
468_14
BitNetConfig(modules_to_not_convert: Optional[List] = None, **kwargs)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/quantization.md
https://huggingface.co/docs/transformers/en/main_classes/quantization/#bitnetconfig
#bitnetconfig
.md
468_15
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/
.md
469_0
🤗 Transformers provides a `transformers.onnx` package that enables you to convert model checkpoints to an ONNX graph by leveraging configuration objects. See the [guide](../serialization) on exporting 🤗 Transformers models for more details.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#exporting--transformers-models-to-onnx
#exporting--transformers-models-to-onnx
.md
469_1
We provide three abstract classes that you should inherit from, depending on the type of model architecture you wish to export: * Encoder-based models inherit from [`~onnx.config.OnnxConfig`] * Decoder-based models inherit from [`~onnx.config.OnnxConfigWithPast`] * Encoder-decoder models inherit from [`~onnx.config.O...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#onnx-configurations
#onnx-configurations
.md
469_2
onnx.config.OnnxConfig Base class for ONNX exportable model describing metadata on how to export the model through the ONNX format.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#onnxconfig
#onnxconfig
.md
469_3
onnx.config.OnnxConfig Base class for ONNX exportable model describing metadata on how to export the model through the ONNX format. WithPast
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#onnxconfigwithpast
#onnxconfigwithpast
.md
469_4
onnx.config.OnnxSeq2SeqConfigWithPast
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#onnxseq2seqconfigwithpast
#onnxseq2seqconfigwithpast
.md
469_5
Each ONNX configuration is associated with a set of _features_ that enable you to export models for different types of topologies or tasks.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#onnx-features
#onnx-features
.md
469_6
onnx.features.FeaturesManager
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/main_classes/onnx.md
https://huggingface.co/docs/transformers/en/main_classes/onnx/#featuresmanager
#featuresmanager
.md
469_7