mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-17 19:48:23 +06:00

* add distribution head to forecasting
* formatting
* Add generate function for forecasting
* Add generate function to prediction task
* formatting
* use argsort
* add past_observed_mask ordering
* fix arguments
* docs
* add back test_model_outputs_equivalence test
* formatting
* cleanup
* formatting
* use ACT2CLS
* formatting
* fix add_start_docstrings decorator
* add distribution head and generate function to regression task
add distribution head and generate function to regression task. Also made add PatchTSTForForecastingOutput, PatchTSTForRegressionOutput.
* add distribution head and generate function to regression task
add distribution head and generate function to regression task. Also made add PatchTSTForForecastingOutput, PatchTSTForRegressionOutput.
* fix typos
* add forecast_masking
* fixed tests
* use set_seed
* fix doc test
* formatting
* Update docs/source/en/model_doc/patchtst.md
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* better var names
* rename PatchTSTTranspose
* fix argument names and docs string
* remove compute_num_patches and unused class
* remove assert
* renamed to PatchTSTMasking
* use num_labels for classification
* use num_labels
* use default num_labels from super class
* move model_type after docstring
* renamed PatchTSTForMaskPretraining
* bs -> batch_size
* more review fixes
* use hidden_state
* rename encoder layer and block class
* remove commented seed_number
* edit docstring
* Add docstring
* formatting
* use past_observed_mask
* doc suggestion
* make fix-copies
* use Args:
* add docstring
* add docstring
* change some variable names and add PatchTST before some class names
* formatting
* fix argument types
* fix tests
* change x variable to patch_input
* format
* formatting
* fix-copies
* Update tests/models/patchtst/test_modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* move loss to forward
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* formatting
* fix a bug when pre_norm is set to True
* output_hidden_states is set to False as default
* set pre_norm=True as default
* format docstring
* format
* output_hidden_states is None by default
* add missing docs
* better var names
* docstring: remove default to False in output_hidden_states
* change labels name to target_values in regression task
* format
* fix tests
* change to forecast_mask_ratios and random_mask_ratio
* change mask names
* change future_values to target_values param in the prediction class
* remove nn.Sequential and make PatchTSTBatchNorm class
* black
* fix argument name for prediction
* add output_attentions option
* add output_attentions to PatchTSTEncoder
* formatting
* Add attention output option to all classes
* Remove PatchTSTEncoderBlock
* create PatchTSTEmbedding class
* use config in PatchTSTPatchify
* Use config in PatchTSTMasking class
* add channel_attn_weights
* Add PatchTSTScaler class
* add output_attentions arg to test function
* format
* Update doc with image patchtst.md
* fix-copies
* rename Forecast <-> Prediction
* change name of a few parameters to match with PatchTSMixer.
* Remove *ForForecasting class to match with other time series models.
* make style
* Remove PatchTSTForForecasting in the test
* remove PatchTSTForForecastingOutput class
* change test_forecast_head to test_prediction_head
* style
* fix docs
* fix tests
* change num_labels to num_targets
* Remove PatchTSTTranspose
* remove arguments in PatchTSTMeanScaler
* remove arguments in PatchTSTStdScaler
* add config as an argument to all the scaler classes
* reformat
* Add norm_eps for batchnorm and layernorm
* reformat.
* reformat
* edit docstring
* update docstring
* change variable name pooling to pooling_type
* fix output_hidden_states as tuple
* fix bug when calling PatchTSTBatchNorm
* change stride to patch_stride
* create PatchTSTPositionalEncoding class and restructure the PatchTSTEncoder
* formatting
* initialize scalers with configs
* edit output_hidden_states
* style
* fix forecast_mask_patches doc string
* doc improvements
* move summary to the start
* typo
* fix docstring
* turn off masking when using prediction, regression, classification
* return scaled output
* adjust output when using distribution head
* remove _num_patches function in the config
* get config.num_patches from patchifier init
* add output_attentions docstring, remove tuple in output_hidden_states
* change SamplePatchTSTPredictionOutput and SamplePatchTSTRegressionOutput to SamplePatchTSTOutput
* remove print("model_class: ", model_class)
* change encoder_attention_heads to num_attention_heads
* change norm to norm_layer
* change encoder_layers to num_hidden_layers
* change shared_embedding to share_embedding, shared_projection to share_projection
* add output_attentions
* more robust check of norm_type
* change dropout_path to path_dropout
* edit docstring
* remove positional_encoding function and add _init_pe in PatchTSTPositionalEncoding
* edit shape of cls_token and initialize it
* add a check on the num_input_channels.
* edit head_dim in the Prediction class to allow the use of cls_token
* remove some positional_encoding_type options, remove learn_pe arg, initalize pe
* change Exception to ValueError
* format
* norm_type is "batchnorm"
* make style
* change cls_token shape
* Change forecast_mask_patches to num_mask_patches. Remove forecast_mask_ratios.
* Bring PatchTSTClassificationHead on top of PatchTSTForClassification
* change encoder_ffn_dim to ffn_dim and edit the docstring.
* update variable names to match with the config
* add generation tests
* change num_mask_patches to num_forecast_mask_patches
* Add examples explaining the use of these models
* make style
* Revert "Revert "[time series] Add PatchTST (#25927)" (#27486)"
This reverts commit 78f6ed6c70
.
* make style
* fix default std scaler's minimum_scale
* fix docstring
* close code blocks
* Update docs/source/en/model_doc/patchtst.md
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update tests/models/patchtst/test_modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/configuration_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/patchtst/modeling_patchtst.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* fix tests
* add add_start_docstrings
* move examples to the forward's docstrings
* update prepare_batch
* update test
* fix test_prediction_head
* fix generation test
* use seed to create generator
* add output_hidden_states and config.num_patches
* add loc and scale args in PatchTSTForPredictionOutput
* edit outputs if if not return_dict
* use self.share_embedding to check instead checking type.
* remove seed
* make style
* seed is an optional int
* fix test
* generator device
* Fix assertTrue test
* swap order of items in outputs when return_dict=False.
* add mask_type and random_mask_ratio to unittest
* Update modeling_patchtst.py
* add add_start_docstrings for regression model
* make style
* update model path
* Edit the ValueError comment in forecast_masking
* update examples
* make style
* fix commented code
* update examples: remove config from from_pretrained call
* Edit example outputs
* Set default target_values to None
* remove config setting in regression example
* Update configuration_patchtst.py
* Update configuration_patchtst.py
* remove config from examples
* change default d_model and ffn_dim
* norm_eps default
* set has_attentions to Trye and define self.seq_length = self.num_patche
* update docstring
* change variable mask_input to do_mask_input
* fix blank space.
* change logger.debug to logger.warning.
* remove unused PATCHTST_INPUTS_DOCSTRING
* remove all_generative_model_classes
* set test_missing_keys=True
* remove undefined params in the docstring.
---------
Co-authored-by: nnguyen <nnguyen@us.ibm.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Nam Nguyen <namctin@gmail.com>
Co-authored-by: Wesley Gifford <79663411+wgifford@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
310 lines
37 KiB
Markdown
310 lines
37 KiB
Markdown
<!--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 agreed to in writing, software distributed under the License is distributed on
|
|
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations under the License.
|
|
|
|
⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
|
|
rendered properly in your Markdown viewer.
|
|
-->
|
|
|
|
# 🤗 Transformers
|
|
|
|
State-of-the-art Machine Learning for [PyTorch](https://pytorch.org/), [TensorFlow](https://www.tensorflow.org/), and [JAX](https://jax.readthedocs.io/en/latest/).
|
|
|
|
🤗 Transformers provides APIs and tools to easily download and train state-of-the-art pretrained models. Using pretrained models can reduce your compute costs, carbon footprint, and save you the time and resources required to train a model from scratch. These models support common tasks in different modalities, such as:
|
|
|
|
📝 **Natural Language Processing**: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation.<br>
|
|
🖼️ **Computer Vision**: image classification, object detection, and segmentation.<br>
|
|
🗣️ **Audio**: automatic speech recognition and audio classification.<br>
|
|
🐙 **Multimodal**: table question answering, optical character recognition, information extraction from scanned documents, video classification, and visual question answering.
|
|
|
|
🤗 Transformers support framework interoperability between PyTorch, TensorFlow, and JAX. This provides the flexibility to use a different framework at each stage of a model's life; train a model in three lines of code in one framework, and load it for inference in another. Models can also be exported to a format like ONNX and TorchScript for deployment in production environments.
|
|
|
|
Join the growing community on the [Hub](https://huggingface.co/models), [forum](https://discuss.huggingface.co/), or [Discord](https://discord.com/invite/JfAtkvEtRb) today!
|
|
|
|
## If you are looking for custom support from the Hugging Face team
|
|
|
|
<a target="_blank" href="https://huggingface.co/support">
|
|
<img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="width: 100%; max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
|
|
</a>
|
|
|
|
## Contents
|
|
|
|
The documentation is organized into five sections:
|
|
|
|
- **GET STARTED** provides a quick tour of the library and installation instructions to get up and running.
|
|
- **TUTORIALS** are a great place to start if you're a beginner. This section will help you gain the basic skills you need to start using the library.
|
|
- **HOW-TO GUIDES** show you how to achieve a specific goal, like finetuning a pretrained model for language modeling or how to write and share a custom model.
|
|
- **CONCEPTUAL GUIDES** offers more discussion and explanation of the underlying concepts and ideas behind models, tasks, and the design philosophy of 🤗 Transformers.
|
|
- **API** describes all classes and functions:
|
|
|
|
- **MAIN CLASSES** details the most important classes like configuration, model, tokenizer, and pipeline.
|
|
- **MODELS** details the classes and functions related to each model implemented in the library.
|
|
- **INTERNAL HELPERS** details utility classes and functions used internally.
|
|
|
|
|
|
## Supported models and frameworks
|
|
|
|
The table below represents the current support in the library for each of those models, whether they have a Python
|
|
tokenizer (called "slow"). A "fast" tokenizer backed by the 🤗 Tokenizers library, whether they have support in Jax (via
|
|
Flax), PyTorch, and/or TensorFlow.
|
|
|
|
<!--This table is updated automatically from the auto modules with _make fix-copies_. Do not update manually!-->
|
|
|
|
| Model | PyTorch support | TensorFlow support | Flax Support |
|
|
|:------------------------------------------------------------------------:|:---------------:|:------------------:|:------------:|
|
|
| [ALBERT](model_doc/albert) | ✅ | ✅ | ✅ |
|
|
| [ALIGN](model_doc/align) | ✅ | ❌ | ❌ |
|
|
| [AltCLIP](model_doc/altclip) | ✅ | ❌ | ❌ |
|
|
| [Audio Spectrogram Transformer](model_doc/audio-spectrogram-transformer) | ✅ | ❌ | ❌ |
|
|
| [Autoformer](model_doc/autoformer) | ✅ | ❌ | ❌ |
|
|
| [Bark](model_doc/bark) | ✅ | ❌ | ❌ |
|
|
| [BART](model_doc/bart) | ✅ | ✅ | ✅ |
|
|
| [BARThez](model_doc/barthez) | ✅ | ✅ | ✅ |
|
|
| [BARTpho](model_doc/bartpho) | ✅ | ✅ | ✅ |
|
|
| [BEiT](model_doc/beit) | ✅ | ❌ | ✅ |
|
|
| [BERT](model_doc/bert) | ✅ | ✅ | ✅ |
|
|
| [Bert Generation](model_doc/bert-generation) | ✅ | ❌ | ❌ |
|
|
| [BertJapanese](model_doc/bert-japanese) | ✅ | ✅ | ✅ |
|
|
| [BERTweet](model_doc/bertweet) | ✅ | ✅ | ✅ |
|
|
| [BigBird](model_doc/big_bird) | ✅ | ❌ | ✅ |
|
|
| [BigBird-Pegasus](model_doc/bigbird_pegasus) | ✅ | ❌ | ❌ |
|
|
| [BioGpt](model_doc/biogpt) | ✅ | ❌ | ❌ |
|
|
| [BiT](model_doc/bit) | ✅ | ❌ | ❌ |
|
|
| [Blenderbot](model_doc/blenderbot) | ✅ | ✅ | ✅ |
|
|
| [BlenderbotSmall](model_doc/blenderbot-small) | ✅ | ✅ | ✅ |
|
|
| [BLIP](model_doc/blip) | ✅ | ✅ | ❌ |
|
|
| [BLIP-2](model_doc/blip-2) | ✅ | ❌ | ❌ |
|
|
| [BLOOM](model_doc/bloom) | ✅ | ❌ | ✅ |
|
|
| [BORT](model_doc/bort) | ✅ | ✅ | ✅ |
|
|
| [BridgeTower](model_doc/bridgetower) | ✅ | ❌ | ❌ |
|
|
| [BROS](model_doc/bros) | ✅ | ❌ | ❌ |
|
|
| [ByT5](model_doc/byt5) | ✅ | ✅ | ✅ |
|
|
| [CamemBERT](model_doc/camembert) | ✅ | ✅ | ❌ |
|
|
| [CANINE](model_doc/canine) | ✅ | ❌ | ❌ |
|
|
| [Chinese-CLIP](model_doc/chinese_clip) | ✅ | ❌ | ❌ |
|
|
| [CLAP](model_doc/clap) | ✅ | ❌ | ❌ |
|
|
| [CLIP](model_doc/clip) | ✅ | ✅ | ✅ |
|
|
| [CLIPSeg](model_doc/clipseg) | ✅ | ❌ | ❌ |
|
|
| [CLVP](model_doc/clvp) | ✅ | ❌ | ❌ |
|
|
| [CodeGen](model_doc/codegen) | ✅ | ❌ | ❌ |
|
|
| [CodeLlama](model_doc/code_llama) | ✅ | ❌ | ❌ |
|
|
| [Conditional DETR](model_doc/conditional_detr) | ✅ | ❌ | ❌ |
|
|
| [ConvBERT](model_doc/convbert) | ✅ | ✅ | ❌ |
|
|
| [ConvNeXT](model_doc/convnext) | ✅ | ✅ | ❌ |
|
|
| [ConvNeXTV2](model_doc/convnextv2) | ✅ | ✅ | ❌ |
|
|
| [CPM](model_doc/cpm) | ✅ | ✅ | ✅ |
|
|
| [CPM-Ant](model_doc/cpmant) | ✅ | ❌ | ❌ |
|
|
| [CTRL](model_doc/ctrl) | ✅ | ✅ | ❌ |
|
|
| [CvT](model_doc/cvt) | ✅ | ✅ | ❌ |
|
|
| [Data2VecAudio](model_doc/data2vec) | ✅ | ❌ | ❌ |
|
|
| [Data2VecText](model_doc/data2vec) | ✅ | ❌ | ❌ |
|
|
| [Data2VecVision](model_doc/data2vec) | ✅ | ✅ | ❌ |
|
|
| [DeBERTa](model_doc/deberta) | ✅ | ✅ | ❌ |
|
|
| [DeBERTa-v2](model_doc/deberta-v2) | ✅ | ✅ | ❌ |
|
|
| [Decision Transformer](model_doc/decision_transformer) | ✅ | ❌ | ❌ |
|
|
| [Deformable DETR](model_doc/deformable_detr) | ✅ | ❌ | ❌ |
|
|
| [DeiT](model_doc/deit) | ✅ | ✅ | ❌ |
|
|
| [DePlot](model_doc/deplot) | ✅ | ❌ | ❌ |
|
|
| [DETA](model_doc/deta) | ✅ | ❌ | ❌ |
|
|
| [DETR](model_doc/detr) | ✅ | ❌ | ❌ |
|
|
| [DialoGPT](model_doc/dialogpt) | ✅ | ✅ | ✅ |
|
|
| [DiNAT](model_doc/dinat) | ✅ | ❌ | ❌ |
|
|
| [DINOv2](model_doc/dinov2) | ✅ | ❌ | ❌ |
|
|
| [DistilBERT](model_doc/distilbert) | ✅ | ✅ | ✅ |
|
|
| [DiT](model_doc/dit) | ✅ | ❌ | ✅ |
|
|
| [DonutSwin](model_doc/donut) | ✅ | ❌ | ❌ |
|
|
| [DPR](model_doc/dpr) | ✅ | ✅ | ❌ |
|
|
| [DPT](model_doc/dpt) | ✅ | ❌ | ❌ |
|
|
| [EfficientFormer](model_doc/efficientformer) | ✅ | ✅ | ❌ |
|
|
| [EfficientNet](model_doc/efficientnet) | ✅ | ❌ | ❌ |
|
|
| [ELECTRA](model_doc/electra) | ✅ | ✅ | ✅ |
|
|
| [EnCodec](model_doc/encodec) | ✅ | ❌ | ❌ |
|
|
| [Encoder decoder](model_doc/encoder-decoder) | ✅ | ✅ | ✅ |
|
|
| [ERNIE](model_doc/ernie) | ✅ | ❌ | ❌ |
|
|
| [ErnieM](model_doc/ernie_m) | ✅ | ❌ | ❌ |
|
|
| [ESM](model_doc/esm) | ✅ | ✅ | ❌ |
|
|
| [FairSeq Machine-Translation](model_doc/fsmt) | ✅ | ❌ | ❌ |
|
|
| [Falcon](model_doc/falcon) | ✅ | ❌ | ❌ |
|
|
| [FLAN-T5](model_doc/flan-t5) | ✅ | ✅ | ✅ |
|
|
| [FLAN-UL2](model_doc/flan-ul2) | ✅ | ✅ | ✅ |
|
|
| [FlauBERT](model_doc/flaubert) | ✅ | ✅ | ❌ |
|
|
| [FLAVA](model_doc/flava) | ✅ | ❌ | ❌ |
|
|
| [FNet](model_doc/fnet) | ✅ | ❌ | ❌ |
|
|
| [FocalNet](model_doc/focalnet) | ✅ | ❌ | ❌ |
|
|
| [Funnel Transformer](model_doc/funnel) | ✅ | ✅ | ❌ |
|
|
| [Fuyu](model_doc/fuyu) | ✅ | ❌ | ❌ |
|
|
| [GIT](model_doc/git) | ✅ | ❌ | ❌ |
|
|
| [GLPN](model_doc/glpn) | ✅ | ❌ | ❌ |
|
|
| [GPT Neo](model_doc/gpt_neo) | ✅ | ❌ | ✅ |
|
|
| [GPT NeoX](model_doc/gpt_neox) | ✅ | ❌ | ❌ |
|
|
| [GPT NeoX Japanese](model_doc/gpt_neox_japanese) | ✅ | ❌ | ❌ |
|
|
| [GPT-J](model_doc/gptj) | ✅ | ✅ | ✅ |
|
|
| [GPT-Sw3](model_doc/gpt-sw3) | ✅ | ✅ | ✅ |
|
|
| [GPTBigCode](model_doc/gpt_bigcode) | ✅ | ❌ | ❌ |
|
|
| [GPTSAN-japanese](model_doc/gptsan-japanese) | ✅ | ❌ | ❌ |
|
|
| [Graphormer](model_doc/graphormer) | ✅ | ❌ | ❌ |
|
|
| [GroupViT](model_doc/groupvit) | ✅ | ✅ | ❌ |
|
|
| [HerBERT](model_doc/herbert) | ✅ | ✅ | ✅ |
|
|
| [Hubert](model_doc/hubert) | ✅ | ✅ | ❌ |
|
|
| [I-BERT](model_doc/ibert) | ✅ | ❌ | ❌ |
|
|
| [IDEFICS](model_doc/idefics) | ✅ | ❌ | ❌ |
|
|
| [ImageGPT](model_doc/imagegpt) | ✅ | ❌ | ❌ |
|
|
| [Informer](model_doc/informer) | ✅ | ❌ | ❌ |
|
|
| [InstructBLIP](model_doc/instructblip) | ✅ | ❌ | ❌ |
|
|
| [Jukebox](model_doc/jukebox) | ✅ | ❌ | ❌ |
|
|
| [KOSMOS-2](model_doc/kosmos-2) | ✅ | ❌ | ❌ |
|
|
| [LayoutLM](model_doc/layoutlm) | ✅ | ✅ | ❌ |
|
|
| [LayoutLMv2](model_doc/layoutlmv2) | ✅ | ❌ | ❌ |
|
|
| [LayoutLMv3](model_doc/layoutlmv3) | ✅ | ✅ | ❌ |
|
|
| [LayoutXLM](model_doc/layoutxlm) | ✅ | ❌ | ❌ |
|
|
| [LED](model_doc/led) | ✅ | ✅ | ❌ |
|
|
| [LeViT](model_doc/levit) | ✅ | ❌ | ❌ |
|
|
| [LiLT](model_doc/lilt) | ✅ | ❌ | ❌ |
|
|
| [LLaMA](model_doc/llama) | ✅ | ❌ | ❌ |
|
|
| [Llama2](model_doc/llama2) | ✅ | ❌ | ❌ |
|
|
| [Longformer](model_doc/longformer) | ✅ | ✅ | ❌ |
|
|
| [LongT5](model_doc/longt5) | ✅ | ❌ | ✅ |
|
|
| [LUKE](model_doc/luke) | ✅ | ❌ | ❌ |
|
|
| [LXMERT](model_doc/lxmert) | ✅ | ✅ | ❌ |
|
|
| [M-CTC-T](model_doc/mctct) | ✅ | ❌ | ❌ |
|
|
| [M2M100](model_doc/m2m_100) | ✅ | ❌ | ❌ |
|
|
| [MADLAD-400](model_doc/madlad-400) | ✅ | ✅ | ✅ |
|
|
| [Marian](model_doc/marian) | ✅ | ✅ | ✅ |
|
|
| [MarkupLM](model_doc/markuplm) | ✅ | ❌ | ❌ |
|
|
| [Mask2Former](model_doc/mask2former) | ✅ | ❌ | ❌ |
|
|
| [MaskFormer](model_doc/maskformer) | ✅ | ❌ | ❌ |
|
|
| [MatCha](model_doc/matcha) | ✅ | ❌ | ❌ |
|
|
| [mBART](model_doc/mbart) | ✅ | ✅ | ✅ |
|
|
| [mBART-50](model_doc/mbart50) | ✅ | ✅ | ✅ |
|
|
| [MEGA](model_doc/mega) | ✅ | ❌ | ❌ |
|
|
| [Megatron-BERT](model_doc/megatron-bert) | ✅ | ❌ | ❌ |
|
|
| [Megatron-GPT2](model_doc/megatron_gpt2) | ✅ | ✅ | ✅ |
|
|
| [MGP-STR](model_doc/mgp-str) | ✅ | ❌ | ❌ |
|
|
| [Mistral](model_doc/mistral) | ✅ | ❌ | ❌ |
|
|
| [mLUKE](model_doc/mluke) | ✅ | ❌ | ❌ |
|
|
| [MMS](model_doc/mms) | ✅ | ✅ | ✅ |
|
|
| [MobileBERT](model_doc/mobilebert) | ✅ | ✅ | ❌ |
|
|
| [MobileNetV1](model_doc/mobilenet_v1) | ✅ | ❌ | ❌ |
|
|
| [MobileNetV2](model_doc/mobilenet_v2) | ✅ | ❌ | ❌ |
|
|
| [MobileViT](model_doc/mobilevit) | ✅ | ✅ | ❌ |
|
|
| [MobileViTV2](model_doc/mobilevitv2) | ✅ | ❌ | ❌ |
|
|
| [MPNet](model_doc/mpnet) | ✅ | ✅ | ❌ |
|
|
| [MPT](model_doc/mpt) | ✅ | ❌ | ❌ |
|
|
| [MRA](model_doc/mra) | ✅ | ❌ | ❌ |
|
|
| [MT5](model_doc/mt5) | ✅ | ✅ | ✅ |
|
|
| [MusicGen](model_doc/musicgen) | ✅ | ❌ | ❌ |
|
|
| [MVP](model_doc/mvp) | ✅ | ❌ | ❌ |
|
|
| [NAT](model_doc/nat) | ✅ | ❌ | ❌ |
|
|
| [Nezha](model_doc/nezha) | ✅ | ❌ | ❌ |
|
|
| [NLLB](model_doc/nllb) | ✅ | ❌ | ❌ |
|
|
| [NLLB-MOE](model_doc/nllb-moe) | ✅ | ❌ | ❌ |
|
|
| [Nougat](model_doc/nougat) | ✅ | ✅ | ✅ |
|
|
| [Nyströmformer](model_doc/nystromformer) | ✅ | ❌ | ❌ |
|
|
| [OneFormer](model_doc/oneformer) | ✅ | ❌ | ❌ |
|
|
| [OpenAI GPT](model_doc/openai-gpt) | ✅ | ✅ | ❌ |
|
|
| [OpenAI GPT-2](model_doc/gpt2) | ✅ | ✅ | ✅ |
|
|
| [OpenLlama](model_doc/open-llama) | ✅ | ❌ | ❌ |
|
|
| [OPT](model_doc/opt) | ✅ | ✅ | ✅ |
|
|
| [OWL-ViT](model_doc/owlvit) | ✅ | ❌ | ❌ |
|
|
| [OWLv2](model_doc/owlv2) | ✅ | ❌ | ❌ |
|
|
| [PatchTST](model_doc/patchtst) | ✅ | ❌ | ❌ |
|
|
| [Pegasus](model_doc/pegasus) | ✅ | ✅ | ✅ |
|
|
| [PEGASUS-X](model_doc/pegasus_x) | ✅ | ❌ | ❌ |
|
|
| [Perceiver](model_doc/perceiver) | ✅ | ❌ | ❌ |
|
|
| [Persimmon](model_doc/persimmon) | ✅ | ❌ | ❌ |
|
|
| [Phi](model_doc/phi) | ✅ | ❌ | ❌ |
|
|
| [PhoBERT](model_doc/phobert) | ✅ | ✅ | ✅ |
|
|
| [Pix2Struct](model_doc/pix2struct) | ✅ | ❌ | ❌ |
|
|
| [PLBart](model_doc/plbart) | ✅ | ❌ | ❌ |
|
|
| [PoolFormer](model_doc/poolformer) | ✅ | ❌ | ❌ |
|
|
| [Pop2Piano](model_doc/pop2piano) | ✅ | ❌ | ❌ |
|
|
| [ProphetNet](model_doc/prophetnet) | ✅ | ❌ | ❌ |
|
|
| [PVT](model_doc/pvt) | ✅ | ❌ | ❌ |
|
|
| [QDQBert](model_doc/qdqbert) | ✅ | ❌ | ❌ |
|
|
| [RAG](model_doc/rag) | ✅ | ✅ | ❌ |
|
|
| [REALM](model_doc/realm) | ✅ | ❌ | ❌ |
|
|
| [Reformer](model_doc/reformer) | ✅ | ❌ | ❌ |
|
|
| [RegNet](model_doc/regnet) | ✅ | ✅ | ✅ |
|
|
| [RemBERT](model_doc/rembert) | ✅ | ✅ | ❌ |
|
|
| [ResNet](model_doc/resnet) | ✅ | ✅ | ✅ |
|
|
| [RetriBERT](model_doc/retribert) | ✅ | ❌ | ❌ |
|
|
| [RoBERTa](model_doc/roberta) | ✅ | ✅ | ✅ |
|
|
| [RoBERTa-PreLayerNorm](model_doc/roberta-prelayernorm) | ✅ | ✅ | ✅ |
|
|
| [RoCBert](model_doc/roc_bert) | ✅ | ❌ | ❌ |
|
|
| [RoFormer](model_doc/roformer) | ✅ | ✅ | ✅ |
|
|
| [RWKV](model_doc/rwkv) | ✅ | ❌ | ❌ |
|
|
| [SAM](model_doc/sam) | ✅ | ✅ | ❌ |
|
|
| [SeamlessM4T](model_doc/seamless_m4t) | ✅ | ❌ | ❌ |
|
|
| [SegFormer](model_doc/segformer) | ✅ | ✅ | ❌ |
|
|
| [SEW](model_doc/sew) | ✅ | ❌ | ❌ |
|
|
| [SEW-D](model_doc/sew-d) | ✅ | ❌ | ❌ |
|
|
| [Speech Encoder decoder](model_doc/speech-encoder-decoder) | ✅ | ❌ | ✅ |
|
|
| [Speech2Text](model_doc/speech_to_text) | ✅ | ✅ | ❌ |
|
|
| [SpeechT5](model_doc/speecht5) | ✅ | ❌ | ❌ |
|
|
| [Splinter](model_doc/splinter) | ✅ | ❌ | ❌ |
|
|
| [SqueezeBERT](model_doc/squeezebert) | ✅ | ❌ | ❌ |
|
|
| [SwiftFormer](model_doc/swiftformer) | ✅ | ❌ | ❌ |
|
|
| [Swin Transformer](model_doc/swin) | ✅ | ✅ | ❌ |
|
|
| [Swin Transformer V2](model_doc/swinv2) | ✅ | ❌ | ❌ |
|
|
| [Swin2SR](model_doc/swin2sr) | ✅ | ❌ | ❌ |
|
|
| [SwitchTransformers](model_doc/switch_transformers) | ✅ | ❌ | ❌ |
|
|
| [T5](model_doc/t5) | ✅ | ✅ | ✅ |
|
|
| [T5v1.1](model_doc/t5v1.1) | ✅ | ✅ | ✅ |
|
|
| [Table Transformer](model_doc/table-transformer) | ✅ | ❌ | ❌ |
|
|
| [TAPAS](model_doc/tapas) | ✅ | ✅ | ❌ |
|
|
| [TAPEX](model_doc/tapex) | ✅ | ✅ | ✅ |
|
|
| [Time Series Transformer](model_doc/time_series_transformer) | ✅ | ❌ | ❌ |
|
|
| [TimeSformer](model_doc/timesformer) | ✅ | ❌ | ❌ |
|
|
| [Trajectory Transformer](model_doc/trajectory_transformer) | ✅ | ❌ | ❌ |
|
|
| [Transformer-XL](model_doc/transfo-xl) | ✅ | ✅ | ❌ |
|
|
| [TrOCR](model_doc/trocr) | ✅ | ❌ | ❌ |
|
|
| [TVLT](model_doc/tvlt) | ✅ | ❌ | ❌ |
|
|
| [TVP](model_doc/tvp) | ✅ | ❌ | ❌ |
|
|
| [UL2](model_doc/ul2) | ✅ | ✅ | ✅ |
|
|
| [UMT5](model_doc/umt5) | ✅ | ❌ | ❌ |
|
|
| [UniSpeech](model_doc/unispeech) | ✅ | ❌ | ❌ |
|
|
| [UniSpeechSat](model_doc/unispeech-sat) | ✅ | ❌ | ❌ |
|
|
| [UnivNet](model_doc/univnet) | ✅ | ❌ | ❌ |
|
|
| [UPerNet](model_doc/upernet) | ✅ | ❌ | ❌ |
|
|
| [VAN](model_doc/van) | ✅ | ❌ | ❌ |
|
|
| [VideoMAE](model_doc/videomae) | ✅ | ❌ | ❌ |
|
|
| [ViLT](model_doc/vilt) | ✅ | ❌ | ❌ |
|
|
| [Vision Encoder decoder](model_doc/vision-encoder-decoder) | ✅ | ✅ | ✅ |
|
|
| [VisionTextDualEncoder](model_doc/vision-text-dual-encoder) | ✅ | ✅ | ✅ |
|
|
| [VisualBERT](model_doc/visual_bert) | ✅ | ❌ | ❌ |
|
|
| [ViT](model_doc/vit) | ✅ | ✅ | ✅ |
|
|
| [ViT Hybrid](model_doc/vit_hybrid) | ✅ | ❌ | ❌ |
|
|
| [VitDet](model_doc/vitdet) | ✅ | ❌ | ❌ |
|
|
| [ViTMAE](model_doc/vit_mae) | ✅ | ✅ | ❌ |
|
|
| [ViTMatte](model_doc/vitmatte) | ✅ | ❌ | ❌ |
|
|
| [ViTMSN](model_doc/vit_msn) | ✅ | ❌ | ❌ |
|
|
| [VITS](model_doc/vits) | ✅ | ❌ | ❌ |
|
|
| [ViViT](model_doc/vivit) | ✅ | ❌ | ❌ |
|
|
| [Wav2Vec2](model_doc/wav2vec2) | ✅ | ✅ | ✅ |
|
|
| [Wav2Vec2-Conformer](model_doc/wav2vec2-conformer) | ✅ | ❌ | ❌ |
|
|
| [Wav2Vec2Phoneme](model_doc/wav2vec2_phoneme) | ✅ | ✅ | ✅ |
|
|
| [WavLM](model_doc/wavlm) | ✅ | ❌ | ❌ |
|
|
| [Whisper](model_doc/whisper) | ✅ | ✅ | ✅ |
|
|
| [X-CLIP](model_doc/xclip) | ✅ | ❌ | ❌ |
|
|
| [X-MOD](model_doc/xmod) | ✅ | ❌ | ❌ |
|
|
| [XGLM](model_doc/xglm) | ✅ | ✅ | ✅ |
|
|
| [XLM](model_doc/xlm) | ✅ | ✅ | ❌ |
|
|
| [XLM-ProphetNet](model_doc/xlm-prophetnet) | ✅ | ❌ | ❌ |
|
|
| [XLM-RoBERTa](model_doc/xlm-roberta) | ✅ | ✅ | ✅ |
|
|
| [XLM-RoBERTa-XL](model_doc/xlm-roberta-xl) | ✅ | ❌ | ❌ |
|
|
| [XLM-V](model_doc/xlm-v) | ✅ | ✅ | ✅ |
|
|
| [XLNet](model_doc/xlnet) | ✅ | ✅ | ❌ |
|
|
| [XLS-R](model_doc/xls_r) | ✅ | ✅ | ✅ |
|
|
| [XLSR-Wav2Vec2](model_doc/xlsr_wav2vec2) | ✅ | ✅ | ✅ |
|
|
| [YOLOS](model_doc/yolos) | ✅ | ❌ | ❌ |
|
|
| [YOSO](model_doc/yoso) | ✅ | ❌ | ❌ |
|
|
|
|
<!-- End table-->
|