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
Nyströmformer Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g. for GLUE tasks. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTo...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/nystromformer.md
https://huggingface.co/docs/transformers/en/model_doc/nystromformer/#nystromformerforsequenceclassification
#nystromformerforsequenceclassification
.md
229_6
Nyströmformer Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a softmax) e.g. for RocStories/SWAG tasks. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/nystromformer.md
https://huggingface.co/docs/transformers/en/model_doc/nystromformer/#nystromformerformultiplechoice
#nystromformerformultiplechoice
.md
229_7
Nyströmformer Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/nystromformer.md
https://huggingface.co/docs/transformers/en/model_doc/nystromformer/#nystromformerfortokenclassification
#nystromformerfortokenclassification
.md
229_8
Nyströmformer 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) su...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/nystromformer.md
https://huggingface.co/docs/transformers/en/model_doc/nystromformer/#nystromformerforquestionanswering
#nystromformerforquestionanswering
.md
229_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/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/
.md
230_0
<Tip> This is a recently introduced model so the API hasn't been tested extensively. There may be some bugs or slight breaking changes to fix it in the future. If you see something strange, file a [Github Issue](https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title). ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpn
#glpn
.md
230_1
The GLPN model was proposed in [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim. GLPN combines [SegFormer](segformer)'s hierarchical mix-Transformer with a lightweight dec...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#overview
#overview
.md
230_2
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GLPN. - Demo notebooks for [`GLPNForDepthEstimation`] can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/GLPN). - [Monocular depth estimation task guide](../tasks/monocular_depth_es...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#resources
#resources
.md
230_3
This is the configuration class to store the configuration of a [`GLPNModel`]. It is used to instantiate an GLPN 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 GLPN [vinvino02/glpn-kitti](http...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpnconfig
#glpnconfig
.md
230_4
No docstring available for GLPNFeatureExtractor Methods: __call__
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpnfeatureextractor
#glpnfeatureextractor
.md
230_5
Constructs a GLPN image processor. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to resize the image's (height, width) dimensions, rounding them down to the closest multiple of `size_divisor`. Can be overridden by `do_resize` in `preprocess`. size_divisor (`int`, *optional*, defaults to 32): When ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpnimageprocessor
#glpnimageprocessor
.md
230_6
The bare GLPN encoder (Mix-Transformer) outputting raw hidden-states without any specific head on top. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpnmodel
#glpnmodel
.md
230_7
GLPN Model transformer with a lightweight depth estimation head on top e.g. for KITTI, NYUv2. 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 an...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/glpn.md
https://huggingface.co/docs/transformers/en/model_doc/glpn/#glpnfordepthestimation
#glpnfordepthestimation
.md
230_8
<!--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/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/
.md
231_0
The Gemma model was proposed in [Gemma: Open Models Based on Gemini Technology and Research](https://blog.google/technology/developers/gemma-open-models/) by Gemma Team, Google. Gemma models are trained on 6T tokens, and released with 2 versions, 2b and 7b. The abstract from the paper is the following: *This work i...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#overview
#overview
.md
231_1
This is the configuration class to store the configuration of a [`GemmaModel`]. It is used to instantiate an Gemma 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 Gemma-7B. e.g. [google/gemma-7...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmaconfig
#gemmaconfig
.md
231_2
Construct a Gemma tokenizer. Based on byte-level Byte-Pair-Encoding. The default padding token is unset as there is no padding token in the original model. Args: vocab_file (`str`): Path to the vocabulary file. unk_token (`str` or `tokenizers.AddedToken`, *optional*, defaults to `"<unk>"`): The unknown token. A token...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmatokenizer
#gemmatokenizer
.md
231_3
Construct a Gemma tokenizer fast. Based on byte-level Byte-Pair-Encoding. This uses notably ByteFallback and no prefix space. Normalization is applied to replace `" "` with `"▁"` ```python >>> from transformers import GemmaTokenizerFast >>> tokenizer = GemmaTokenizerFast.from_pretrained("hf-internal-testing/dummy...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmatokenizerfast
#gemmatokenizerfast
.md
231_4
The bare Gemma 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/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmamodel
#gemmamodel
.md
231_5
No docstring available for GemmaForCausalLM Methods: forward
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmaforcausallm
#gemmaforcausallm
.md
231_6
The Gemma Model transformer with a sequence classification head on top (linear layer). [`GemmaForSequenceClassification`] 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....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmaforsequenceclassification
#gemmaforsequenceclassification
.md
231_7
The Gemma 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/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#gemmafortokenclassification
#gemmafortokenclassification
.md
231_8
No docstring available for FlaxGemmaModel Methods: __call__
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#flaxgemmamodel
#flaxgemmamodel
.md
231_9
No docstring available for FlaxGemmaForCausalLM Methods: __call__
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/gemma.md
https://huggingface.co/docs/transformers/en/model_doc/gemma/#flaxgemmaforcausallm
#flaxgemmaforcausallm
.md
231_10
<!--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/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/
.md
232_0
The WavLM model was proposed in [WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qia...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#overview
#overview
.md
232_1
- WavLM is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please use [`Wav2Vec2Processor`] for the feature extraction. - WavLM model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded using [`Wav2Vec2CTCTokenizer`]...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#usage-tips
#usage-tips
.md
232_2
- [Audio classification task guide](../tasks/audio_classification) - [Automatic speech recognition task guide](../tasks/asr)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#resources
#resources
.md
232_3
This is the configuration class to store the configuration of a [`WavLMModel`]. It is used to instantiate an WavLM 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 WavLM [microsoft/wavlm-base](h...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmconfig
#wavlmconfig
.md
232_4
The bare WavLM Model transformer outputting raw hidden-states without any specific head on top. WavLM was proposed in [WavLM: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, N...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmmodel
#wavlmmodel
.md
232_5
WavLM Model with a `language modeling` head on top for Connectionist Temporal Classification (CTC). WavLM was proposed in [WavLM: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu L...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmforctc
#wavlmforctc
.md
232_6
WavLM Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like SUPERB Keyword Spotting. WavLM was proposed in [WavLM: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmforsequenceclassification
#wavlmforsequenceclassification
.md
232_7
WavLM Model with a frame classification head on top for tasks like Speaker Diarization. WavLM was proposed in [WavLM: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmforaudioframeclassification
#wavlmforaudioframeclassification
.md
232_8
WavLM Model with an XVector feature extraction head on top for tasks like Speaker Verification. WavLM was proposed in [WavLM: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li,...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/wavlm.md
https://huggingface.co/docs/transformers/en/model_doc/wavlm/#wavlmforxvector
#wavlmforxvector
.md
232_9
<!--Copyright 2021 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/
.md
233_0
The UniSpeech-SAT model was proposed in [UniSpeech-SAT: Universal Speech Representation Learning with Speaker Aware Pre-Training](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu . The abstract from the p...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#overview
#overview
.md
233_1
- UniSpeechSat is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please use [`Wav2Vec2Processor`] for the feature extraction. - UniSpeechSat model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded using [`Wav2Vec2...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#usage-tips
#usage-tips
.md
233_2
- [Audio classification task guide](../tasks/audio_classification) - [Automatic speech recognition task guide](../tasks/asr)
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#resources
#resources
.md
233_3
This is the configuration class to store the configuration of a [`UniSpeechSatModel`]. It is used to instantiate an UniSpeechSat 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 UniSpeechSat [mi...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatconfig
#unispeechsatconfig
.md
233_4
models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput Output type of [`UniSpeechSatForPreTrainingOutput`], with potential hidden states and attentions. Args: loss (*optional*, returned when model is in train mode, `torch.FloatTensor` of shape `(1,)`): Total loss as the sum of the contrastive ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsat-specific-outputs
#unispeechsat-specific-outputs
.md
233_5
The bare UniSpeechSat Model transformer outputting raw hidden-states without any specific head on top. UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli. This...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatmodel
#unispeechsatmodel
.md
233_6
UniSpeechSat Model with a `language modeling` head on top for Connectionist Temporal Classification (CTC). UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli. ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatforctc
#unispeechsatforctc
.md
233_7
UniSpeechSat Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like SUPERB Keyword Spotting. UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatforsequenceclassification
#unispeechsatforsequenceclassification
.md
233_8
UniSpeech-SAT Model with a frame classification head on top for tasks like Speaker Diarization. UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli. This mode...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatforaudioframeclassification
#unispeechsatforaudioframeclassification
.md
233_9
UniSpeech-SAT Model with an XVector feature extraction head on top for tasks like Speaker Verification. UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli. T...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatforxvector
#unispeechsatforxvector
.md
233_10
UniSpeechSat Model with a quantizer and `VQ` head on top. UniSpeechSat was proposed in [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli. This model inherits from [`PreTrainedModel`]. Che...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/unispeech-sat.md
https://huggingface.co/docs/transformers/en/model_doc/unispeech-sat/#unispeechsatforpretraining
#unispeechsatforpretraining
.md
233_11
<!--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/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/
.md
234_0
<div class="flex flex-wrap space-x-1"> <a href="https://huggingface.co/models?filter=dpr"> <img alt="Models" src="https://img.shields.io/badge/All_model_pages-dpr-blueviolet"> </a> <a href="https://huggingface.co/spaces/docs-demos/dpr-question_encoder-bert-base-multilingual"> <img alt="Spaces" src="https://img.shields....
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dpr
#dpr
.md
234_1
Dense Passage Retrieval (DPR) is a set of tools and models for state-of-the-art open-domain Q&A research. It was introduced in [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#overview
#overview
.md
234_2
- DPR consists in three models: * Question encoder: encode questions as vectors * Context encoder: encode contexts as vectors * Reader: extract the answer of the questions inside retrieved contexts, along with a relevance score (high if the inferred span actually answers the question).
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#usage-tips
#usage-tips
.md
234_3
[`DPRConfig`] is the configuration class to store the configuration of a *DPRModel*. This is the configuration class to store the configuration of a [`DPRContextEncoder`], [`DPRQuestionEncoder`], or a [`DPRReader`]. It is used to instantiate the components of the DPR model according to the specified arguments, defini...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprconfig
#dprconfig
.md
234_4
Construct a DPRContextEncoder tokenizer. [`DPRContextEncoderTokenizer`] is identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting and wordpiece. Refer to superclass [`BertTokenizer`] for usage examples and documentation concerning parameters.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprcontextencodertokenizer
#dprcontextencodertokenizer
.md
234_5
Construct a "fast" DPRContextEncoder tokenizer (backed by HuggingFace's *tokenizers* library). [`DPRContextEncoderTokenizerFast`] is identical to [`BertTokenizerFast`] and runs end-to-end tokenization: punctuation splitting and wordpiece. Refer to superclass [`BertTokenizerFast`] for usage examples and documentatio...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprcontextencodertokenizerfast
#dprcontextencodertokenizerfast
.md
234_6
Constructs a DPRQuestionEncoder tokenizer. [`DPRQuestionEncoderTokenizer`] is identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting and wordpiece. Refer to superclass [`BertTokenizer`] for usage examples and documentation concerning parameters.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprquestionencodertokenizer
#dprquestionencodertokenizer
.md
234_7
Constructs a "fast" DPRQuestionEncoder tokenizer (backed by HuggingFace's *tokenizers* library). [`DPRQuestionEncoderTokenizerFast`] is identical to [`BertTokenizerFast`] and runs end-to-end tokenization: punctuation splitting and wordpiece. Refer to superclass [`BertTokenizerFast`] for usage examples and documenta...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprquestionencodertokenizerfast
#dprquestionencodertokenizerfast
.md
234_8
Construct a DPRReader tokenizer. [`DPRReaderTokenizer`] is almost identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts that are combined to be fed to the [`DPRReader`] model. Refer to supe...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprreadertokenizer
#dprreadertokenizer
.md
234_9
Constructs a "fast" DPRReader tokenizer (backed by HuggingFace's *tokenizers* library). [`DPRReaderTokenizerFast`] is almost identical to [`BertTokenizerFast`] and runs end-to-end tokenization: punctuation splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts that are...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprreadertokenizerfast
#dprreadertokenizerfast
.md
234_10
models.dpr.modeling_dpr.DPRContextEncoderOutput Class for outputs of [`DPRQuestionEncoder`]. Args: pooler_output (`torch.FloatTensor` of shape `(batch_size, embeddings_size)`): The DPR encoder outputs the *pooler_output* that corresponds to the context representation. Last layer hidden-state of the first token of t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dpr-specific-outputs
#dpr-specific-outputs
.md
234_11
The bare DPRContextEncoder transformer outputting pooler outputs as context representations. 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/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprcontextencoder
#dprcontextencoder
.md
234_12
The bare DPRQuestionEncoder transformer outputting pooler outputs as question representations. 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/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprquestionencoder
#dprquestionencoder
.md
234_13
The bare DPRReader transformer outputting span predictions. 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 PyTorc...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#dprreader
#dprreader
.md
234_14
No docstring available for TFDPRContextEncoder Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#tfdprcontextencoder
#tfdprcontextencoder
.md
234_15
No docstring available for TFDPRQuestionEncoder Methods: call
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#tfdprquestionencoder
#tfdprquestionencoder
.md
234_16
No docstring available for TFDPRReader Methods: call </tf> </frameworkcontent>
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dpr.md
https://huggingface.co/docs/transformers/en/model_doc/dpr/#tfdprreader
#tfdprreader
.md
234_17
<!--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/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/
.md
235_0
<Tip warning={true}> This model is in maintenance mode only, we don't accept any new PRs changing its code. If you run into any issues running this model, please reinstall the last version that supported this model: v4.40.2. You can do so by running the following command: `pip install -U transformers==4.40.2`. </Ti...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realm
#realm
.md
235_1
The REALM model was proposed in [REALM: Retrieval-Augmented Language Model Pre-Training](https://arxiv.org/abs/2002.08909) by Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat and Ming-Wei Chang. It's a retrieval-augmented language model that firstly retrieves documents from a textual knowledge corpus and then utiliz...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#overview
#overview
.md
235_2
This is the configuration class to store the configuration of 1. [`RealmEmbedder`] 2. [`RealmScorer`] 3. [`RealmKnowledgeAugEncoder`] 4. [`RealmRetriever`] 5. [`RealmReader`] 6. [`RealmForOpenQA`] It is used to instantiate an REALM model according to the specified arguments, defining the model architecture. Instant...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmconfig
#realmconfig
.md
235_3
Construct a REALM tokenizer. [`RealmTokenizer`] is identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting and wordpiece. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmtokenizer
#realmtokenizer
.md
235_4
Construct a "fast" REALM tokenizer (backed by HuggingFace's *tokenizers* library). Based on WordPiece. [`RealmTokenizerFast`] is identical to [`BertTokenizerFast`] and runs end-to-end tokenization: punctuation splitting and wordpiece. This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmtokenizerfast
#realmtokenizerfast
.md
235_5
The retriever of REALM outputting the retrieved evidence block and whether the block has answers as well as answer positions." Parameters: block_records (`np.ndarray`): A numpy array which cantains evidence texts. tokenizer ([`RealmTokenizer`]): The tokenizer to encode retrieved texts.
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmretriever
#realmretriever
.md
235_6
The embedder of REALM outputting projected score that will be used to calculate relevance score. 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/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmembedder
#realmembedder
.md
235_7
The scorer of REALM outputting relevance scores representing the score of document candidates (before softmax). 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 t...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmscorer
#realmscorer
.md
235_8
The knowledge-augmented encoder of REALM outputting masked language model logits and marginal log-likelihood loss. 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 relate...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmknowledgeaugencoder
#realmknowledgeaugencoder
.md
235_9
The reader of REALM. This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior. Parameters: config ([`RealmConfig`]): Model configuration c...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmreader
#realmreader
.md
235_10
`RealmForOpenQA` for end-to-end open domain question answering. 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: conf...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/realm.md
https://huggingface.co/docs/transformers/en/model_doc/realm/#realmforopenqa
#realmforopenqa
.md
235_11
<!--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/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/
.md
236_0
Video-LLaVa is an open-source multimodal LLM trained by fine-tuning LlamA/Vicuna on multimodal instruction-following data generated by Llava1.5 and VideChat. It is an auto-regressive language model, based on the transformer architecture. Video-LLaVa unifies visual representations to the language feature space, and enab...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#overview
#overview
.md
236_1
- We advise users to use padding_side="left" when computing batched generation as it leads to more accurate results. Simply make sure to call processor.tokenizer.padding_side = "left" before generating. - Note the model has not been explicitly trained to process multiple images/videos in the same prompt, although thi...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#usage-tips
#usage-tips
.md
236_2
The model can accept both images and videos as input. Here's an example code for inference in half-precision (`torch.float16`): ```python import av import torch import numpy as np from transformers import VideoLlavaForConditionalGeneration, VideoLlavaProcessor def read_video_pyav(container, indices): ''' Decode the ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#single-media-mode
#single-media-mode
.md
236_3
The model can also generate from an interleaved image-video inputs. However note, that it was not trained in interleaved image-video setting which might affect the performance. Below is an example usage for mixed media input, add the following lines to the above code snippet: ```python from PIL import Image import re...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#mixed-media-mode
#mixed-media-mode
.md
236_4
The model can be loaded in lower bits, significantly reducing memory burden while maintaining the performance of the original model. his allows for efficient deployment on resource-constrained cases. First make sure to install bitsandbytes by running `pip install bitsandbytes` and to have access to a GPU/accelerator ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#quantization-using-bitsandbytes-for-memory-efficiency
#quantization-using-bitsandbytes-for-memory-efficiency
.md
236_5
Additionally, we can greatly speed-up model inference by using [Flash Attention](../perf_train_gpu_one#flash-attention-2), which is a faster implementation of the attention mechanism used inside the model. First, make sure to install the latest version of Flash Attention 2: ```bash pip install -U flash-attn --no-bu...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#flash-attention-2-to-speed-up-generation
#flash-attention-2-to-speed-up-generation
.md
236_6
This is the configuration class to store the configuration of a [`VideoLlavaForConditionalGeneration`]. It is used to instantiate an VideoLlava 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 l...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#videollavaconfig
#videollavaconfig
.md
236_7
Constructs a CLIP image processor. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by `do_resize` in the `preprocess` method. size (`Dict[str, int]` *optional*, defaults to `{"shortest_edge": 224}`): Size of ...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#videollavaimageprocessor
#videollavaimageprocessor
.md
236_8
Constructs a VideoLlava processor which wraps a VideoLlava image processor and a Llava tokenizer into a single processor. [`VideoLlavaProcessor`] offers all the functionalities of [`VideoLlavaImageProcessor`] and [`LlamaTokenizerFast`]. See the [`~VideoLlavaProcessor.__call__`] and [`~VideoLlavaProcessor.decode`] for...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#videollavaprocessor
#videollavaprocessor
.md
236_9
The VideoLlava model which consists of a vision backbone and a language model. This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads etc.) This model...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/video_llava.md
https://huggingface.co/docs/transformers/en/model_doc/video_llava/#videollavaforconditionalgeneration
#videollavaforconditionalgeneration
.md
236_10
<!--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/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/
.md
237_0
The MGP-STR model was proposed in [Multi-Granularity Prediction for Scene Text Recognition](https://arxiv.org/abs/2209.03592) by Peng Wang, Cheng Da, and Cong Yao. MGP-STR is a conceptually **simple** yet **powerful** vision Scene Text Recognition (STR) model, which is built upon the [Vision Transformer (ViT)](vit). To...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#overview
#overview
.md
237_1
[`MgpstrModel`] accepts images as input and generates three types of predictions, which represent textual information at different granularities. The three types of predictions are fused to give the final prediction result. The [`ViTImageProcessor`] class is responsible for preprocessing the input image and [`MgpstrT...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#inference-example
#inference-example
.md
237_2
This is the configuration class to store the configuration of an [`MgpstrModel`]. It is used to instantiate an MGP-STR 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 MGP-STR [alibaba-damo/mgp-...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#mgpstrconfig
#mgpstrconfig
.md
237_3
Construct a MGP-STR char tokenizer. This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to this superclass for more information regarding those methods. Args: vocab_file (`str`): Path to the vocabulary file. unk_token (`str`, *optional*, defaults to `"[GO...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#mgpstrtokenizer
#mgpstrtokenizer
.md
237_4
Constructs a MGP-STR processor which wraps an image processor and MGP-STR tokenizers into a single [`MgpstrProcessor`] offers all the functionalities of `ViTImageProcessor`] and [`MgpstrTokenizer`]. See the [`~MgpstrProcessor.__call__`] and [`~MgpstrProcessor.batch_decode`] for more information. Args: image_process...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#mgpstrprocessor
#mgpstrprocessor
.md
237_5
The bare MGP-STR 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...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#mgpstrmodel
#mgpstrmodel
.md
237_6
MGP-STR Model transformer with three classification heads on top (three A^3 modules and three linear layer on top of the transformer encoder output) for scene text recognition (STR) . This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it as a regular PyTor...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mgp-str.md
https://huggingface.co/docs/transformers/en/model_doc/mgp-str/#mgpstrforscenetextrecognition
#mgpstrforscenetextrecognition
.md
237_7
<!--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/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/
.md
238_0
<Tip warning={true}> This model is in maintenance mode only, we don't accept any new PRs changing its code. If you run into any issues running this model, please reinstall the last version that supported this model: v4.40.2. You can do so by running the following command: `pip install -U transformers==4.40.2`. </Ti...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#mega
#mega
.md
238_1
The MEGA model was proposed in [Mega: Moving Average Equipped Gated Attention](https://arxiv.org/abs/2209.10655) by Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, and Luke Zettlemoyer. MEGA proposes a new approach to self-attention with each encoder layer having a multi-head...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#overview
#overview
.md
238_2
- MEGA can perform quite well with relatively few parameters. See Appendix D in the MEGA paper for examples of architectural specs which perform well in various settings. If using MEGA as a decoder, be sure to set `bidirectional=False` to avoid errors with default bidirectional. - Mega-chunk is a variant of mega that r...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#usage-tips
#usage-tips
.md
238_3
- The original implementation of MEGA had an inconsistent expectation of attention masks for padding and causal self-attention between the softmax attention and Laplace/squared ReLU method. This implementation addresses that inconsistency. - The original implementation did not include token type embeddings; this implem...
/Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mega.md
https://huggingface.co/docs/transformers/en/model_doc/mega/#implementation-notes
#implementation-notes
.md
238_4