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 |
|---|---|---|---|---|---|
No docstring available for TFBertForTokenClassification
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#tfbertfortokenclassification | #tfbertfortokenclassification | .md | 263_29 |
No docstring available for TFBertForQuestionAnswering
Methods: call
</tf>
<jax> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#tfbertforquestionanswering | #tfbertforquestionanswering | .md | 263_30 |
No docstring available for FlaxBertModel
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertmodel | #flaxbertmodel | .md | 263_31 |
No docstring available for FlaxBertForPreTraining
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertforpretraining | #flaxbertforpretraining | .md | 263_32 |
No docstring available for FlaxBertForCausalLM
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertforcausallm | #flaxbertforcausallm | .md | 263_33 |
No docstring available for FlaxBertForMaskedLM
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertformaskedlm | #flaxbertformaskedlm | .md | 263_34 |
No docstring available for FlaxBertForNextSentencePrediction
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertfornextsentenceprediction | #flaxbertfornextsentenceprediction | .md | 263_35 |
No docstring available for FlaxBertForSequenceClassification
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertforsequenceclassification | #flaxbertforsequenceclassification | .md | 263_36 |
No docstring available for FlaxBertForMultipleChoice
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertformultiplechoice | #flaxbertformultiplechoice | .md | 263_37 |
No docstring available for FlaxBertForTokenClassification
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertfortokenclassification | #flaxbertfortokenclassification | .md | 263_38 |
No docstring available for FlaxBertForQuestionAnswering
Methods: __call__
</jax>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert.md | https://huggingface.co/docs/transformers/en/model_doc/bert/#flaxbertforquestionanswering | #flaxbertforquestionanswering | .md | 263_39 |
<!--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/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/ | .md | 264_0 | |
<div class="flex flex-wrap space-x-1">
<a href="https://huggingface.co/models?filter=umt5">
<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://im... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5 | #umt5 | .md | 264_1 |
The UMT5 model was proposed in [UniMax: Fairer and More Effective Language Sampling for Large-Scale Multilingual Pretraining](https://openreview.net/forum?id=kXwdL1cWOAi) by Hyung Won Chung, Xavier Garcia, Adam Roberts, Yi Tay, Orhan Firat, Sharan Narang, Noah Constant.
The abstract from the paper is the following: ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#overview | #overview | .md | 264_2 |
- UMT5 was only pre-trained on [mC4](https://huggingface.co/datasets/mc4) excluding any supervised training.
Therefore, this model has to be fine-tuned before it is usable on a downstream task, unlike the original T5 model.
- Since umT5 was pre-trained in an unsupervised manner, there's no real advantage to using a tas... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#usage-tips | #usage-tips | .md | 264_3 |
`UmT5` is based on mT5, with a non-shared relative positional bias that is computed for each layer. This means that the model set `has_relative_bias` for each layer.
The conversion script is also different because the model was saved in t5x's latest checkpointing format. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#differences-with-mt5 | #differences-with-mt5 | .md | 264_4 |
```python
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
>>> model = AutoModelForSeq2SeqLM.from_pretrained("google/umt5-small")
>>> tokenizer = AutoTokenizer.from_pretrained("google/umt5-small")
>>> inputs = tokenizer(
... "A <extra_id_0> walks into a bar and orders a <extra_id_1> with <extra_i... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#sample-usage | #sample-usage | .md | 264_5 |
This is the configuration class to store the configuration of a [`UMT5Model`]. It is used to instantiate a UMT5
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 UMT5
[google/umt5-small](https://... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5config | #umt5config | .md | 264_6 |
The bare UMT5 Model transformer outputting raw hidden-states without any specific head on top.
The UMT5 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,... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5model | #umt5model | .md | 264_7 |
UMT5 Model with a `language modeling` head on top.
The UMT5 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/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5forconditionalgeneration | #umt5forconditionalgeneration | .md | 264_8 |
The bare UMT5 Model transformer outputting encoder's raw hidden-states without any specific head on top.
The UMT5 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, Shar... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5encodermodel | #umt5encodermodel | .md | 264_9 |
UMT5 model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.
The UMT5 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, Kath... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5forsequenceclassification | #umt5forsequenceclassification | .md | 264_10 |
UMT5 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 UMT5 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 Ra... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5fortokenclassification | #umt5fortokenclassification | .md | 264_11 |
UMT5 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 UMT5 model was proposed in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transforme... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/umt5.md | https://huggingface.co/docs/transformers/en/model_doc/umt5/#umt5forquestionanswering | #umt5forquestionanswering | .md | 264_12 |
<!--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/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/ | .md | 265_0 | |
The UDOP model was proposed in [Unifying Vision, Text, and Layout for Universal Document Processing](https://arxiv.org/abs/2212.02623) by Zineng Tang, Ziyi Yang, Guoxin Wang, Yuwei Fang, Yang Liu, Chenguang Zhu, Michael Zeng, Cha Zhang, Mohit Bansal.
UDOP adopts an encoder-decoder Transformer architecture based on [T5]... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#overview | #overview | .md | 265_1 |
- In addition to *input_ids*, [`UdopForConditionalGeneration`] also expects the input `bbox`, which are
the bounding boxes (i.e. 2D-positions) of the input tokens. These can be obtained using an external OCR engine such
as Google's [Tesseract](https://github.com/tesseract-ocr/tesseract) (there's a [Python wrapper](http... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#usage-tips | #usage-tips | .md | 265_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with UDOP. 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 exi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#resources | #resources | .md | 265_3 |
This is the configuration class to store the configuration of a [`UdopForConditionalGeneration`]. It is used to
instantiate a UDOP 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 UDOP
[microsof... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udopconfig | #udopconfig | .md | 265_4 |
Adapted from [`LayoutXLMTokenizer`] and [`T5Tokenizer`]. Based on
[SentencePiece](https://github.com/google/sentencepiece).
This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.
Args:
vocab_fi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udoptokenizer | #udoptokenizer | .md | 265_5 |
Construct a "fast" UDOP tokenizer (backed by HuggingFace's *tokenizers* library). Adapted from
[`LayoutXLMTokenizer`] and [`T5Tokenizer`]. Based on
[BPE](https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models).
This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udoptokenizerfast | #udoptokenizerfast | .md | 265_6 |
Constructs a UDOP processor which combines a LayoutLMv3 image processor and a UDOP tokenizer into a single processor.
[`UdopProcessor`] offers all the functionalities you need to prepare data for the model.
It first uses [`LayoutLMv3ImageProcessor`] to resize, rescale and normalize document images, and optionally a... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udopprocessor | #udopprocessor | .md | 265_7 |
The bare UDOP encoder-decoder 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, prunin... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udopmodel | #udopmodel | .md | 265_8 |
The UDOP encoder-decoder Transformer with a language modeling head on top, enabling to generate text given document
images and an optional prompt.
This class is based on [`T5ForConditionalGeneration`], extended to deal with images and layout (2D) data.
This model inherits from [`PreTrainedModel`]. Check the superclas... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udopforconditionalgeneration | #udopforconditionalgeneration | .md | 265_9 |
The bare UDOP Model transformer outputting encoder's 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, prunin... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/udop.md | https://huggingface.co/docs/transformers/en/model_doc/udop/#udopencodermodel | #udopencodermodel | .md | 265_10 |
<!--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/llama3.md | https://huggingface.co/docs/transformers/en/model_doc/llama3/ | .md | 266_0 | |
```py3
import transformers
import torch
model_id = "meta-llama/Meta-Llama-3-8B"
pipeline = transformers.pipeline("text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto")
pipeline("Hey how are you doing today?")
``` | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/llama3.md | https://huggingface.co/docs/transformers/en/model_doc/llama3/#llama3 | #llama3 | .md | 266_1 |
The Llama3 model was proposed in [Introducing Meta Llama 3: The most capable openly available LLM to date](https://ai.meta.com/blog/meta-llama-3/) by the meta AI team.
The abstract from the blogpost is the following:
*Today, we’re excited to share the first two models of the next generation of Llama, Meta Llama 3, ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/llama3.md | https://huggingface.co/docs/transformers/en/model_doc/llama3/#overview | #overview | .md | 266_2 |
<Tip warning={true}>
The `Llama3` models were trained using `bfloat16`, but the original inference uses `float16`. 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 w... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/llama3.md | https://huggingface.co/docs/transformers/en/model_doc/llama3/#usage-tips | #usage-tips | .md | 266_3 |
A ton of cool resources are already available on the documentation page of [Llama2](./llama2), inviting contributors to add new resources curated for Llama3 here! 🤗 | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/llama3.md | https://huggingface.co/docs/transformers/en/model_doc/llama3/#resources | #resources | .md | 266_4 |
<!--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/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/ | .md | 267_0 | |
The ViTPose model was proposed in [ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation](https://arxiv.org/abs/2204.12484) by Yufei Xu, Jing Zhang, Qiming Zhang, Dacheng Tao. ViTPose employs a standard, non-hierarchical [Vision Transformer](vit) as backbone for the task of keypoint estimation. A simpl... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#overview | #overview | .md | 267_1 |
ViTPose is a so-called top-down keypoint detection model. This means that one first uses an object detector, like [RT-DETR](rt_detr.md), to detect people (or other instances) in an image. Next, ViTPose takes the cropped images as input and predicts the keypoints for each of them.
```py
import torch
import requests
im... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#usage-tips | #usage-tips | .md | 267_2 |
The best [checkpoints](https://huggingface.co/collections/usyd-community/vitpose-677fcfd0a0b2b5c8f79c4335) are those of the [ViTPose++ paper](https://arxiv.org/abs/2212.04246). ViTPose++ models employ a so-called [Mixture-of-Experts (MoE)](https://huggingface.co/blog/moe) architecture for the ViT backbone, resulting in... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#vitpose-models | #vitpose-models | .md | 267_3 |
To visualize the various keypoints, one can either leverage the `supervision` [library](https://github.com/roboflow/supervision (requires `pip install supervision`):
```python
import supervision as sv
xy = torch.stack([pose_result['keypoints'] for pose_result in image_pose_result]).cpu().numpy()
scores = torch.stack... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#visualization | #visualization | .md | 267_4 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViTPose. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#resources | #resources | .md | 267_5 |
VitPoseImageProcessor
Constructs a VitPose image processor.
Args:
do_affine_transform (`bool`, *optional*, defaults to `True`):
Whether to apply an affine transformation to the input images.
size (`Dict[str, int]` *optional*, defaults to `{"height": 256, "width": 192}`):
Resolution of the image after `affine_transf... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#vitposeimageprocessor | #vitposeimageprocessor | .md | 267_6 |
This is the configuration class to store the configuration of a [`VitPoseForPoseEstimation`]. It is used to instantiate a
VitPose 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 VitPose
[usyd-c... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#vitposeconfig | #vitposeconfig | .md | 267_7 |
The VitPose model with a pose estimation head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.
Parameters:
config ([`VitPo... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vitpose.md | https://huggingface.co/docs/transformers/en/model_doc/vitpose/#vitposeforposeestimation | #vitposeforposeestimation | .md | 267_8 |
<!--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/bert-japanese.md | https://huggingface.co/docs/transformers/en/model_doc/bert-japanese/ | .md | 268_0 | |
The BERT models trained on Japanese text.
There are models with two different tokenization methods:
- Tokenize with MeCab and WordPiece. This requires some extra dependencies, [fugashi](https://github.com/polm/fugashi) which is a wrapper around [MeCab](https://taku910.github.io/mecab/).
- Tokenize into characters. ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert-japanese.md | https://huggingface.co/docs/transformers/en/model_doc/bert-japanese/#overview | #overview | .md | 268_1 |
Construct a BERT tokenizer for Japanese text.
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 a one-wordpiece-per-line vocabulary file.
spm_file (`str`... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bert-japanese.md | https://huggingface.co/docs/transformers/en/model_doc/bert-japanese/#bertjapanesetokenizer | #bertjapanesetokenizer | .md | 268_2 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/ | .md | 269_0 | |
The ALIGN model was proposed in [Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision](https://arxiv.org/abs/2102.05918) by Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, Tom Duerig. ALIGN is a multi-modal vision and langua... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#overview | #overview | .md | 269_1 |
ALIGN uses EfficientNet to get visual features and BERT to get the text features. Both the text and visual features are then projected to a latent space with identical dimension. The dot product between the projected image and text features is then used as a similarity score.
[`AlignProcessor`] wraps [`EfficientNetIm... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#usage-example | #usage-example | .md | 269_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ALIGN.
- A blog post on [ALIGN and the COYO-700M dataset](https://huggingface.co/blog/vit-align).
- A zero-shot image classification [demo](https://huggingface.co/spaces/adirik/ALIGN-zero-shot-image-classification).... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#resources | #resources | .md | 269_3 |
[`AlignConfig`] is the configuration class to store the configuration of a [`AlignModel`]. It is used to
instantiate a ALIGN model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the ALI... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#alignconfig | #alignconfig | .md | 269_4 |
This is the configuration class to store the configuration of a [`AlignTextModel`]. It is used to instantiate a
ALIGN text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the text encoder of the ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#aligntextconfig | #aligntextconfig | .md | 269_5 |
This is the configuration class to store the configuration of a [`AlignVisionModel`]. It is used to instantiate a
ALIGN vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder o... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#alignvisionconfig | #alignvisionconfig | .md | 269_6 |
Constructs an ALIGN processor which wraps [`EfficientNetImageProcessor`] and
[`BertTokenizer`]/[`BertTokenizerFast`] into a single processor that interits both the image processor and
tokenizer functionalities. See the [`~AlignProcessor.__call__`] and [`~OwlViTProcessor.decode`] for more
information.
The preferred way ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#alignprocessor | #alignprocessor | .md | 269_7 |
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#to... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#alignmodel | #alignmodel | .md | 269_8 |
The text model from ALIGN without any head or projection 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 PyT... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#aligntextmodel | #aligntextmodel | .md | 269_9 |
The vision model from ALIGN without any head or projection 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 P... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/align.md | https://huggingface.co/docs/transformers/en/model_doc/align/#alignvisionmodel | #alignvisionmodel | .md | 269_10 |
<!--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/dialogpt.md | https://huggingface.co/docs/transformers/en/model_doc/dialogpt/ | .md | 270_0 | |
DialoGPT was proposed in [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao,
Jianfeng Gao, Jingjing Liu, Bill Dolan. It's a GPT2 Model trained on 147M conversation-like... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dialogpt.md | https://huggingface.co/docs/transformers/en/model_doc/dialogpt/#overview | #overview | .md | 270_1 |
- DialoGPT is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather
than the left.
- DialoGPT was trained with a causal language modeling (CLM) objective on conversational data and is therefore powerful
at response generation in open-domain dialogue systems.
- DialoGPT ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/dialogpt.md | https://huggingface.co/docs/transformers/en/model_doc/dialogpt/#usage-tips | #usage-tips | .md | 270_2 |
<!--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/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/ | .md | 271_0 | |
The RegNet model was proposed in [Designing Network Design Spaces](https://arxiv.org/abs/2003.13678) by Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Dollár.
The authors design search spaces to perform Neural Architecture Search (NAS). They first start from a high dimensional search space ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#overview | #overview | .md | 271_1 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with RegNet.
<PipelineTag pipeline="image-classification"/>
- [`RegNetForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classifi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#resources | #resources | .md | 271_2 |
This is the configuration class to store the configuration of a [`RegNetModel`]. It is used to instantiate a RegNet
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 RegNet
[facebook/regnet-y-040... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#regnetconfig | #regnetconfig | .md | 271_3 |
The bare RegNet model outputting raw features without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matters related to general usage and
behavior.
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#regnetmodel | #regnetmodel | .md | 271_4 |
RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#regnetforimageclassification | #regnetforimageclassification | .md | 271_5 |
No docstring available for TFRegNetModel
Methods: call | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#tfregnetmodel | #tfregnetmodel | .md | 271_6 |
No docstring available for TFRegNetForImageClassification
Methods: call
</tf>
<jax> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#tfregnetforimageclassification | #tfregnetforimageclassification | .md | 271_7 |
No docstring available for FlaxRegNetModel
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#flaxregnetmodel | #flaxregnetmodel | .md | 271_8 |
No docstring available for FlaxRegNetForImageClassification
Methods: __call__
</jax>
</frameworkcontent> | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/regnet.md | https://huggingface.co/docs/transformers/en/model_doc/regnet/#flaxregnetforimageclassification | #flaxregnetforimageclassification | .md | 271_9 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/ | .md | 272_0 | |
The Depth Anything model was proposed in [Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data](https://arxiv.org/abs/2401.10891) by Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng, Hengshuang Zhao. Depth Anything is based on the [DPT](dpt) architecture, trained on ~62 million images, obtai... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#overview | #overview | .md | 272_1 |
There are 2 main ways to use Depth Anything: either using the pipeline API, which abstracts away all the complexity for you, or by using the `DepthAnythingForDepthEstimation` class yourself. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#usage-example | #usage-example | .md | 272_2 |
The pipeline allows to use the model in a few lines of code:
```python
>>> from transformers import pipeline
>>> from PIL import Image
>>> import requests
>>> # load pipe
>>> pipe = pipeline(task="depth-estimation", model="LiheYoung/depth-anything-small-hf")
>>> # load image
>>> url = 'http://images.cocodataset.org... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#pipeline-api | #pipeline-api | .md | 272_3 |
If you want to do the pre- and postprocessing yourself, here's how to do that:
```python
>>> from transformers import AutoImageProcessor, AutoModelForDepthEstimation
>>> import torch
>>> import numpy as np
>>> from PIL import Image
>>> import requests
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#using-the-model-yourself | #using-the-model-yourself | .md | 272_4 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Depth Anything.
- [Monocular depth estimation task guide](../tasks/monocular_depth_estimation)
- A notebook showcasing inference with [`DepthAnythingForDepthEstimation`] can be found [here](https://github.com/NielsR... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#resources | #resources | .md | 272_5 |
This is the configuration class to store the configuration of a [`DepthAnythingModel`]. It is used to instantiate a DepthAnything
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 DepthAnything
[... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#depthanythingconfig | #depthanythingconfig | .md | 272_6 |
Depth Anything Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2.
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 r... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/depth_anything.md | https://huggingface.co/docs/transformers/en/model_doc/depth_anything/#depthanythingfordepthestimation | #depthanythingfordepthestimation | .md | 272_7 |
<!--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/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/ | .md | 273_0 | |
The YOLOS model was proposed in [You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection](https://arxiv.org/abs/2106.00666) by Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu.
YOLOS proposes to just leverage the plain [Vision Transformer ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#overview | #overview | .md | 273_1 |
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/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#using-scaled-dot-product-attention-sdpa | #using-scaled-dot-product-attention-sdpa | .md | 273_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with YOLOS.
<PipelineTag pipeline="object-detection"/>
- All example notebooks illustrating inference + fine-tuning [`YolosForObjectDetection`] on a custom dataset can be found [here](https://github.com/NielsRogge/Tran... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#resources | #resources | .md | 273_3 |
This is the configuration class to store the configuration of a [`YolosModel`]. It is used to instantiate a YOLOS
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 YOLOS
[hustvl/yolos-base](https... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#yolosconfig | #yolosconfig | .md | 273_4 |
Constructs a Detr image processor.
Args:
format (`str`, *optional*, defaults to `"coco_detection"`):
Data format of the annotations. One of "coco_detection" or "coco_panoptic".
do_resize (`bool`, *optional*, defaults to `True`):
Controls whether to resize the image's (height, width) dimensions to the specified `size`... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#yolosimageprocessor | #yolosimageprocessor | .md | 273_5 |
No docstring available for YolosFeatureExtractor
Methods: __call__
- pad
- post_process_object_detection | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#yolosfeatureextractor | #yolosfeatureextractor | .md | 273_6 |
The bare YOLOS 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/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#yolosmodel | #yolosmodel | .md | 273_7 |
YOLOS Model (consisting of a ViT encoder) with object detection heads on top, for tasks such as COCO detection.
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 ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/yolos.md | https://huggingface.co/docs/transformers/en/model_doc/yolos/#yolosforobjectdetection | #yolosforobjectdetection | .md | 273_8 |
<!--Copyright 2023 Mistral AI and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/ | .md | 274_0 | |
Mistral was introduced in the [this blogpost](https://mistral.ai/news/announcing-mistral-7b/) by Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, P... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#overview | #overview | .md | 274_1 |
Mistral-7B is a decoder-only Transformer with the following architectural choices:
- Sliding Window Attention - Trained with 8k context length and fixed cache size, with a theoretical attention span of 128K tokens
- GQA (Grouped Query Attention) - allowing faster inference and lower cache size.
- Byte-fallback BPE to... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#architectural-details | #architectural-details | .md | 274_2 |
`Mistral-7B` is released under the Apache 2.0 license. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#license | #license | .md | 274_3 |
The Mistral team has released 3 checkpoints:
- a base model, [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1), which has been pre-trained to predict the next token on internet-scale data.
- an instruction tuned model, [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#usage-tips | #usage-tips | .md | 274_4 |
The code snippets above showcase inference without any optimization tricks. However, one can drastically speed up the model by leveraging [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 lates... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#speeding-up-mistral-by-using-flash-attention | #speeding-up-mistral-by-using-flash-attention | .md | 274_5 |
Below is a expected speedup diagram that compares pure inference time between the native implementation in transformers using `mistralai/Mistral-7B-v0.1` checkpoint and the Flash Attention 2 version of the model.
<div style="text-align: center">
<img src="https://huggingface.co/datasets/ybelkada/documentation-images/... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/mistral.md | https://huggingface.co/docs/transformers/en/model_doc/mistral/#expected-speedups | #expected-speedups | .md | 274_6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.