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 |
|---|---|---|---|---|---|
AutoModel
This is a generic model class that will be instantiated as one of the base model classes of the library when created
with the [`~AutoModel.from_pretrained`] class method or the [`~AutoModel.from_config`] class
method.
This class cannot be instantiated directly using `__init__()` (throws an error).
ForDocu... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#automodelfordocumentquestionanswering | #automodelfordocumentquestionanswering | .md | 212_78 |
No docstring available for TFAutoModelForDocumentQuestionAnswering | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#tfautomodelfordocumentquestionanswering | #tfautomodelfordocumentquestionanswering | .md | 212_79 |
AutoModel
This is a generic model class that will be instantiated as one of the base model classes of the library when created
with the [`~AutoModel.from_pretrained`] class method or the [`~AutoModel.from_config`] class
method.
This class cannot be instantiated directly using `__init__()` (throws an error).
ForVisu... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#automodelforvisualquestionanswering | #automodelforvisualquestionanswering | .md | 212_80 |
AutoModel
This is a generic model class that will be instantiated as one of the base model classes of the library when created
with the [`~AutoModel.from_pretrained`] class method or the [`~AutoModel.from_config`] class
method.
This class cannot be instantiated directly using `__init__()` (throws an error).
ForVisi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#automodelforvision2seq | #automodelforvision2seq | .md | 212_81 |
No docstring available for TFAutoModelForVision2Seq | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#tfautomodelforvision2seq | #tfautomodelforvision2seq | .md | 212_82 |
No docstring available for FlaxAutoModelForVision2Seq | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#flaxautomodelforvision2seq | #flaxautomodelforvision2seq | .md | 212_83 |
AutoModel
This is a generic model class that will be instantiated as one of the base model classes of the library when created
with the [`~AutoModel.from_pretrained`] class method or the [`~AutoModel.from_config`] class
method.
This class cannot be instantiated directly using `__init__()` (throws an error).
ForImag... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/auto.md | https://huggingface.co/docs/transformers/en/model_doc/auto/#automodelforimagetexttotext | #automodelforimagetexttotext | .md | 212_84 |
<!--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/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/ | .md | 213_0 | |
The InstructBLIP model was proposed in [InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning](https://arxiv.org/abs/2305.06500) by Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, Steven Hoi.
InstructBLIP leverages the [BLIP... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#overview | #overview | .md | 213_1 |
InstructBLIP uses the same architecture as [BLIP-2](blip2) with a tiny but important difference: it also feeds the text prompt (instruction) to the Q-Former.
> [!NOTE]
> BLIP models after release v4.46 will raise warnings about adding `processor.num_query_tokens = {{num_query_tokens}}` and expand model embeddings lay... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#usage-tips | #usage-tips | .md | 213_2 |
[`InstructBlipConfig`] is the configuration class to store the configuration of a
[`InstructBlipForConditionalGeneration`]. It is used to instantiate a InstructBLIP model according to the specified
arguments, defining the vision model, Q-Former model and language model configs. Instantiating a configuration with
the de... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipconfig | #instructblipconfig | .md | 213_3 |
This is the configuration class to store the configuration of a [`InstructBlipVisionModel`]. It is used to
instantiate a InstructBLIP vision encoder according to the specified arguments, defining the model architecture.
Instantiating a configuration defaults will yield a similar configuration to that of the InstructBLI... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipvisionconfig | #instructblipvisionconfig | .md | 213_4 |
This is the configuration class to store the configuration of a [`InstructBlipQFormerModel`]. It is used to
instantiate a InstructBLIP Querying Transformer (Q-Former) model according to the specified arguments, defining the
model architecture. Instantiating a configuration with the defaults will yield a similar configu... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipqformerconfig | #instructblipqformerconfig | .md | 213_5 |
Constructs an InstructBLIP processor which wraps a BLIP image processor and a LLaMa/T5 tokenizer into a single
processor.
[`InstructBlipProcessor`] offers all the functionalities of [`BlipImageProcessor`] and [`AutoTokenizer`]. See the
docstring of [`~BlipProcessor.__call__`] and [`~BlipProcessor.decode`] for more in... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipprocessor | #instructblipprocessor | .md | 213_6 |
No docstring available for InstructBlipVisionModel
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipvisionmodel | #instructblipvisionmodel | .md | 213_7 |
Querying Transformer (Q-Former), used in InstructBLIP. Slightly modified from BLIP-2 as it also takes the
instruction as input.
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipqformermodel | #instructblipqformermodel | .md | 213_8 |
InstructBLIP Model for generating text given an image and an optional text prompt. The model consists of a vision
encoder, Querying Transformer (Q-Former) and a language model.
One can optionally pass `input_ids` to the model, which serve as a text prompt, to make the language model continue
the prompt. Otherwise, th... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/instructblip.md | https://huggingface.co/docs/transformers/en/model_doc/instructblip/#instructblipforconditionalgeneration | #instructblipforconditionalgeneration | .md | 213_9 |
<!--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/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/ | .md | 214_0 | |
The Qwen2-Audio is the new model series of large audio-language models from the Qwen team. Qwen2-Audio is capable of accepting various audio signal inputs and performing audio analysis or direct textual responses with regard to speech instructions. We introduce two distinct audio interaction modes:
* voice chat: user... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#overview | #overview | .md | 214_1 |
`Qwen2-Audio-7B` and `Qwen2-Audio-7B-Instruct` can be found on the [Huggingface Hub](https://huggingface.co/Qwen) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#usage-tips | #usage-tips | .md | 214_2 |
```python
from io import BytesIO
from urllib.request import urlopen
import librosa
from transformers import AutoProcessor, Qwen2AudioForConditionalGeneration
model = Qwen2AudioForConditionalGeneration.from_pretrained("Qwen/Qwen2-Audio-7B", trust_remote_code=True, device_map="auto")
processor = AutoProcessor.from_pretr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#inference | #inference | .md | 214_3 |
In the voice chat mode, users can freely engage in voice interactions with Qwen2-Audio without text input:
```python
from io import BytesIO
from urllib.request import urlopen
import librosa
from transformers import Qwen2AudioForConditionalGeneration, AutoProcessor
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#voice-chat-inference | #voice-chat-inference | .md | 214_4 |
In the audio analysis, users could provide both audio and text instructions for analysis:
```python
from io import BytesIO
from urllib.request import urlopen
import librosa
from transformers import Qwen2AudioForConditionalGeneration, AutoProcessor
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-Audio-7B-Instruct... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#audio-analysis-inference | #audio-analysis-inference | .md | 214_5 |
We also support batch inference:
```python
from io import BytesIO
from urllib.request import urlopen
import librosa
from transformers import Qwen2AudioForConditionalGeneration, AutoProcessor
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-Audio-7B-Instruct")
model = Qwen2AudioForConditionalGeneration.from_pretra... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#batch-inference | #batch-inference | .md | 214_6 |
This is the configuration class to store the configuration of a [`Qwen2AudioForConditionalGeneration`]. It is used to instantiate an
Qwen2-Audio 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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#qwen2audioconfig | #qwen2audioconfig | .md | 214_7 |
Constructs a Qwen2Audio processor which wraps a Qwen2Audio feature extractor and a Qwen2Audio tokenizer into a single processor.
[`Qwen2AudioProcessor`] offers all the functionalities of [`WhisperFeatureExtractor`] and [`Qwen2TokenizerFast`]. See the
[`~Qwen2AudioProcessor.__call__`] and [`~Qwen2AudioProcessor.decode... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#qwen2audioprocessor | #qwen2audioprocessor | .md | 214_8 |
The QWEN2AUDIO model which consists of a audio backbone and a language model.
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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_audio.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_audio/#qwen2audioforconditionalgeneration | #qwen2audioforconditionalgeneration | .md | 214_9 |
<!--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/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/ | .md | 215_0 | |
The MPNet model was proposed in [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
MPNet adopts a novel pre-training method, named masked and permuted language modeling, to inherit the advantages of
masked l... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#overview | #overview | .md | 215_1 |
MPNet doesn't have `token_type_ids`, you don't need to indicate which token belongs to which segment. Just
separate your segments with the separation token `tokenizer.sep_token` (or `[sep]`). | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#usage-tips | #usage-tips | .md | 215_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/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#resources | #resources | .md | 215_3 |
This is the configuration class to store the configuration of a [`MPNetModel`] or a [`TFMPNetModel`]. It is used to
instantiate a MPNet 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 MPNet
[mi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetconfig | #mpnetconfig | .md | 215_4 |
This tokenizer inherits from [`BertTokenizer`] which contains most of the methods. Users should refer to the
superclass for more information regarding methods.
Args:
vocab_file (`str`):
Path to the vocabulary file.
do_lower_case (`bool`, *optional*, defaults to `True`):
Whether or not to lowercase the input when toke... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnettokenizer | #mpnettokenizer | .md | 215_5 |
Construct a "fast" MPNet 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`):
File ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnettokenizerfast | #mpnettokenizerfast | .md | 215_6 |
The bare MPNet 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 heads... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetmodel | #mpnetmodel | .md | 215_7 |
No docstring available for MPNetForMaskedLM
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetformaskedlm | #mpnetformaskedlm | .md | 215_8 |
MPNet 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 savi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetforsequenceclassification | #mpnetforsequenceclassification | .md | 215_9 |
MPNet 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 downloadin... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetformultiplechoice | #mpnetformultiplechoice | .md | 215_10 |
MPNet 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 downloading ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetfortokenclassification | #mpnetfortokenclassification | .md | 215_11 |
MPNet 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 the
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#mpnetforquestionanswering | #mpnetforquestionanswering | .md | 215_12 |
No docstring available for TFMPNetModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetmodel | #tfmpnetmodel | .md | 215_13 |
No docstring available for TFMPNetForMaskedLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetformaskedlm | #tfmpnetformaskedlm | .md | 215_14 |
No docstring available for TFMPNetForSequenceClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetforsequenceclassification | #tfmpnetforsequenceclassification | .md | 215_15 |
No docstring available for TFMPNetForMultipleChoice
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetformultiplechoice | #tfmpnetformultiplechoice | .md | 215_16 |
No docstring available for TFMPNetForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetfortokenclassification | #tfmpnetfortokenclassification | .md | 215_17 |
No docstring available for TFMPNetForQuestionAnswering
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mpnet.md | https://huggingface.co/docs/transformers/en/model_doc/mpnet/#tfmpnetforquestionanswering | #tfmpnetforquestionanswering | .md | 215_18 |
<!--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/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/ | .md | 216_0 | |
The ConvNeXT model was proposed in [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
ConvNeXT is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, that claims to outperform them.
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#overview | #overview | .md | 216_1 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ConvNeXT.
<PipelineTag pipeline="image-classification"/>
- [`ConvNextForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-clas... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#resources | #resources | .md | 216_2 |
This is the configuration class to store the configuration of a [`ConvNextModel`]. It is used to instantiate an
ConvNeXT 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 ConvNeXT
[facebook/convn... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#convnextconfig | #convnextconfig | .md | 216_3 |
No docstring available for ConvNextFeatureExtractor | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#convnextfeatureextractor | #convnextfeatureextractor | .md | 216_4 |
Constructs a ConvNeXT image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Controls whether to resize the image's (height, width) dimensions to the specified `size`. Can be overriden
by `do_resize` in the `preprocess` method.
size (`Dict[str, int]` *optional*, defaults to `{"shortest_edge": 384}... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#convnextimageprocessor | #convnextimageprocessor | .md | 216_5 |
The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior. ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#convnextmodel | #convnextmodel | .md | 216_6 |
ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matt... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#convnextforimageclassification | #convnextforimageclassification | .md | 216_7 |
No docstring available for TFConvNextModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#tfconvnextmodel | #tfconvnextmodel | .md | 216_8 |
No docstring available for TFConvNextForImageClassification
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convnext.md | https://huggingface.co/docs/transformers/en/model_doc/convnext/#tfconvnextforimageclassification | #tfconvnextforimageclassification | .md | 216_9 |
<!--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/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/ | .md | 217_0 | |
The SegFormer model was proposed in [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping
Luo. The model consists of a hierarchical Transformer encoder and a lightweight all-MLP... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#overview | #overview | .md | 217_1 |
- SegFormer consists of a hierarchical Transformer encoder, and a lightweight all-MLP decoder head.
[`SegformerModel`] is the hierarchical Transformer encoder (which in the paper is also referred to
as Mix Transformer or MiT). [`SegformerForSemanticSegmentation`] adds the all-MLP decoder head on
top to perform semantic... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#usage-tips | #usage-tips | .md | 217_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with SegFormer.
<PipelineTag pipeline="image-classification"/>
- [`SegformerForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-cl... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#resources | #resources | .md | 217_3 |
This is the configuration class to store the configuration of a [`SegformerModel`]. It is used to instantiate an
SegFormer 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 SegFormer
[nvidia/segf... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerconfig | #segformerconfig | .md | 217_4 |
No docstring available for SegformerFeatureExtractor
Methods: __call__
- post_process_semantic_segmentation | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerfeatureextractor | #segformerfeatureextractor | .md | 217_5 |
Constructs a Segformer image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `(size["height"],
size["width"])`. Can be overridden by the `do_resize` parameter in the `preprocess` method.
size (`Dict[str, int]` *optional*, d... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerimageprocessor | #segformerimageprocessor | .md | 217_6 |
The bare SegFormer encoder (Mix-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 ge... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformermodel | #segformermodel | .md | 217_7 |
No docstring available for SegformerDecodeHead
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerdecodehead | #segformerdecodehead | .md | 217_8 |
SegFormer Model transformer with an image classification head on top (a linear layer on top of the final hidden
states) 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 PyTorch documenta... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerforimageclassification | #segformerforimageclassification | .md | 217_9 |
SegFormer Model transformer with an all-MLP decode head on top e.g. for ADE20k, CityScapes.
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
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#segformerforsemanticsegmentation | #segformerforsemanticsegmentation | .md | 217_10 |
No docstring available for TFSegformerDecodeHead
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#tfsegformerdecodehead | #tfsegformerdecodehead | .md | 217_11 |
No docstring available for TFSegformerModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#tfsegformermodel | #tfsegformermodel | .md | 217_12 |
No docstring available for TFSegformerForImageClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#tfsegformerforimageclassification | #tfsegformerforimageclassification | .md | 217_13 |
No docstring available for TFSegformerForSemanticSegmentation
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/segformer.md | https://huggingface.co/docs/transformers/en/model_doc/segformer/#tfsegformerforsemanticsegmentation | #tfsegformerforsemanticsegmentation | .md | 217_14 |
<!--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/xls_r.md | https://huggingface.co/docs/transformers/en/model_doc/xls_r/ | .md | 218_0 | |
The XLS-R model was proposed in [XLS-R: Self-supervised Cross-lingual Speech Representation Learning at Scale](https://arxiv.org/abs/2111.09296) by Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman
Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Co... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xls_r.md | https://huggingface.co/docs/transformers/en/model_doc/xls_r/#overview | #overview | .md | 218_1 |
- XLS-R is a speech model that accepts a float array corresponding to the raw waveform of the speech signal.
- XLS-R model was trained using connectionist temporal classification (CTC) so the model output has to be decoded using
[`Wav2Vec2CTCTokenizer`].
<Tip>
XLS-R's architecture is based on the Wav2Vec2 model, re... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xls_r.md | https://huggingface.co/docs/transformers/en/model_doc/xls_r/#usage-tips | #usage-tips | .md | 218_2 |
<!--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/xlm-v.md | https://huggingface.co/docs/transformers/en/model_doc/xlm-v/ | .md | 219_0 | |
XLM-V is multilingual language model with a one million token vocabulary trained on 2.5TB of data from Common Crawl (same as XLM-R).
It was introduced in the [XLM-V: Overcoming the Vocabulary Bottleneck in Multilingual Masked Language Models](https://arxiv.org/abs/2301.10472)
paper by Davis Liang, Hila Gonen, Yuning Ma... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm-v.md | https://huggingface.co/docs/transformers/en/model_doc/xlm-v/#overview | #overview | .md | 219_1 |
- XLM-V is compatible with the XLM-RoBERTa model architecture, only model weights from [`fairseq`](https://github.com/facebookresearch/fairseq)
library had to be converted.
- The `XLMTokenizer` implementation is used to load the vocab and performs tokenization.
A XLM-V (base size) model is available under the [`faceb... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm-v.md | https://huggingface.co/docs/transformers/en/model_doc/xlm-v/#usage-tips | #usage-tips | .md | 219_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/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/ | .md | 220_0 | |
The RemBERT model was proposed in [Rethinking Embedding Coupling in Pre-trained Language Models](https://arxiv.org/abs/2010.12821) by Hyung Won Chung, Thibault Févry, Henry Tsai, Melvin Johnson, Sebastian Ruder.
The abstract from the paper is the following:
*We re-evaluate the standard practice of sharing weights b... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#overview | #overview | .md | 220_1 |
For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuni... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#usage-tips | #usage-tips | .md | 220_2 |
- [Text classification task guide](../tasks/sequence_classification)
- [Token classification task guide](../tasks/token_classification)
- [Question answering task guide](../tasks/question_answering)
- [Causal language modeling task guide](../tasks/language_modeling)
- [Masked language modeling task guide](../tasks/mask... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#resources | #resources | .md | 220_3 |
This is the configuration class to store the configuration of a [`RemBertModel`]. It is used to instantiate an
RemBERT 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 RemBERT
[google/rembert](h... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertconfig | #rembertconfig | .md | 220_4 |
Construct a RemBERT 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`):
[SentencePiece... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#remberttokenizer | #remberttokenizer | .md | 220_5 |
Construct a "fast" RemBert tokenizer (backed by HuggingFace's *tokenizers* library). Based on
[Unigram](https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models). This
tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of the main methods. Users should refer to
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#remberttokenizerfast | #remberttokenizerfast | .md | 220_6 |
The bare RemBERT 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 usag... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertmodel | #rembertmodel | .md | 220_7 |
RemBERT 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.
Parame... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertforcausallm | #rembertforcausallm | .md | 220_8 |
RemBERT Model with a `language modeling` 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
behavior.
Parameters:
config ([`RemB... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertformaskedlm | #rembertformaskedlm | .md | 220_9 |
RemBERT 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 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 do... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertforsequenceclassification | #rembertforsequenceclassification | .md | 220_10 |
RemBERT 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 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 P... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertformultiplechoice | #rembertformultiplechoice | .md | 220_11 |
RemBERT 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 PyT... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertfortokenclassification | #rembertfortokenclassification | .md | 220_12 |
RemBERT 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 is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-clas... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#rembertforquestionanswering | #rembertforquestionanswering | .md | 220_13 |
No docstring available for TFRemBertModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertmodel | #tfrembertmodel | .md | 220_14 |
No docstring available for TFRemBertForMaskedLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertformaskedlm | #tfrembertformaskedlm | .md | 220_15 |
No docstring available for TFRemBertForCausalLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertforcausallm | #tfrembertforcausallm | .md | 220_16 |
No docstring available for TFRemBertForSequenceClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertforsequenceclassification | #tfrembertforsequenceclassification | .md | 220_17 |
No docstring available for TFRemBertForMultipleChoice
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertformultiplechoice | #tfrembertformultiplechoice | .md | 220_18 |
No docstring available for TFRemBertForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertfortokenclassification | #tfrembertfortokenclassification | .md | 220_19 |
No docstring available for TFRemBertForQuestionAnswering
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/rembert.md | https://huggingface.co/docs/transformers/en/model_doc/rembert/#tfrembertforquestionanswering | #tfrembertforquestionanswering | .md | 220_20 |
<!--Copyright 2024 The Qwen Team and 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 app... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_moe.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_moe/ | .md | 221_0 | |
Qwen2MoE is the new model series of large language models from the Qwen team. Previously, we released the Qwen series, including Qwen-72B, Qwen-1.8B, Qwen-VL, Qwen-Audio, etc. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/qwen2_moe.md | https://huggingface.co/docs/transformers/en/model_doc/qwen2_moe/#overview | #overview | .md | 221_1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.