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 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/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/ | .md | 298_0 | |
The BROS model was proposed in [BROS: A Pre-trained Language Model Focusing on Text and Layout for Better Key Information Extraction from Documents](https://arxiv.org/abs/2108.04539) by Teakgyu Hong, Donghyun Kim, Mingi Ji, Wonseok Hwang, Daehyun Nam, Sungrae Park.
BROS stands for *BERT Relying On Spatiality*. It is ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#overview | #overview | .md | 298_1 |
- [`~transformers.BrosModel.forward`] requires `input_ids` and `bbox` (bounding box). Each bounding box should be in (x0, y0, x1, y1) format (top-left corner, bottom-right corner). Obtaining of Bounding boxes depends on external OCR system. The `x` coordinate should be normalized by document image width, and the `y` co... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#usage-tips-and-examples | #usage-tips-and-examples | .md | 298_2 |
- Demo scripts can be found [here](https://github.com/clovaai/bros). | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#resources | #resources | .md | 298_3 |
This is the configuration class to store the configuration of a [`BrosModel`] or a [`TFBrosModel`]. It is used to
instantiate a Bros 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 Bros
[jinho8... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosconfig | #brosconfig | .md | 298_4 |
Constructs a Bros processor which wraps a BERT tokenizer.
[`BrosProcessor`] offers all the functionalities of [`BertTokenizerFast`]. See the docstring of
[`~BrosProcessor.__call__`] and [`~BrosProcessor.decode`] for more information.
Args:
tokenizer (`BertTokenizerFast`, *optional*):
An instance of ['BertTokenizerF... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosprocessor | #brosprocessor | .md | 298_5 |
The bare Bros Model transformer outputting raw hidden-states without any specific head on top.
This model is also 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 usa... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosmodel | #brosmodel | .md | 298_6 |
Bros 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 also 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 Py... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosfortokenclassification | #brosfortokenclassification | .md | 298_7 |
Bros Model with a token classification head on top (initial_token_layers and subsequent_token_layer on top of the
hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks. The initial_token_classifier is used to
predict the first token of each entity, and the subsequent_token_classifier is used to predict th... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosspadeeefortokenclassification | #brosspadeeefortokenclassification | .md | 298_8 |
Bros Model with a token classification head on top (a entity_linker layer on top of the hidden-states output) e.g.
for Entity-Linking. The entity_linker is used to predict intra-entity links (one entity to another entity).
This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bros.md | https://huggingface.co/docs/transformers/en/model_doc/bros/#brosspadeelfortokenclassification | #brosspadeelfortokenclassification | .md | 298_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/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/ | .md | 299_0 | |
<div class="flex flex-wrap space-x-1">
<a href="https://huggingface.co/models?filter=roberta">
<img alt="Models" src="https://img.shields.io/badge/All_model_pages-roberta-blueviolet">
</a>
<a href="https://huggingface.co/spaces/docs-demos/roberta-base">
<img alt="Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%2... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#roberta | #roberta | .md | 299_1 |
The RoBERTa model was proposed in [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, [Myle Ott](https://huggingface.co/myleott), Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer
Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. It is based on Google's B... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#overview | #overview | .md | 299_2 |
- This implementation is the same as [`BertModel`] with a minor tweak to the embeddings, as well as a setup
for RoBERTa pretrained models.
- RoBERTa has the same architecture as BERT but uses a byte-level BPE as a tokenizer (same as GPT-2) and uses a
different pretraining scheme.
- RoBERTa doesn't have `token_type_ids`... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#usage-tips | #usage-tips | .md | 299_3 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with RoBERTa. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#resources | #resources | .md | 299_4 |
This is the configuration class to store the configuration of a [`RobertaModel`] or a [`TFRobertaModel`]. It is
used to instantiate a RoBERTa 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 RoB... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaconfig | #robertaconfig | .md | 299_5 |
Constructs a RoBERTa 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:
```p... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertatokenizer | #robertatokenizer | .md | 299_6 |
Construct a "fast" RoBERTa 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 beg... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertatokenizerfast | #robertatokenizerfast | .md | 299_7 |
The bare RoBERTa 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 hea... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertamodel | #robertamodel | .md | 299_8 |
RoBERTa Model with a `language modeling` head on top for CLM fine-tuning.
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... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaforcausallm | #robertaforcausallm | .md | 299_9 |
RoBERTa 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 [tor... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaformaskedlm | #robertaformaskedlm | .md | 299_10 |
RoBERTa 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 sa... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaforsequenceclassification | #robertaforsequenceclassification | .md | 299_11 |
Roberta 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 download... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaformultiplechoice | #robertaformultiplechoice | .md | 299_12 |
Roberta 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 downloadin... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertafortokenclassification | #robertafortokenclassification | .md | 299_13 |
Roberta 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 th... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#robertaforquestionanswering | #robertaforquestionanswering | .md | 299_14 |
No docstring available for TFRobertaModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertamodel | #tfrobertamodel | .md | 299_15 |
No docstring available for TFRobertaForCausalLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertaforcausallm | #tfrobertaforcausallm | .md | 299_16 |
No docstring available for TFRobertaForMaskedLM
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertaformaskedlm | #tfrobertaformaskedlm | .md | 299_17 |
No docstring available for TFRobertaForSequenceClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertaforsequenceclassification | #tfrobertaforsequenceclassification | .md | 299_18 |
No docstring available for TFRobertaForMultipleChoice
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertaformultiplechoice | #tfrobertaformultiplechoice | .md | 299_19 |
No docstring available for TFRobertaForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertafortokenclassification | #tfrobertafortokenclassification | .md | 299_20 |
No docstring available for TFRobertaForQuestionAnswering
Methods: call
</tf>
<jax> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#tfrobertaforquestionanswering | #tfrobertaforquestionanswering | .md | 299_21 |
No docstring available for FlaxRobertaModel
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertamodel | #flaxrobertamodel | .md | 299_22 |
No docstring available for FlaxRobertaForCausalLM
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertaforcausallm | #flaxrobertaforcausallm | .md | 299_23 |
No docstring available for FlaxRobertaForMaskedLM
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertaformaskedlm | #flaxrobertaformaskedlm | .md | 299_24 |
No docstring available for FlaxRobertaForSequenceClassification
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertaforsequenceclassification | #flaxrobertaforsequenceclassification | .md | 299_25 |
No docstring available for FlaxRobertaForMultipleChoice
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertaformultiplechoice | #flaxrobertaformultiplechoice | .md | 299_26 |
No docstring available for FlaxRobertaForTokenClassification
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertafortokenclassification | #flaxrobertafortokenclassification | .md | 299_27 |
No docstring available for FlaxRobertaForQuestionAnswering
Methods: __call__
</jax>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/roberta.md | https://huggingface.co/docs/transformers/en/model_doc/roberta/#flaxrobertaforquestionanswering | #flaxrobertaforquestionanswering | .md | 299_28 |
<!--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/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/ | .md | 300_0 | |
The Swin Transformer V2 model was proposed in [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
The abstract from the paper is the following: ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#overview | #overview | .md | 300_1 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Swin Transformer v2.
<PipelineTag pipeline="image-classification"/>
- [`Swinv2ForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/i... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#resources | #resources | .md | 300_2 |
This is the configuration class to store the configuration of a [`Swinv2Model`]. It is used to instantiate a Swin
Transformer v2 model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Swin Transformer... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#swinv2config | #swinv2config | .md | 300_3 |
The bare Swinv2 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#swinv2model | #swinv2model | .md | 300_4 |
Swinv2 Model with a decoder on top for masked image modeling, as proposed in
[SimMIM](https://arxiv.org/abs/2111.09886).
<Tip>
Note that we provide a script to pre-train this model on custom data in our [examples
directory](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining). ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#swinv2formaskedimagemodeling | #swinv2formaskedimagemodeling | .md | 300_5 |
Swinv2 Model transformer with an image classification head on top (a linear layer on top of the final hidden state
of the [CLS] token) e.g. for ImageNet.
<Tip>
Note that it's possible to fine-tune SwinV2 on higher resolution images than the ones it has been trained on, by
setting `interpolate_pos_encoding` to `True... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/swinv2.md | https://huggingface.co/docs/transformers/en/model_doc/swinv2/#swinv2forimageclassification | #swinv2forimageclassification | .md | 300_6 |
<!--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/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/ | .md | 301_0 | |
The LED model was proposed in [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) 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, which scales
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#overview | #overview | .md | 301_1 |
- [`LEDForConditionalGeneration`] is an extension of
[`BartForConditionalGeneration`] exchanging the traditional *self-attention* layer with
*Longformer*'s *chunked self-attention* layer. [`LEDTokenizer`] is an alias of
[`BartTokenizer`].
- LED works very well on long-range *sequence-to-sequence* tasks where the `input... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#usage-tips | #usage-tips | .md | 301_2 |
- [A notebook showing how to evaluate LED](https://colab.research.google.com/drive/12INTTR6n64TzS4RrXZxMSXfrOd9Xzamo?usp=sharing).
- [A notebook showing how to fine-tune LED](https://colab.research.google.com/drive/12LjJazBl7Gam0XBPy_y0CTOJZeZ34c2v?usp=sharing).
- [Text classification task guide](../tasks/sequence_clas... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#resources | #resources | .md | 301_3 |
This is the configuration class to store the configuration of a [`LEDModel`]. It is used to instantiate an LED
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 LED
[allenai/led-base-16384](https... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledconfig | #ledconfig | .md | 301_4 |
Constructs a LED tokenizer, which is smilar to the ROBERTa 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/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledtokenizer | #ledtokenizer | .md | 301_5 |
Construct a "fast" LED 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 beginni... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledtokenizerfast | #ledtokenizerfast | .md | 301_6 |
models.led.modeling_led.LEDEncoderBaseModelOutput
Base class for LEDEncoder'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 layer of the mode... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#led-specific-outputs | #led-specific-outputs | .md | 301_7 |
The bare LED Model outputting raw hidden-states without any specific head on top.
This model inherits from [`PreTrainedModel`]. See the superclass documentation for the generic methods the library
implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads etc.)
This mod... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledmodel | #ledmodel | .md | 301_8 |
The LED Model with a language modeling head. Can be used for summarization.
This model inherits from [`PreTrainedModel`]. See the superclass documentation for the generic methods the library
implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads etc.)
This model is ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledforconditionalgeneration | #ledforconditionalgeneration | .md | 301_9 |
LED model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.
This model inherits from [`PreTrainedModel`]. See the superclass documentation for the generic methods the library
implements for all its models (such as downloading or saving, resizing the input emb... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledforsequenceclassification | #ledforsequenceclassification | .md | 301_10 |
LED Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layer
on top of the hidden-states output to compute `span start logits` and `span end logits`).
This model inherits from [`PreTrainedModel`]. See the superclass documentation for the generic methods the libra... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#ledforquestionanswering | #ledforquestionanswering | .md | 301_11 |
No docstring available for TFLEDModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#tfledmodel | #tfledmodel | .md | 301_12 |
No docstring available for TFLEDForConditionalGeneration
Methods: call
</tf>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/led.md | https://huggingface.co/docs/transformers/en/model_doc/led/#tfledforconditionalgeneration | #tfledforconditionalgeneration | .md | 301_13 |
<!--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/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/ | .md | 302_0 | |
The Phi-3 model was proposed in [Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone](https://arxiv.org/abs/2404.14219) by Microsoft. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#overview | #overview | .md | 302_1 |
The abstract from the Phi-3 paper is the following:
We introduce phi-3-mini, a 3.8 billion parameter language model trained on 3.3 trillion tokens, whose overall performance, as measured by both academic benchmarks and internal testing, rivals that of models such as Mixtral 8x7B and GPT-3.5 (e.g., phi-3-mini achieves... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#summary | #summary | .md | 302_2 |
- This model is very similar to `Llama` with the main difference of [`Phi3SuScaledRotaryEmbedding`] and [`Phi3YarnScaledRotaryEmbedding`], where they are used to extend the context of the rotary embeddings. The query, key and values are fused, and the MLP's up and gate projection layers are also fused.
- The tokenizer ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#usage-tips | #usage-tips | .md | 302_3 |
<Tip warning={true}>
Phi-3 has been integrated in the development version (4.40.0.dev) of `transformers`. Until the official version is released through `pip`, ensure that you are doing one of the following:
* When loading the model, ensure that `trust_remote_code=True` is passed as an argument of the `from_pretrai... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#how-to-use-phi-3 | #how-to-use-phi-3 | .md | 302_4 |
This is the configuration class to store the configuration of a [`Phi3Model`]. It is used to instantiate a Phi-3
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the
[microsoft/Phi-3-mini-4k-instruc... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#phi3config | #phi3config | .md | 302_5 |
The bare Phi3 Model outputting raw hidden-states without any specific head on top.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This m... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#phi3model | #phi3model | .md | 302_6 |
No docstring available for Phi3ForCausalLM
Methods: forward
- generate | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#phi3forcausallm | #phi3forcausallm | .md | 302_7 |
The Phi3 Model transformer with a sequence classification head on top (linear layer).
[`Phi3ForSequenceClassification`] uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.
Since it does classification on the last token, it requires to know the position of the last token. I... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#phi3forsequenceclassification | #phi3forsequenceclassification | .md | 302_8 |
The Phi3 Model transformer 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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/phi3.md | https://huggingface.co/docs/transformers/en/model_doc/phi3/#phi3fortokenclassification | #phi3fortokenclassification | .md | 302_9 |
<!--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/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/ | .md | 303_0 | |
The UPerNet model was proposed in [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221)
by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun. UPerNet is a general framework to effectively segment
a wide range of concepts from images, leveraging any vision backbone like [ConvN... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/#overview | #overview | .md | 303_1 |
UPerNet is a general framework for semantic segmentation. It can be used with any vision backbone, like so:
```py
from transformers import SwinConfig, UperNetConfig, UperNetForSemanticSegmentation
backbone_config = SwinConfig(out_features=["stage1", "stage2", "stage3", "stage4"])
config = UperNetConfig(backbone_con... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/#usage-examples | #usage-examples | .md | 303_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with UPerNet.
- Demo notebooks for UPerNet can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/UPerNet).
- [`UperNetForSemanticSegmentation`] is supported by this [example script](https:/... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/#resources | #resources | .md | 303_3 |
This is the configuration class to store the configuration of an [`UperNetForSemanticSegmentation`]. It is used to
instantiate an UperNet 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 UperNet... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/#upernetconfig | #upernetconfig | .md | 303_4 |
UperNet framework leveraging any vision backbone e.g. for ADE20k, CityScapes.
Parameters:
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
be... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/upernet.md | https://huggingface.co/docs/transformers/en/model_doc/upernet/#upernetforsemanticsegmentation | #upernetforsemanticsegmentation | .md | 303_5 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/ | .md | 304_0 | |
The Blender chatbot model was proposed in [Recipes for building an open-domain chatbot](https://arxiv.org/pdf/2004.13637.pdf) Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.
The abstract of the pa... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#overview | #overview | .md | 304_1 |
Blenderbot is a model with absolute position embeddings so it's usually advised to pad the inputs on the right
rather than the left.
An example:
```python
>>> from transformers import BlenderbotTokenizer, BlenderbotForConditionalGeneration
>>> mname = "facebook/blenderbot-400M-distill"
>>> model = BlenderbotForCon... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#usage-tips-and-example | #usage-tips-and-example | .md | 304_2 |
- Blenderbot uses a standard [seq2seq model transformer](https://arxiv.org/pdf/1706.03762.pdf) based architecture.
- Available checkpoints can be found in the [model hub](https://huggingface.co/models?search=blenderbot).
- This is the *default* Blenderbot model class. However, some smaller checkpoints, such as
`faceboo... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#implementation-notes | #implementation-notes | .md | 304_3 |
- [Causal language modeling task guide](../tasks/language_modeling)
- [Translation task guide](../tasks/translation)
- [Summarization task guide](../tasks/summarization) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#resources | #resources | .md | 304_4 |
This is the configuration class to store the configuration of a [`BlenderbotModel`]. It is used to instantiate an
Blenderbot 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 Blenderbot
[facebook... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbotconfig | #blenderbotconfig | .md | 304_5 |
Constructs a Blenderbot 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/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbottokenizer | #blenderbottokenizer | .md | 304_6 |
Construct a "fast" Blenderbot 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/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbottokenizerfast | #blenderbottokenizerfast | .md | 304_7 |
See [`~transformers.BartModel`] for arguments to *forward* and *generate*
The bare Blenderbot 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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbotmodel | #blenderbotmodel | .md | 304_8 |
See [`~transformers.BartForConditionalGeneration`] for arguments to *forward* and *generate*
The Blenderbot Model with a language modeling head. Can be used for summarization.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its mo... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbotforconditionalgeneration | #blenderbotforconditionalgeneration | .md | 304_9 |
No docstring available for BlenderbotForCausalLM
Methods: forward
</pt>
<tf> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#blenderbotforcausallm | #blenderbotforcausallm | .md | 304_10 |
No docstring available for TFBlenderbotModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#tfblenderbotmodel | #tfblenderbotmodel | .md | 304_11 |
No docstring available for TFBlenderbotForConditionalGeneration
Methods: call
</tf>
<jax> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#tfblenderbotforconditionalgeneration | #tfblenderbotforconditionalgeneration | .md | 304_12 |
No docstring available for FlaxBlenderbotModel
Methods: __call__
- encode
- decode | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#flaxblenderbotmodel | #flaxblenderbotmodel | .md | 304_13 |
No docstring available for FlaxBlenderbotForConditionalGeneration
Methods: __call__
- encode
- decode
</jax>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/blenderbot.md | https://huggingface.co/docs/transformers/en/model_doc/blenderbot/#flaxblenderbotforconditionalgeneration | #flaxblenderbotforconditionalgeneration | .md | 304_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/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/ | .md | 305_0 | |
The Splinter model was proposed in [Few-Shot Question Answering by Pretraining Span Selection](https://arxiv.org/abs/2101.00438) by Ori Ram, Yuval Kirstain, Jonathan Berant, Amir Globerson, Omer Levy. Splinter
is an encoder-only transformer (similar to BERT) pretrained using the recurring span selection task on a large... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#overview | #overview | .md | 305_1 |
- Splinter was trained to predict answers spans conditioned on a special [QUESTION] token. These tokens contextualize
to question representations which are used to predict the answers. This layer is called QASS, and is the default
behaviour in the [`SplinterForQuestionAnswering`] class. Therefore:
- Use [`SplinterToken... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#usage-tips | #usage-tips | .md | 305_2 |
- [Question answering task guide](../tasks/question-answering) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#resources | #resources | .md | 305_3 |
This is the configuration class to store the configuration of a [`SplinterModel`]. It is used to instantiate an
Splinter 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 Splinter
[tau/splinter-b... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#splinterconfig | #splinterconfig | .md | 305_4 |
Construct a Splinter tokenizer. Based on WordPiece.
This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.
Args:
vocab_file (`str`):
File containing the vocabulary.
do_lower_case (`bool`, *opti... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#splintertokenizer | #splintertokenizer | .md | 305_5 |
Construct a "fast" Splinter 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`):
Fi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#splintertokenizerfast | #splintertokenizerfast | .md | 305_6 |
The bare Splinter 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 usa... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#splintermodel | #splintermodel | .md | 305_7 |
Splinter 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-cla... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/splinter.md | https://huggingface.co/docs/transformers/en/model_doc/splinter/#splinterforquestionanswering | #splinterforquestionanswering | .md | 305_8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.