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
The bare SWITCH_TRANSFORMERS Model transformer outputting raw hidden-states without any specific head on top. The SWITCH_TRANSFORMERS model was proposed in [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by [William Fedus](https://arxiv....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/switch_transformers.md
https://huggingface.co/docs/transformers/en/model_doc/switch_transformers/#switchtransformersmodel
#switchtransformersmodel
.md
112_7
SWITCH_TRANSFORMERS Model with a `language modeling` head on top. The SWITCH_TRANSFORMERS model was proposed in [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by [William Fedus](https://arxiv.org/search/cs?searchtype=author&query=Fedus%...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/switch_transformers.md
https://huggingface.co/docs/transformers/en/model_doc/switch_transformers/#switchtransformersforconditionalgeneration
#switchtransformersforconditionalgeneration
.md
112_8
The bare SWITCH_TRANSFORMERS Model transformer outputting encoder's raw hidden-states without any specific head on top. The SWITCH_TRANSFORMERS model was proposed in [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by [William Fedus](http...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/switch_transformers.md
https://huggingface.co/docs/transformers/en/model_doc/switch_transformers/#switchtransformersencodermodel
#switchtransformersencodermodel
.md
112_9
<!--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/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/
.md
113_0
The VITS model was proposed in [Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech](https://arxiv.org/abs/2106.06103) by Jaehyeon Kim, Jungil Kong, Juhee Son. VITS (**V**ariational **I**nference with adversarial learning for end-to-end **T**ext-to-**S**peech) is an end-to-end ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/#overview
#overview
.md
113_1
Both the VITS and MMS-TTS checkpoints can be used with the same API. Since the flow-based model is non-deterministic, it is good practice to set a seed to ensure reproducibility of the outputs. For languages with a Roman alphabet, such as English or French, the tokenizer can be used directly to pre-process the text inp...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/#usage-examples
#usage-examples
.md
113_2
This is the configuration class to store the configuration of a [`VitsModel`]. It is used to instantiate a VITS model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the VITS [facebook/mms-tts-eng](https...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/#vitsconfig
#vitsconfig
.md
113_3
Construct a VITS tokenizer. Also supports MMS-TTS. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): Path to the vocabulary file. language (`str`, *optional*): La...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/#vitstokenizer
#vitstokenizer
.md
113_4
The complete VITS model, for text-to-speech synthesis. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [torc...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vits.md
https://huggingface.co/docs/transformers/en/model_doc/vits/#vitsmodel
#vitsmodel
.md
113_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/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/
.md
114_0
<div class="flex flex-wrap space-x-1"> <a href="https://huggingface.co/models?filter=rag"> <img alt="Models" src="https://img.shields.io/badge/All_model_pages-rag-blueviolet"> </a> </div>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#rag
#rag
.md
114_1
Retrieval-augmented generation ("RAG") models combine the powers of pretrained dense retrieval (DPR) and sequence-to-sequence models. RAG models retrieve documents, pass them to a seq2seq model, then marginalize to generate outputs. The retriever and seq2seq modules are initialized from pretrained models, and fine-tune...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#overview
#overview
.md
114_2
Retrieval-augmented generation ("RAG") models combine the powers of pretrained dense retrieval (DPR) and Seq2Seq models. RAG models retrieve docs, pass them to a seq2seq model, then marginalize to generate outputs. The retriever and seq2seq modules are initialized from pretrained models, and fine-tuned jointly, allowin...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#usage-tips
#usage-tips
.md
114_3
[`RagConfig`] stores the configuration of a *RagModel*. Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the documentation from [`PretrainedConfig`] for more information. Args: title_sep (`str`, *optional*, defaults to `" / "`): Separator inserted between the...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragconfig
#ragconfig
.md
114_4
No docstring available for RagTokenizer
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragtokenizer
#ragtokenizer
.md
114_5
models.rag.modeling_rag.RetrievAugLMMarginOutput Base class for retriever augmented marginalized models outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided): Language modeling loss. logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#rag-specific-outputs
#rag-specific-outputs
.md
114_6
Retriever used to get documents from vector queries. It retrieves the documents embeddings as well as the documents contents, and it formats them to be used with a RagModel. Args: config ([`RagConfig`]): The configuration of the RAG model this Retriever is used with. Contains parameters indicating which `Index` to bu...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragretriever
#ragretriever
.md
114_7
The [`RagModel`] forward method, overrides the `__call__` special method. <Tip> Although the recipe for forward pass needs to be defined within this function, one should call the [`Module`] instance afterwards instead of this since the former takes care of running the pre and post processing steps while the latter ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragmodel
#ragmodel
.md
114_8
The [`RagSequenceForGeneration`] forward method, overrides the `__call__` special method. <Tip> Although the recipe for forward pass needs to be defined within this function, one should call the [`Module`] instance afterwards instead of this since the former takes care of running the pre and post processing steps w...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragsequenceforgeneration
#ragsequenceforgeneration
.md
114_9
The [`RagTokenForGeneration`] forward method, overrides the `__call__` special method. <Tip> Although the recipe for forward pass needs to be defined within this function, one should call the [`Module`] instance afterwards instead of this since the former takes care of running the pre and post processing steps whil...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#ragtokenforgeneration
#ragtokenforgeneration
.md
114_10
No docstring available for TFRagModel Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#tfragmodel
#tfragmodel
.md
114_11
No docstring available for TFRagSequenceForGeneration Methods: call - generate
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#tfragsequenceforgeneration
#tfragsequenceforgeneration
.md
114_12
No docstring available for TFRagTokenForGeneration Methods: call - generate </tf> </frameworkcontent>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rag.md
https://huggingface.co/docs/transformers/en/model_doc/rag/#tfragtokenforgeneration
#tfragtokenforgeneration
.md
114_13
<!--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/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/
.md
115_0
The MobileBERT model was proposed in [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. It's a bidirectional transformer based on the BERT model, which is compressed and accelerated ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#overview
#overview
.md
115_1
- MobileBERT is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than the left. - MobileBERT is similar to BERT and therefore relies on the masked language modeling (MLM) objective. It is therefore efficient at predicting masked tokens and at NLU in general, but is...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#usage-tips
#usage-tips
.md
115_2
- [Text classification task guide](../tasks/sequence_classification) - [Token classification task guide](../tasks/token_classification) - [Question answering task guide](../tasks/question_answering) - [Masked language modeling task guide](../tasks/masked_language_modeling) - [Multiple choice task guide](../tasks/multip...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#resources
#resources
.md
115_3
This is the configuration class to store the configuration of a [`MobileBertModel`] or a [`TFMobileBertModel`]. It is used to instantiate a MobileBERT model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that o...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertconfig
#mobilebertconfig
.md
115_4
Construct a MobileBERT tokenizer. Based on WordPiece. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): File containing the vocabulary. do_lower_case (`bool`, *op...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobileberttokenizer
#mobileberttokenizer
.md
115_5
Construct a "fast" MobileBERT tokenizer (backed by HuggingFace's *tokenizers* library). Based on WordPiece. This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobileberttokenizerfast
#mobileberttokenizerfast
.md
115_6
models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput Output type of [`MobileBertForPreTraining`]. Args: loss (*optional*, returned when `labels` is provided, `torch.FloatTensor` of shape `(1,)`): Total loss as the sum of the masked language modeling loss and the next sequence prediction (classificat...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebert-specific-outputs
#mobilebert-specific-outputs
.md
115_7
The bare MobileBert Model transformer outputting raw hidden-states without any specific head on top. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertmodel
#mobilebertmodel
.md
115_8
MobileBert Model with two heads on top as done during the pretraining: a `masked language modeling` head and a `next sentence prediction (classification)` head. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as do...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertforpretraining
#mobilebertforpretraining
.md
115_9
MobileBert Model with a `language modeling` head on top. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertformaskedlm
#mobilebertformaskedlm
.md
115_10
MobileBert Model with a `next sentence prediction (classification)` head on top. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This m...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertfornextsentenceprediction
#mobilebertfornextsentenceprediction
.md
115_11
MobileBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g. for GLUE tasks. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertforsequenceclassification
#mobilebertforsequenceclassification
.md
115_12
MobileBert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a softmax) e.g. for RocStories/SWAG tasks. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downl...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertformultiplechoice
#mobilebertformultiplechoice
.md
115_13
MobileBert Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloa...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertfortokenclassification
#mobilebertfortokenclassification
.md
115_14
MobileBert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layers on top of the hidden-states output to compute `span start logits` and `span end logits`). This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#mobilebertforquestionanswering
#mobilebertforquestionanswering
.md
115_15
No docstring available for TFMobileBertModel Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertmodel
#tfmobilebertmodel
.md
115_16
No docstring available for TFMobileBertForPreTraining Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertforpretraining
#tfmobilebertforpretraining
.md
115_17
No docstring available for TFMobileBertForMaskedLM Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertformaskedlm
#tfmobilebertformaskedlm
.md
115_18
No docstring available for TFMobileBertForNextSentencePrediction Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertfornextsentenceprediction
#tfmobilebertfornextsentenceprediction
.md
115_19
No docstring available for TFMobileBertForSequenceClassification Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertforsequenceclassification
#tfmobilebertforsequenceclassification
.md
115_20
No docstring available for TFMobileBertForMultipleChoice Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertformultiplechoice
#tfmobilebertformultiplechoice
.md
115_21
No docstring available for TFMobileBertForTokenClassification Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertfortokenclassification
#tfmobilebertfortokenclassification
.md
115_22
No docstring available for TFMobileBertForQuestionAnswering Methods: call </tf> </frameworkcontent>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilebert.md
https://huggingface.co/docs/transformers/en/model_doc/mobilebert/#tfmobilebertforquestionanswering
#tfmobilebertforquestionanswering
.md
115_23
<!--Copyright 2024 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/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/
.md
116_0
The PVTv2 model was proposed in [PVT v2: Improved Baselines with Pyramid Vision Transformer](https://arxiv.org/abs/2106.13797) by Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. As an improved variant of PVT, it eschews position embeddings, relying instead on p...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#overview
#overview
.md
116_1
*Transformer recently has presented encouraging progress in computer vision. In this work, we present new baselines by improving the original Pyramid Vision Transformer (PVT v1) by adding three designs, including (1) linear complexity attention layer, (2) overlapping patch embedding, and (3) convolutional feed-forward ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#abstract-from-the-paper
#abstract-from-the-paper
.md
116_2
- [PVTv2](https://arxiv.org/abs/2106.13797) is a hierarchical transformer model which has demonstrated powerful performance in image classification and multiple other tasks, used as a backbone for semantic segmentation in [Segformer](https://arxiv.org/abs/2105.15203), monocular depth estimation in [GLPN](https://arxiv....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#usage-tips
#usage-tips
.md
116_3
This is the configuration class to store the configuration of a [`PvtV2Model`]. It is used to instantiate a Pvt V2 model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the Pvt V2 B0 [OpenGVLab/pvt_v2_b0...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#pvtv2config
#pvtv2config
.md
116_4
Pvt-v2 Model transformer with an image classification head on top (a linear layer on top of the final hidden state of the [CLS] token) e.g. for ImageNet. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the Py...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#pvtforimageclassification
#pvtforimageclassification
.md
116_5
The bare Pvt-v2 encoder outputting raw hidden-states without any specific head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behav...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pvt_v2.md
https://huggingface.co/docs/transformers/en/model_doc/pvt_v2/#pvtmodel
#pvtmodel
.md
116_6
<!--Copyright 2021 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/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/
.md
117_0
The TrOCR model was proposed in [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei. TrOCR consists of an image Transformer encoder and an autoregressive text T...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#overview
#overview
.md
117_1
- The quickest way to get started with TrOCR is by checking the [tutorial notebooks](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/TrOCR), which show how to use the model at inference time as well as fine-tuning on custom data. - TrOCR is pre-trained in 2 stages before being fine-tuned on downstream ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#usage-tips
#usage-tips
.md
117_2
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with TrOCR. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an ex...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#resources
#resources
.md
117_3
TrOCR's [`VisionEncoderDecoder`] model accepts images as input and makes use of [`~generation.GenerationMixin.generate`] to autoregressively generate text given the input image. The [`ViTImageProcessor`/`DeiTImageProcessor`] class is responsible for preprocessing the input image and [`RobertaTokenizer`/`XLMRobertaTok...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#inference
#inference
.md
117_4
This is the configuration class to store the configuration of a [`TrOCRForCausalLM`]. It is used to instantiate an TrOCR model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the TrOCR [microsoft/trocr-b...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#trocrconfig
#trocrconfig
.md
117_5
Constructs a TrOCR processor which wraps a vision image processor and a TrOCR tokenizer into a single processor. [`TrOCRProcessor`] offers all the functionalities of [`ViTImageProcessor`/`DeiTImageProcessor`] and [`RobertaTokenizer`/`XLMRobertaTokenizer`]. See the [`~TrOCRProcessor.__call__`] and [`~TrOCRProcessor.de...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#trocrprocessor
#trocrprocessor
.md
117_6
The TrOCR Decoder with a language modeling head. Can be used as the decoder part of [`EncoderDecoderModel`] and [`VisionEncoderDecoder`]. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resi...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/trocr.md
https://huggingface.co/docs/transformers/en/model_doc/trocr/#trocrforcausallm
#trocrforcausallm
.md
117_7
<!--Copyright 2021 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/model_doc/bartpho.md
https://huggingface.co/docs/transformers/en/model_doc/bartpho/
.md
118_0
The BARTpho model was proposed in [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen. The abstract from the paper is the following: *We present BARTpho with two versions -- BARTpho_word and BARTpho_syllable -- t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bartpho.md
https://huggingface.co/docs/transformers/en/model_doc/bartpho/#overview
#overview
.md
118_1
```python >>> import torch >>> from transformers import AutoModel, AutoTokenizer >>> bartpho = AutoModel.from_pretrained("vinai/bartpho-syllable") >>> tokenizer = AutoTokenizer.from_pretrained("vinai/bartpho-syllable") >>> line = "Chúng tôi là những nghiên cứu viên." >>> input_ids = tokenizer(line, return_tensors="...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bartpho.md
https://huggingface.co/docs/transformers/en/model_doc/bartpho/#usage-example
#usage-example
.md
118_2
- Following mBART, BARTpho uses the "large" architecture of BART with an additional layer-normalization layer on top of both the encoder and decoder. Thus, usage examples in the [documentation of BART](bart), when adapting to use with BARTpho, should be adjusted by replacing the BART-specialized classes with the mBART-...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bartpho.md
https://huggingface.co/docs/transformers/en/model_doc/bartpho/#usage-tips
#usage-tips
.md
118_3
Adapted from [`XLMRobertaTokenizer`]. Based on [SentencePiece](https://github.com/google/sentencepiece). This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): Path to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bartpho.md
https://huggingface.co/docs/transformers/en/model_doc/bartpho/#bartphotokenizer
#bartphotokenizer
.md
118_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/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/
.md
119_0
The BioGPT model was proposed in [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Po...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#overview
#overview
.md
119_1
- BioGPT is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than the left. - BioGPT was trained with a causal language modeling (CLM) objective and is therefore powerful at predicting the next token in a sequence. Leveraging this feature allows BioGPT to generate ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#usage-tips
#usage-tips
.md
119_2
PyTorch includes a native scaled dot-product attention (SDPA) operator as part of `torch.nn.functional`. This function encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the [official documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.s...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#using-scaled-dot-product-attention-sdpa
#using-scaled-dot-product-attention-sdpa
.md
119_3
- [Causal language modeling task guide](../tasks/language_modeling)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#resources
#resources
.md
119_4
This is the configuration class to store the configuration of a [`BioGptModel`]. It is used to instantiate an BioGPT model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the BioGPT [microsoft/biogpt](ht...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogptconfig
#biogptconfig
.md
119_5
Construct an FAIRSEQ Transformer tokenizer. Moses tokenization followed by Byte-Pair Encoding. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): Path to the vocab...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogpttokenizer
#biogpttokenizer
.md
119_6
The bare BioGPT Model transformer outputting raw hidden-states without any specific head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogptmodel
#biogptmodel
.md
119_7
BioGPT Model with a `language modeling` head on top for CLM fine-tuning. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior. Paramet...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogptforcausallm
#biogptforcausallm
.md
119_8
BioGPT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTo...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogptfortokenclassification
#biogptfortokenclassification
.md
119_9
The BioGpt Model transformer with a sequence classification head on top (linear layer). [`BioGptForSequenceClassification`] uses the last token in order to do the classification, as other causal models (e.g. GPT-2) do. Since it does classification on the last token, it is required to know the position of the last t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/biogpt.md
https://huggingface.co/docs/transformers/en/model_doc/biogpt/#biogptforsequenceclassification
#biogptforsequenceclassification
.md
119_10
<!--Copyright 2024 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/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/
.md
120_0
The PhiMoE model was proposed in [Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone](https://arxiv.org/abs/2404.14219) by Microsoft.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#overview
#overview
.md
120_1
The abstract from the Phi-3 paper is the following: We introduce phi-3-mini, a 3.8 billion parameter language model trained on 3.3 trillion tokens, whose overall performance, as measured by both academic benchmarks and internal testing, rivals that of models such as Mixtral 8x7B and GPT-3.5 (e.g., phi-3-mini achieves...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#summary
#summary
.md
120_2
- This model is very similar to `Mixtral` with the main difference of [`Phi3LongRoPEScaledRotaryEmbedding`], where they are used to extend the context of the rotary embeddings. The query, key and values are fused, and the MLP's up and gate projection layers are also fused. - The tokenizer used for this model is identic...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#usage-tips
#usage-tips
.md
120_3
<Tip warning={true}> Phi-3.5-MoE-instruct has been integrated in the development version (4.44.2.dev) of `transformers`. Until the official version is released through `pip`, ensure that you are doing the following: * When loading the model, ensure that `trust_remote_code=True` is passed as an argument of the `from_p...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#how-to-use-phimoe
#how-to-use-phimoe
.md
120_4
This is the configuration class to store the configuration of a [`PhimoeModel`]. It is used to instantiate a Phi-moe model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the [microsoft/Phi-3.5-MoE-instr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#phimoeconfig
#phimoeconfig
.md
120_5
The bare Phimoe Model outputting raw hidden-states without any specific head on top. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This m...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#phimoemodel
#phimoemodel
.md
120_6
No docstring available for PhimoeForCausalLM Methods: forward - generate
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#phimoeforcausallm
#phimoeforcausallm
.md
120_7
The Phimoe Model transformer with a sequence classification head on top (linear layer). [`PhimoeForSequenceClassification`] uses the last token in order to do the classification, as other causal models (e.g. GPT-2) do. Since it does classification on the last token, it requires to know the position of the last token. I...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phimoe.md
https://huggingface.co/docs/transformers/en/model_doc/phimoe/#phimoeforsequenceclassification
#phimoeforsequenceclassification
.md
120_8
<!--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/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/
.md
121_0
The SpeechT5 model was proposed in [SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing](https://arxiv.org/abs/2110.07205) by Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei. The abstract from...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#overview
#overview
.md
121_1
This is the configuration class to store the configuration of a [`SpeechT5Model`]. It is used to instantiate a SpeechT5 model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the SpeechT5 [microsoft/speec...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5config
#speecht5config
.md
121_2
This is the configuration class to store the configuration of a [`SpeechT5HifiGanModel`]. It is used to instantiate a SpeechT5 HiFi-GAN vocoder model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the S...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5hifiganconfig
#speecht5hifiganconfig
.md
121_3
Construct a SpeechT5 tokenizer. Based on [SentencePiece](https://github.com/google/sentencepiece). This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): [SentencePiec...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5tokenizer
#speecht5tokenizer
.md
121_4
Constructs a SpeechT5 feature extractor. This class can pre-process a raw speech signal by (optionally) normalizing to zero-mean unit-variance, for use by the SpeechT5 speech encoder prenet. This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder prenet. Th...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5featureextractor
#speecht5featureextractor
.md
121_5
Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor. [`SpeechT5Processor`] offers all the functionalities of [`SpeechT5FeatureExtractor`] and [`SpeechT5Tokenizer`]. See the docstring of [`~SpeechT5Processor.__call__`] and [`~SpeechT5Processor.decode`] for more infor...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5processor
#speecht5processor
.md
121_6
The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5model
#speecht5model
.md
121_7
SpeechT5 Model with a speech encoder and a text decoder. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5forspeechtotext
#speecht5forspeechtotext
.md
121_8
SpeechT5 Model with a text encoder and a speech decoder. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5fortexttospeech
#speecht5fortexttospeech
.md
121_9
SpeechT5 Model with a speech encoder and a speech decoder. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5forspeechtospeech
#speecht5forspeechtospeech
.md
121_10
HiFi-GAN vocoder. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/speecht5.md
https://huggingface.co/docs/transformers/en/model_doc/speecht5/#speecht5hifigan
#speecht5hifigan
.md
121_11
<!--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/model_doc/mobilenet_v1.md
https://huggingface.co/docs/transformers/en/model_doc/mobilenet_v1/
.md
122_0