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 |
|---|---|---|---|---|---|
<!--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/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/ | .md | 415_0 | |
The MobileViT model was proposed in [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari. MobileViT introduces a new layer that replaces local processing in convolutions with global processing using transformers.
Th... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#overview | #overview | .md | 415_1 |
- MobileViT is more like a CNN than a Transformer model. It does not work on sequence data but on batches of images. Unlike ViT, there are no embeddings. The backbone model outputs a feature map. You can follow [this tutorial](https://keras.io/examples/vision/mobilevit) for a lightweight introduction.
- One can use [`M... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#usage-tips | #usage-tips | .md | 415_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with MobileViT.
<PipelineTag pipeline="image-classification"/>
- [`MobileViTForImageClassification`] 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/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#resources | #resources | .md | 415_3 |
This is the configuration class to store the configuration of a [`MobileViTModel`]. It is used to instantiate a
MobileViT 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 MobileViT
[apple/mobile... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitconfig | #mobilevitconfig | .md | 415_4 |
No docstring available for MobileViTFeatureExtractor
Methods: __call__
- post_process_semantic_segmentation | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitfeatureextractor | #mobilevitfeatureextractor | .md | 415_5 |
Constructs a MobileViT image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by the
`do_resize` parameter in the `preprocess` method.
size (`Dict[str, int]` *optional*, defaults to `{"shortest_edge... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitimageprocessor | #mobilevitimageprocessor | .md | 415_6 |
The bare MobileViT model 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) subclass. 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/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitmodel | #mobilevitmodel | .md | 415_7 |
MobileViT 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 mat... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitforimageclassification | #mobilevitforimageclassification | .md | 415_8 |
MobileViT model with a semantic segmentation head on top, e.g. for Pascal VOC.
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/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#mobilevitforsemanticsegmentation | #mobilevitforsemanticsegmentation | .md | 415_9 |
No docstring available for TFMobileViTModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#tfmobilevitmodel | #tfmobilevitmodel | .md | 415_10 |
No docstring available for TFMobileViTForImageClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#tfmobilevitforimageclassification | #tfmobilevitforimageclassification | .md | 415_11 |
No docstring available for TFMobileViTForSemanticSegmentation
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mobilevit.md | https://huggingface.co/docs/transformers/en/model_doc/mobilevit/#tfmobilevitforsemanticsegmentation | #tfmobilevitforsemanticsegmentation | .md | 415_12 |
<!--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/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/ | .md | 416_0 | |
<div class="flex flex-wrap space-x-1">
<a href="https://huggingface.co/models?filter=xlm">
<img alt="Models" src="https://img.shields.io/badge/All_model_pages-xlm-blueviolet">
</a>
<a href="https://huggingface.co/spaces/docs-demos/xlm-mlm-en-2048">
<img alt="Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugg... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlm | #xlm | .md | 416_1 |
The XLM model was proposed in [Cross-lingual Language Model Pretraining](https://arxiv.org/abs/1901.07291) by
Guillaume Lample, Alexis Conneau. It's a transformer pretrained using one of the following objectives:
- a causal language modeling (CLM) objective (next token prediction),
- a masked language modeling (MLM) ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#overview | #overview | .md | 416_2 |
- XLM has many different checkpoints, which were trained using different objectives: CLM, MLM or TLM. Make sure to
select the correct objective for your task (e.g. MLM checkpoints are not suitable for generation).
- XLM has multilingual checkpoints which leverage a specific `lang` parameter. Check out the [multi-lingua... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#usage-tips | #usage-tips | .md | 416_3 |
- [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/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#resources | #resources | .md | 416_4 |
This is the configuration class to store the configuration of a [`XLMModel`] or a [`TFXLMModel`]. It is used to
instantiate a XLM 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
[FacebookAI/xlm... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmconfig | #xlmconfig | .md | 416_5 |
Construct an XLM tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:
- Moses preprocessing and tokenization for most supported languages.
- Language specific tokenization for Chinese (Jieba), Japanese (KyTea) and Thai (PyThaiNLP).
- Optionally lowercases and normalizes all inputs text.
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmtokenizer | #xlmtokenizer | .md | 416_6 |
models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput
Base class for outputs of question answering models using a `SquadHead`.
Args:
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned if both `start_positions` and `end_positions` are provided):
Classification loss as the sum of start token, end token (... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlm-specific-outputs | #xlm-specific-outputs | .md | 416_7 |
The bare XLM 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
e... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmmodel | #xlmmodel | .md | 416_8 |
The XLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).
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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmwithlmheadmodel | #xlmwithlmheadmodel | .md | 416_9 |
XLM Model 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 saving, resizing t... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmforsequenceclassification | #xlmforsequenceclassification | .md | 416_10 |
XLM 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 downloading ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmformultiplechoice | #xlmformultiplechoice | .md | 416_11 |
XLM 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 or... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmfortokenclassification | #xlmfortokenclassification | .md | 416_12 |
XLM 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
li... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmforquestionansweringsimple | #xlmforquestionansweringsimple | .md | 416_13 |
XLM Model with a beam-search 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 me... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#xlmforquestionanswering | #xlmforquestionanswering | .md | 416_14 |
No docstring available for TFXLMModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmmodel | #tfxlmmodel | .md | 416_15 |
No docstring available for TFXLMWithLMHeadModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmwithlmheadmodel | #tfxlmwithlmheadmodel | .md | 416_16 |
No docstring available for TFXLMForSequenceClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmforsequenceclassification | #tfxlmforsequenceclassification | .md | 416_17 |
No docstring available for TFXLMForMultipleChoice
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmformultiplechoice | #tfxlmformultiplechoice | .md | 416_18 |
No docstring available for TFXLMForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmfortokenclassification | #tfxlmfortokenclassification | .md | 416_19 |
No docstring available for TFXLMForQuestionAnsweringSimple
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xlm.md | https://huggingface.co/docs/transformers/en/model_doc/xlm/#tfxlmforquestionansweringsimple | #tfxlmforquestionansweringsimple | .md | 416_20 |
<!--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/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/ | .md | 417_0 | |
The LongT5 model was proposed in [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916)
by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung and Yinfei Yang. It's an
encoder-decoder transformer pre-trained in a text-to-text denoising generativ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#overview | #overview | .md | 417_1 |
- [`LongT5ForConditionalGeneration`] is an extension of [`T5ForConditionalGeneration`] exchanging the traditional
encoder *self-attention* layer with efficient either *local* attention or *transient-global* (*tglobal*) attention.
- Unlike the T5 model, LongT5 does not use a task prefix. Furthermore, it uses a different... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#usage-tips | #usage-tips | .md | 417_2 |
- [Translation task guide](../tasks/translation)
- [Summarization task guide](../tasks/summarization) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#resources | #resources | .md | 417_3 |
This is the configuration class to store the configuration of a [`LongT5Model`] or a [`FlaxLongT5Model`]. It is
used to instantiate a LongT5 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 Long... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#longt5config | #longt5config | .md | 417_4 |
The bare LONGT5 Model transformer outputting raw hidden-states without any specific head on top.
The LongT5 model was proposed in [LongT5: Efficient Text-To-Text Transformer for Long
Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo
Ni, Yun-Hsuan Sung and... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#longt5model | #longt5model | .md | 417_5 |
LONGT5 Model with a `language modeling` head on top.
The LongT5 model was proposed in [LongT5: Efficient Text-To-Text Transformer for Long
Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo
Ni, Yun-Hsuan Sung and Yinfei Yang. It's an encoder-decoder transf... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#longt5forconditionalgeneration | #longt5forconditionalgeneration | .md | 417_6 |
The bare LONGT5 Model transformer outputting encoder's raw hidden-states without any specific head on top.
The LongT5 model was proposed in [LongT5: Efficient Text-To-Text Transformer for Long
Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo
Ni, Yun-Hsua... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#longt5encodermodel | #longt5encodermodel | .md | 417_7 |
No docstring available for FlaxLongT5Model
Methods: __call__
- encode
- decode | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#flaxlongt5model | #flaxlongt5model | .md | 417_8 |
No docstring available for FlaxLongT5ForConditionalGeneration
Methods: __call__
- encode
- decode
</jax>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longt5.md | https://huggingface.co/docs/transformers/en/model_doc/longt5/#flaxlongt5forconditionalgeneration | #flaxlongt5forconditionalgeneration | .md | 417_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/cpm.md | https://huggingface.co/docs/transformers/en/model_doc/cpm/ | .md | 418_0 | |
The CPM model was proposed in [CPM: A Large-scale Generative Chinese Pre-trained Language Model](https://arxiv.org/abs/2012.00413) by Zhengyan Zhang, Xu Han, Hao Zhou, Pei Ke, Yuxian Gu, Deming Ye, Yujia Qin,
Yusheng Su, Haozhe Ji, Jian Guan, Fanchao Qi, Xiaozhi Wang, Yanan Zheng, Guoyang Zeng, Huanqi Cao, Shengqi Chen... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cpm.md | https://huggingface.co/docs/transformers/en/model_doc/cpm/#overview | #overview | .md | 418_1 |
Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cpm.md | https://huggingface.co/docs/transformers/en/model_doc/cpm/#cpmtokenizer | #cpmtokenizer | .md | 418_2 |
Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cpm.md | https://huggingface.co/docs/transformers/en/model_doc/cpm/#cpmtokenizerfast | #cpmtokenizerfast | .md | 418_3 |
<!--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/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/ | .md | 419_0 | |
The PatchTST model was proposed in [A Time Series is Worth 64 Words: Long-term Forecasting with Transformers](https://arxiv.org/abs/2211.14730) by Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong and Jayant Kalagnanam.
At a high level the model vectorizes time series into patches of a given size and encodes the resulting ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#overview | #overview | .md | 419_1 |
The model can also be used for time series classification and time series regression. See the respective [`PatchTSTForClassification`] and [`PatchTSTForRegression`] classes. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#usage-tips | #usage-tips | .md | 419_2 |
- A blog post explaining PatchTST in depth can be found [here](https://huggingface.co/blog/patchtst). The blog can also be opened in Google Colab. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#resources | #resources | .md | 419_3 |
This is the configuration class to store the configuration of an [`PatchTSTModel`]. It is used to instantiate an
PatchTST model according to the specified arguments, defining the model architecture.
[ibm/patchtst](https://huggingface.co/ibm/patchtst) architecture.
Configuration objects inherit from [`PretrainedConfig... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstconfig | #patchtstconfig | .md | 419_4 |
The bare PatchTST Model outputting raw hidden-states without any specific head.
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 mode... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstmodel | #patchtstmodel | .md | 419_5 |
The PatchTST for prediction 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 is also a PyTorch [torch.nn.Module](https:/... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstforprediction | #patchtstforprediction | .md | 419_6 |
The PatchTST for classification 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 is also a PyTorch [torch.nn.Module](htt... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstforclassification | #patchtstforclassification | .md | 419_7 |
The PatchTST for pretrain 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 is also a PyTorch [torch.nn.Module](https://p... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstforpretraining | #patchtstforpretraining | .md | 419_8 |
The PatchTST for regression 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 is also a PyTorch [torch.nn.Module](https:/... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/patchtst.md | https://huggingface.co/docs/transformers/en/model_doc/patchtst/#patchtstforregression | #patchtstforregression | .md | 419_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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/ | .md | 420_0 | |
<div class="flex flex-wrap space-x-1">
<a href="https://huggingface.co/models?filter=longformer">
<img alt="Models" src="https://img.shields.io/badge/All_model_pages-longformer-blueviolet">
</a>
<a href="https://huggingface.co/spaces/docs-demos/longformer-base-4096-finetuned-squadv1">
<img alt="Spaces" src="https://img... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformer | #longformer | .md | 420_1 |
The Longformer model was presented in [Longformer: The Long-Document Transformer](https://arxiv.org/pdf/2004.05150.pdf) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
The abstract from the paper is the following:
*Transformer-based models are unable to process long sequences due to their self-attention operation, w... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#overview | #overview | .md | 420_2 |
- Since the Longformer is based on RoBERTa, it 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
`</s>`).
- A transformer model replacing the attention matrices by sparse matrices to go faster. ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#usage-tips | #usage-tips | .md | 420_3 |
Longformer self attention employs self attention on both a "local" context and a "global" context. Most tokens only
attend "locally" to each other meaning that each token attends to its \\(\frac{1}{2} w\\) previous tokens and
\\(\frac{1}{2} w\\) succeeding tokens with \\(w\\) being the window length as defined in
`conf... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformer-self-attention | #longformer-self-attention | .md | 420_4 |
[`LongformerForMaskedLM`] is trained the exact same way [`RobertaForMaskedLM`] is
trained and should be used as follows:
```python
input_ids = tokenizer.encode("This is a sentence from [MASK] training data", return_tensors="pt")
mlm_labels = tokenizer.encode("This is a sentence from the training data", return_tensors... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#training | #training | .md | 420_5 |
- [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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#resources | #resources | .md | 420_6 |
This is the configuration class to store the configuration of a [`LongformerModel`] or a [`TFLongformerModel`]. It
is used to instantiate a Longformer model according to the specified arguments, defining the model architecture.
This is the configuration class to store the configuration of a [`LongformerModel`]. It is... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerconfig | #longformerconfig | .md | 420_7 |
Constructs a Longformer tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding.
This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will
be encoded differently whether it is at the beginning of the sentence (without space) or not:
`... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformertokenizer | #longformertokenizer | .md | 420_8 |
Construct a "fast" Longformer tokenizer (backed by HuggingFace's *tokenizers* library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.
This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will
be encoded differently whether it is at the ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformertokenizerfast | #longformertokenizerfast | .md | 420_9 |
models.longformer.modeling_longformer.LongformerBaseModelOutput
Base class for Longformer's outputs, with potential hidden states, local and global attentions.
Args:
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`):
Sequence of hidden-states at the output of the last lay... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformer-specific-outputs | #longformer-specific-outputs | .md | 420_10 |
The bare Longformer 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.) ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformermodel | #longformermodel | .md | 420_11 |
Longformer 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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerformaskedlm | #longformerformaskedlm | .md | 420_12 |
Longformer 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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerforsequenceclassification | #longformerforsequenceclassification | .md | 420_13 |
Longformer 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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerformultiplechoice | #longformerformultiplechoice | .md | 420_14 |
Longformer 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/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerfortokenclassification | #longformerfortokenclassification | .md | 420_15 |
Longformer Model with a span classification head on top for extractive question-answering tasks like SQuAD /
TriviaQA (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 gene... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#longformerforquestionanswering | #longformerforquestionanswering | .md | 420_16 |
No docstring available for TFLongformerModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformermodel | #tflongformermodel | .md | 420_17 |
No docstring available for TFLongformerForMaskedLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformerformaskedlm | #tflongformerformaskedlm | .md | 420_18 |
No docstring available for TFLongformerForQuestionAnswering
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformerforquestionanswering | #tflongformerforquestionanswering | .md | 420_19 |
No docstring available for TFLongformerForSequenceClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformerforsequenceclassification | #tflongformerforsequenceclassification | .md | 420_20 |
No docstring available for TFLongformerForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformerfortokenclassification | #tflongformerfortokenclassification | .md | 420_21 |
No docstring available for TFLongformerForMultipleChoice
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/longformer.md | https://huggingface.co/docs/transformers/en/model_doc/longformer/#tflongformerformultiplechoice | #tflongformerformultiplechoice | .md | 420_22 |
<!--Copyright 2022 NVIDIA 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 applicable... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/ | .md | 421_0 | |
The GroupViT model was proposed in [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
Inspired by [CLIP](clip), GroupViT is a vision-language model that can perform zero-shot ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#overview | #overview | .md | 421_1 |
- You may specify `output_segmentation=True` in the forward of `GroupViTModel` to get the segmentation logits of input texts. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#usage-tips | #usage-tips | .md | 421_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GroupViT.
- The quickest way to get started with GroupViT is by checking the [example notebooks](https://github.com/xvjiarui/GroupViT/blob/main/demo/GroupViT_hf_inference_notebook.ipynb) (which showcase zero-shot se... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#resources | #resources | .md | 421_3 |
[`GroupViTConfig`] is the configuration class to store the configuration of a [`GroupViTModel`]. It is used to
instantiate a GroupViT model according to the specified arguments, defining the text model and vision model
configs. 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/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvitconfig | #groupvitconfig | .md | 421_4 |
This is the configuration class to store the configuration of a [`GroupViTTextModel`]. It is used to instantiate an
GroupViT 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 GroupViT
[nvidia/gro... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvittextconfig | #groupvittextconfig | .md | 421_5 |
This is the configuration class to store the configuration of a [`GroupViTVisionModel`]. It is used to instantiate
an GroupViT 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 GroupViT
[nvidia/g... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvitvisionconfig | #groupvitvisionconfig | .md | 421_6 |
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.
Parameters:
config ([`GroupViTConfig`]): Model configuration class with all the p... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvitmodel | #groupvitmodel | .md | 421_7 |
No docstring available for GroupViTTextModel
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvittextmodel | #groupvittextmodel | .md | 421_8 |
No docstring available for GroupViTVisionModel
Methods: forward
</pt>
<tf> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#groupvitvisionmodel | #groupvitvisionmodel | .md | 421_9 |
No docstring available for TFGroupViTModel
Methods: call
- get_text_features
- get_image_features | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#tfgroupvitmodel | #tfgroupvitmodel | .md | 421_10 |
No docstring available for TFGroupViTTextModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#tfgroupvittextmodel | #tfgroupvittextmodel | .md | 421_11 |
No docstring available for TFGroupViTVisionModel
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/groupvit.md | https://huggingface.co/docs/transformers/en/model_doc/groupvit/#tfgroupvitvisionmodel | #tfgroupvitvisionmodel | .md | 421_12 |
<!--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/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/ | .md | 422_0 | |
The Pix2Struct model was proposed in [Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding](https://arxiv.org/abs/2210.03347) by Kenton Lee, Mandar Joshi, Iulia Turc, Hexiang Hu, Fangyu Liu, Julian Eisenschlos, Urvashi Khandelwal, Peter Shaw, Ming-Wei Chang, Kristina Toutanova.
The abstract... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/#overview | #overview | .md | 422_1 |
- [Fine-tuning Notebook](https://github.com/huggingface/notebooks/blob/main/examples/image_captioning_pix2struct.ipynb)
- [All models](https://huggingface.co/models?search=pix2struct) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/#resources | #resources | .md | 422_2 |
[`Pix2StructConfig`] is the configuration class to store the configuration of a
[`Pix2StructForConditionalGeneration`]. It is used to instantiate a Pix2Struct model according to the specified
arguments, defining the text model and vision model configs. Instantiating a configuration with the defaults will
yield a simila... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/#pix2structconfig | #pix2structconfig | .md | 422_3 |
This is the configuration class to store the configuration of a [`Pix2StructTextModel`]. It is used to instantiate
a Pix2Struct text 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 Pix2Struct t... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/#pix2structtextconfig | #pix2structtextconfig | .md | 422_4 |
This is the configuration class to store the configuration of a [`Pix2StructVisionModel`]. It is used to
instantiate a Pix2Struct vision model according to the specified arguments, defining the model architecture.
Instantiating a configuration defaults will yield a similar configuration to that of the Pix2Struct-base
[... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/pix2struct.md | https://huggingface.co/docs/transformers/en/model_doc/pix2struct/#pix2structvisionconfig | #pix2structvisionconfig | .md | 422_5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.