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
This is the configuration class to store the configuration of a [`MegaModel`]. It is used to instantiate a Mega 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 Mega [mnaylor/mega-base-wikitext]...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaconfig
#megaconfig
.md
238_5
The bare MEGA Model transformer outputting raw hidden-states without any specific head on top. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megamodel
#megamodel
.md
238_6
MEGA 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 al...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaforcausallm
#megaforcausallm
.md
238_7
MEGA 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 [torch....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaformaskedlm
#megaformaskedlm
.md
238_8
MEGA 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 savin...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaforsequenceclassification
#megaforsequenceclassification
.md
238_9
MEGA 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/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaformultiplechoice
#megaformultiplechoice
.md
238_10
MEGA 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 o...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megafortokenclassification
#megafortokenclassification
.md
238_11
MEGA 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 l...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#megaforquestionanswering
#megaforquestionanswering
.md
238_12
<!--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/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/
.md
239_0
The CodeGen model was proposed in [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. CodeGen is an autoregressive language model for program synthesis trained sequentially o...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#overview
#overview
.md
239_1
* CodeGen model [checkpoints](https://huggingface.co/models?other=codegen) are available on different pre-training data with variable sizes. * The format is: `Salesforce/codegen-{size}-{data}`, where * `size`: `350M`, `2B`, `6B`, `16B` * `data`: * `nl`: Pre-trained on the Pile * `multi`: Initialized with `nl`, then fur...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#checkpoint-naming
#checkpoint-naming
.md
239_2
```python >>> from transformers import AutoModelForCausalLM, AutoTokenizer >>> checkpoint = "Salesforce/codegen-350M-mono" >>> model = AutoModelForCausalLM.from_pretrained(checkpoint) >>> tokenizer = AutoTokenizer.from_pretrained(checkpoint) >>> text = "def hello_world():" >>> completion = model.generate(**tokenizer...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#usage-example
#usage-example
.md
239_3
- [Causal language modeling task guide](../tasks/language_modeling)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#resources
#resources
.md
239_4
This is the configuration class to store the configuration of a [`CodeGenModel`]. It is used to instantiate a CodeGen 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 CodeGen [Salesforce/codegen...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#codegenconfig
#codegenconfig
.md
239_5
Construct a CodeGen tokenizer. Based on 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: ```python >>> from transformers impo...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#codegentokenizer
#codegentokenizer
.md
239_6
Construct a "fast" CodeGen tokenizer (backed by HuggingFace's *tokenizers* library). Based on 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...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#codegentokenizerfast
#codegentokenizerfast
.md
239_7
The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usag...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#codegenmodel
#codegenmodel
.md
239_8
The CodeGen Model transformer with a language modeling head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior. Parameters...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/codegen.md
https://huggingface.co/docs/transformers/en/model_doc/codegen/#codegenforcausallm
#codegenforcausallm
.md
239_9
The Cohere Command-R model was proposed in the blogpost [Command-R: Retrieval Augmented Generation at Production Scale](https://txt.cohere.com/command-r/) by the Cohere Team. The abstract from the paper is the following: *Command-R is a scalable generative model targeting RAG and Tool Use to enable production-scale...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#overview
#overview
.md
240_0
<Tip warning={true}> The checkpoints uploaded on the Hub use `torch_dtype = 'float16'`, which will be used by the `AutoModel` API to cast the checkpoints from `torch.float32` to `torch.float16`. The `dtype` of the online weights is mostly irrelevant unless you are using `torch_dtype="auto"` when initializing a mode...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#usage-tips
#usage-tips
.md
240_1
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Command-R. 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 a...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#resources
#resources
.md
240_2
This is the configuration class to store the configuration of a [`CohereModel`]. It is used to instantiate an Cohere model according to the specified arguments, defining the model architecture. Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the documentation...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#cohereconfig
#cohereconfig
.md
240_3
Construct a Cohere tokenizer. Based on byte-level Byte-Pair-Encoding. This uses notably ByteFallback and NFC normalization. ```python >>> from transformers import AutoTokenizer >>> tokenizer = AutoTokenizer.from_pretrained("CohereForAI/c4ai-command-r-v01") >>> tokenizer.encode("Hello this is a test") [5, 28339, 20...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#coheretokenizerfast
#coheretokenizerfast
.md
240_4
The bare Cohere 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...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#coheremodel
#coheremodel
.md
240_5
No docstring available for CohereForCausalLM Methods: forward
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/cohere.md
https://huggingface.co/docs/transformers/en/model_doc/cohere/#cohereforcausallm
#cohereforcausallm
.md
240_6
<!--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/granite.md
https://huggingface.co/docs/transformers/en/model_doc/granite/
.md
241_0
The Granite model was proposed in [Power Scheduler: A Batch Size and Token Number Agnostic Learning Rate Scheduler](https://arxiv.org/abs/2408.13359) by Yikang Shen, Matthew Stallone, Mayank Mishra, Gaoyuan Zhang, Shawn Tan, Aditya Prasad, Adriana Meza Soria, David D. Cox and Rameswar Panda. PowerLM-3B is a 3B state-...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/granite.md
https://huggingface.co/docs/transformers/en/model_doc/granite/#overview
#overview
.md
241_1
This is the configuration class to store the configuration of a [`GraniteModel`]. It is used to instantiate an Granite 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 Granite-3B. Configuratio...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/granite.md
https://huggingface.co/docs/transformers/en/model_doc/granite/#graniteconfig
#graniteconfig
.md
241_2
The bare Granite 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.) Thi...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/granite.md
https://huggingface.co/docs/transformers/en/model_doc/granite/#granitemodel
#granitemodel
.md
241_3
No docstring available for GraniteForCausalLM Methods: forward
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/granite.md
https://huggingface.co/docs/transformers/en/model_doc/granite/#graniteforcausallm
#graniteforcausallm
.md
241_4
<!--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/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/
.md
242_0
<div class="flex flex-wrap space-x-1"> <a href="https://huggingface.co/models?filter=prophetnet"> <img alt="Models" src="https://img.shields.io/badge/All_model_pages-prophetnet-blueviolet"> </a> <a href="https://huggingface.co/spaces/docs-demos/prophetnet-large-uncased"> <img alt="Spaces" src="https://img.shields.io/ba...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnet
#prophetnet
.md
242_1
The ProphetNet model was proposed in [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training,](https://arxiv.org/abs/2001.04063) by Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang, Ming Zhou on 13 Jan, 2020. ProphetNet is an encoder-decoder model and can predict...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#overview
#overview
.md
242_2
- ProphetNet is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than the left. - The model architecture is based on the original Transformer, but replaces the “standard” self-attention mechanism in the decoder by a main self-attention mechanism and a self and n-st...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#usage-tips
#usage-tips
.md
242_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/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#resources
#resources
.md
242_4
This is the configuration class to store the configuration of a [`ProphetNetModel`]. It is used to instantiate a ProphetNet 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 ProphetNet [microsoft...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetconfig
#prophetnetconfig
.md
242_5
Construct a ProphetNetTokenizer. 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`, *opt...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnettokenizer
#prophetnettokenizer
.md
242_6
models.prophetnet.modeling_prophetnet.ProphetNetSeq2SeqLMOutput Base class for sequence-to-sequence language models outputs. Args: loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided): Language modeling loss. logits (`torch.FloatTensor` of shape `(batch_size, decoder_sequence_l...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnet-specific-outputs
#prophetnet-specific-outputs
.md
242_7
The bare ProphetNet 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/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetmodel
#prophetnetmodel
.md
242_8
The standalone encoder part of the ProphetNetModel. 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.) Original ProphetNet code can be found...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetencoder
#prophetnetencoder
.md
242_9
The standalone decoder part of the ProphetNetModel. 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.) Original ProphetNet code can be found...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetdecoder
#prophetnetdecoder
.md
242_10
The ProphetNet Model with a language modeling head. Can be used for sequence generation 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 the input embeddings, pruning heads et...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetforconditionalgeneration
#prophetnetforconditionalgeneration
.md
242_11
The standalone decoder part of the ProphetNetModel with a lm head on top. The model can be used for causal language modeling. 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 inp...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/prophetnet.md
https://huggingface.co/docs/transformers/en/model_doc/prophetnet/#prophetnetforcausallm
#prophetnetforcausallm
.md
242_12
<!--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/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/
.md
243_0
We introduce GPT-NeoX-20B, a 20 billion parameter autoregressive language model trained on the Pile, whose weights will be made freely and openly available to the public through a permissive license. It is, to the best of our knowledge, the largest dense autoregressive model that has publicly available weights at the t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#overview
#overview
.md
243_1
The `generate()` method can be used to generate text using GPT Neo model. ```python >>> from transformers import GPTNeoXForCausalLM, GPTNeoXTokenizerFast >>> model = GPTNeoXForCausalLM.from_pretrained("EleutherAI/gpt-neox-20b") >>> tokenizer = GPTNeoXTokenizerFast.from_pretrained("EleutherAI/gpt-neox-20b") >>> prom...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#usage-example
#usage-example
.md
243_2
Flash Attention 2 is an faster, optimized version of the model.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#using-flash-attention-2
#using-flash-attention-2
.md
243_3
First, check whether your hardware is compatible with Flash Attention 2. The latest list of compatible hardware can be found in the [official documentation](https://github.com/Dao-AILab/flash-attention#installation-and-features). If your hardware is not compatible with Flash Attention 2, you can still benefit from atte...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#installation
#installation
.md
243_4
To load a model using Flash Attention 2, we can pass the argument `attn_implementation="flash_attention_2"` to [`.from_pretrained`](https://huggingface.co/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained). We'll also load the model in half-precision (e.g. `torch.float16`), since...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#usage
#usage
.md
243_5
Below is an expected speedup diagram that compares pure inference time between the native implementation in transformers using `stockmark/gpt-neox-japanese-1.4b` checkpoint and the Flash Attention 2 version of the model using a sequence length of 2048. <div style="text-align: center"> <img src="https://huggingface.co...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#expected-speedups
#expected-speedups
.md
243_6
PyTorch includes a native scaled dot-product attention (SDPA) operator as part of `torch.nn.functional`. This function encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the [official documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.s...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#using-scaled-dot-product-attention-sdpa
#using-scaled-dot-product-attention-sdpa
.md
243_7
| Batch size | Seq len | Time per batch (Eager - s) | Time per batch (SDPA - s) | Speedup (%) | Eager peak mem (MB) | SDPA peak mem (MB) | Mem saving (%) | |-----------:|-----------:|---------------------------:|-----------------------------:|------------:|--------------------:|-------------------:|-----------...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#training
#training
.md
243_8
| Batch size | Seq len | Per token latency Eager (ms) | Per token latency SDPA (ms) | Speedup (%) | Mem Eager (MB) | Mem SDPA (MB) | Mem saved (%) | |--------------:|-------------:|--------------------------------:|-------------------------------:|---------------:|------------------:|----------...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#inference
#inference
.md
243_9
- [Causal language modeling task guide](../tasks/language_modeling)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#resources
#resources
.md
243_10
This is the configuration class to store the configuration of a [`GPTNeoXModel`]. It is used to instantiate an GPTNeoX 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 GPTNeoX [EleutherAI/gpt-ne...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxconfig
#gptneoxconfig
.md
243_11
Construct a "fast" GPT-NeoX-20B tokenizer (backed by HuggingFace's *tokenizers* library). Based on 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 (wi...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxtokenizerfast
#gptneoxtokenizerfast
.md
243_12
The bare GPTNeoX Model transformer outputting raw hidden-states without any specific head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usag...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxmodel
#gptneoxmodel
.md
243_13
GPTNeoX Model with a `language modeling` head on top for CLM fine-tuning. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior. Parame...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxforcausallm
#gptneoxforcausallm
.md
243_14
The GPT-NeoX Model transformer 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 is 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/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxforquestionanswering
#gptneoxforquestionanswering
.md
243_15
The GPTNeoX Model transformer with a sequence classification head on top (linear layer). [`GPTNeoXForSequenceClassification`] uses the last token in order to do the classification, as other causal models (e.g. GPT-1) do. Since it does classification on the last token, it requires to know the position of the last to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxforsequenceclassification
#gptneoxforsequenceclassification
.md
243_16
No docstring available for GPTNeoXForTokenClassification Methods: forward
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gpt_neox.md
https://huggingface.co/docs/transformers/en/model_doc/gpt_neox/#gptneoxfortokenclassification
#gptneoxfortokenclassification
.md
243_17
<!--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/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/
.md
244_0
FSMT (FairSeq MachineTranslation) models were introduced in [Facebook FAIR's WMT19 News Translation Task Submission](https://arxiv.org/abs/1907.06616) by Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, Sergey Edunov. The abstract of the paper is the following: *This paper describes Facebook FAIR's subm...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#overview
#overview
.md
244_1
- FSMT uses source and target vocabulary pairs that aren't combined into one. It doesn't share embeddings tokens either. Its tokenizer is very similar to [`XLMTokenizer`] and the main model is derived from [`BartModel`].
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#implementation-notes
#implementation-notes
.md
244_2
This is the configuration class to store the configuration of a [`FSMTModel`]. It is used to instantiate a FSMT 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 FSMT [facebook/wmt19-en-ru](https...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#fsmtconfig
#fsmtconfig
.md
244_3
Construct an FAIRSEQ Transformer tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following: - Moses preprocessing and tokenization. - Normalizing all inputs text. - The arguments `special_tokens` and the function `set_special_tokens`, can be used to add additional symbols (like "__classify__")...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#fsmttokenizer
#fsmttokenizer
.md
244_4
The bare FSMT 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...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#fsmtmodel
#fsmtmodel
.md
244_5
The FSMT 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 model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fsmt.md
https://huggingface.co/docs/transformers/en/model_doc/fsmt/#fsmtforconditionalgeneration
#fsmtforconditionalgeneration
.md
244_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/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/
.md
245_0
<div class="flex flex-wrap space-x-1"> <a href="https://huggingface.co/models?filter=mt5"> <img alt="Models" src="https://img.shields.io/badge/All_model_pages-mt5-blueviolet"> </a> <a href="https://huggingface.co/spaces/docs-demos/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full"> <img alt="Spaces" src="https://img...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5
#mt5
.md
245_1
The mT5 model was presented in [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel. The abstract from the paper is the following: *The recent "Text-to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#overview
#overview
.md
245_2
- [Translation task guide](../tasks/translation) - [Summarization task guide](../tasks/summarization)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#resources
#resources
.md
245_3
This is the configuration class to store the configuration of a [`MT5Model`] or a [`TFMT5Model`]. It is used to instantiate a mT5 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 mT5 [google/mt5...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5config
#mt5config
.md
245_4
No docstring available for MT5Tokenizer See [`T5Tokenizer`] for all details.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5tokenizer
#mt5tokenizer
.md
245_5
No docstring available for MT5TokenizerFast See [`T5TokenizerFast`] for all details. <frameworkcontent> <pt>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5tokenizerfast
#mt5tokenizerfast
.md
245_6
The bare MT5 Model transformer outputting raw hidden-states without any specific head on top. The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, M...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5model
#mt5model
.md
245_7
MT5 Model with a `language modeling` head on top. The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5forconditionalgeneration
#mt5forconditionalgeneration
.md
245_8
The bare MT5 Model transformer outputting encoder's raw hidden-states without any specific head on top. The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5encodermodel
#mt5encodermodel
.md
245_9
MT5 model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE tasks. The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel, Noam Shazeer, Adam Roberts, Kather...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5forsequenceclassification
#mt5forsequenceclassification
.md
245_10
MT5 Encoder 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. The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raff...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5fortokenclassification
#mt5fortokenclassification
.md
245_11
MT5 Model with a span classification head on top for extractive question-answering tasks like SQuAD (linear layers on top of the hidden-states output to compute `span start logits` and `span end logits`). The MT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer]...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#mt5forquestionanswering
#mt5forquestionanswering
.md
245_12
No docstring available for TFMT5Model
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#tfmt5model
#tfmt5model
.md
245_13
No docstring available for TFMT5ForConditionalGeneration
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#tfmt5forconditionalgeneration
#tfmt5forconditionalgeneration
.md
245_14
No docstring available for TFMT5EncoderModel </tf> <jax>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#tfmt5encodermodel
#tfmt5encodermodel
.md
245_15
No docstring available for FlaxMT5Model
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#flaxmt5model
#flaxmt5model
.md
245_16
No docstring available for FlaxMT5ForConditionalGeneration
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#flaxmt5forconditionalgeneration
#flaxmt5forconditionalgeneration
.md
245_17
No docstring available for FlaxMT5EncoderModel </jax> </frameworkcontent>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mt5.md
https://huggingface.co/docs/transformers/en/model_doc/mt5/#flaxmt5encodermodel
#flaxmt5encodermodel
.md
245_18
<!--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/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/
.md
246_0
Hiera was proposed in [Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles](https://arxiv.org/abs/2306.00989) by Chaitanya Ryali, Yuan-Ting Hu, Daniel Bolya, Chen Wei, Haoqi Fan, Po-Yao Huang, Vaibhav Aggarwal, Arkabandhu Chowdhury, Omid Poursaeed, Judy Hoffman, Jitendra Malik, Yanghao Li, Christoph...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#overview
#overview
.md
246_1
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Hiera. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an ex...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#resources
#resources
.md
246_2
This is the configuration class to store the configuration of a [`HieraModel`]. It is used to instantiate a Hiera 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 Hiera [facebook/hiera-base-224]...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#hieraconfig
#hieraconfig
.md
246_3
The bare Hiera 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) subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage a...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#hieramodel
#hieramodel
.md
246_4
The Hiera Model transformer with the decoder on top for self-supervised pre-training. <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). </Tip> This model is a PyTorch [...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#hieraforpretraining
#hieraforpretraining
.md
246_5
Hiera Model transformer with an image classification head on top (a linear layer on top of the final hidden state with average pooling) e.g. for ImageNet. <Tip> Note that it's possible to fine-tune Hiera 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/hiera.md
https://huggingface.co/docs/transformers/en/model_doc/hiera/#hieraforimageclassification
#hieraforimageclassification
.md
246_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/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/
.md
247_0
<div class="flex flex-wrap space-x-1"> <a href="https://huggingface.co/models?filter=convbert"> <img alt="Models" src="https://img.shields.io/badge/All_model_pages-convbert-blueviolet"> </a> <a href="https://huggingface.co/spaces/docs-demos/conv-bert-base"> <img alt="Spaces" src="https://img.shields.io/badge/%F0%9F%A4%...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/#convbert
#convbert
.md
247_1
The ConvBERT model was proposed in [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan. The abstract from the paper is the following: *Pre-trained language models like BERT and its variants...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/#overview
#overview
.md
247_2
ConvBERT training tips are similar to those of BERT. For usage tips refer to [BERT documentation](bert).
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/#usage-tips
#usage-tips
.md
247_3
- [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/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/#resources
#resources
.md
247_4
This is the configuration class to store the configuration of a [`ConvBertModel`]. It is used to instantiate an ConvBERT 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 ConvBERT [YituTech/conv-...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/convbert.md
https://huggingface.co/docs/transformers/en/model_doc/convbert/#convbertconfig
#convbertconfig
.md
247_5