"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "4868a830db5f19f56712f540979d637368221d50"
Unverified Commit 78a53d59 authored by Maria Khalusova's avatar Maria Khalusova Committed by GitHub
Browse files

Adding task guides to resources (#21704)



* added resources: links to task guides that support these models

* minor polishing

* conflict resolved

* link fix

* Update docs/source/en/model_doc/vision-encoder-decoder.mdx
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
parent 03aaac35
...@@ -193,6 +193,12 @@ all nodes and xpaths yourself, you can provide them directly to the processor. M ...@@ -193,6 +193,12 @@ all nodes and xpaths yourself, you can provide them directly to the processor. M
dict_keys(['input_ids', 'token_type_ids', 'attention_mask', 'xpath_tags_seq', 'xpath_subs_seq']) dict_keys(['input_ids', 'token_type_ids', 'attention_mask', 'xpath_tags_seq', 'xpath_subs_seq'])
``` ```
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
## MarkupLMConfig ## MarkupLMConfig
[[autodoc]] MarkupLMConfig [[autodoc]] MarkupLMConfig
......
...@@ -152,6 +152,15 @@ tokenizer.batch_decode(generated_tokens, skip_special_tokens=True) ...@@ -152,6 +152,15 @@ tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
# => "The Secretary-General of the United Nations says there is no military solution in Syria." # => "The Secretary-General of the United Nations says there is no military solution in Syria."
``` ```
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Question answering task guide](./tasks/question_answering)
- [Causal language modeling task guide](./tasks/language_modeling)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## MBartConfig ## MBartConfig
[[autodoc]] MBartConfig [[autodoc]] MBartConfig
......
...@@ -31,6 +31,9 @@ performance for many languages that also transfers well to LibriSpeech.* ...@@ -31,6 +31,9 @@ performance for many languages that also transfers well to LibriSpeech.*
This model was contributed by [cwkeam](https://huggingface.co/cwkeam). The original code can be found [here](https://github.com/flashlight/wav2letter/tree/main/recipes/mling_pl). This model was contributed by [cwkeam](https://huggingface.co/cwkeam). The original code can be found [here](https://github.com/flashlight/wav2letter/tree/main/recipes/mling_pl).
## Documentation resources
- [Automatic speech recognition task guide](./tasks/asr)
Tips: Tips:
......
...@@ -78,6 +78,15 @@ This model was contributed by [jdemouth](https://huggingface.co/jdemouth). The o ...@@ -78,6 +78,15 @@ This model was contributed by [jdemouth](https://huggingface.co/jdemouth). The o
Megatron Language models. In particular, it contains a hybrid model parallel approach using "tensor parallel" and Megatron Language models. In particular, it contains a hybrid model parallel approach using "tensor parallel" and
"pipeline parallel" techniques. "pipeline parallel" techniques.
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
- [Causal language modeling task guide](./tasks/language_modeling)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Multiple choice task guide](./tasks/multiple_choice)
## MegatronBertConfig ## MegatronBertConfig
[[autodoc]] MegatronBertConfig [[autodoc]] MegatronBertConfig
......
...@@ -43,6 +43,14 @@ Tips: ...@@ -43,6 +43,14 @@ Tips:
This model was contributed by [vshampor](https://huggingface.co/vshampor). The original code can be found [here](https://github.com/google-research/mobilebert). This model was contributed by [vshampor](https://huggingface.co/vshampor). The original code can be found [here](https://github.com/google-research/mobilebert).
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Multiple choice task guide](./tasks/multiple_choice)
## MobileBertConfig ## MobileBertConfig
[[autodoc]] MobileBertConfig [[autodoc]] MobileBertConfig
......
...@@ -51,6 +51,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -51,6 +51,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
<PipelineTag pipeline="image-classification"/> <PipelineTag pipeline="image-classification"/>
- [`MobileNetV1ForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb). - [`MobileNetV1ForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
- See also: [Image classification task guide](./tasks/image_classification)
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 existing resource. 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 existing resource.
......
...@@ -55,6 +55,10 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -55,6 +55,10 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
<PipelineTag pipeline="image-classification"/> <PipelineTag pipeline="image-classification"/>
- [`MobileNetV2ForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb). - [`MobileNetV2ForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
- See also: [Image classification task guide](./tasks/image_classification)
**Semantic segmentation**
- [Semantic segmentation task guide](./tasks/semantic_segmentation)
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 existing resource. 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 existing resource.
......
...@@ -64,6 +64,10 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -64,6 +64,10 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
<PipelineTag pipeline="image-classification"/> <PipelineTag pipeline="image-classification"/>
- [`MobileViTForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb). - [`MobileViTForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
- See also: [Image classification task guide](./tasks/image_classification)
**Semantic segmentation**
- [Semantic segmentation task guide](./tasks/semantic_segmentation)
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 existing resource. 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 existing resource.
......
...@@ -40,6 +40,14 @@ Tips: ...@@ -40,6 +40,14 @@ Tips:
The original code can be found [here](https://github.com/microsoft/MPNet). The original code can be found [here](https://github.com/microsoft/MPNet).
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Multiple choice task guide](./tasks/multiple_choice)
## MPNetConfig ## MPNetConfig
[[autodoc]] MPNetConfig [[autodoc]] MPNetConfig
......
...@@ -56,6 +56,11 @@ Google has released the following variants: ...@@ -56,6 +56,11 @@ Google has released the following variants:
This model was contributed by [patrickvonplaten](https://huggingface.co/patrickvonplaten). The original code can be This model was contributed by [patrickvonplaten](https://huggingface.co/patrickvonplaten). The original code can be
found [here](https://github.com/google-research/multilingual-t5). found [here](https://github.com/google-research/multilingual-t5).
## Documentation resources
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## MT5Config ## MT5Config
[[autodoc]] MT5Config [[autodoc]] MT5Config
......
...@@ -100,6 +100,15 @@ For lightweight tuning, *i.e.*, fixing the model and only tuning prompts, you ca ...@@ -100,6 +100,15 @@ For lightweight tuning, *i.e.*, fixing the model and only tuning prompts, you ca
>>> model.set_lightweight_tuning() >>> model.set_lightweight_tuning()
``` ```
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Question answering task guide](./tasks/question_answering)
- [Causal language modeling task guide](./tasks/language_modeling)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## MvpConfig ## MvpConfig
[[autodoc]] MvpConfig [[autodoc]] MvpConfig
......
...@@ -63,6 +63,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -63,6 +63,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
<PipelineTag pipeline="image-classification"/> <PipelineTag pipeline="image-classification"/>
- [`NatForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb). - [`NatForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
- See also: [Image classification task guide](./tasks/image_classification)
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 existing resource. 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 existing resource.
......
...@@ -31,6 +31,14 @@ and natural language inference (XNLI).* ...@@ -31,6 +31,14 @@ and natural language inference (XNLI).*
This model was contributed by [sijunhe](https://huggingface.co/sijunhe). The original code can be found [here](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/NEZHA-PyTorch). This model was contributed by [sijunhe](https://huggingface.co/sijunhe). The original code can be found [here](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/NEZHA-PyTorch).
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Multiple choice task guide](./tasks/multiple_choice)
## NezhaConfig ## NezhaConfig
[[autodoc]] NezhaConfig [[autodoc]] NezhaConfig
......
...@@ -88,6 +88,11 @@ See example below for a translation from romanian to german: ...@@ -88,6 +88,11 @@ See example below for a translation from romanian to german:
UN-Chef sagt, es gibt keine militärische Lösung in Syrien UN-Chef sagt, es gibt keine militärische Lösung in Syrien
``` ```
## Documentation resources
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## NllbTokenizer ## NllbTokenizer
[[autodoc]] NllbTokenizer [[autodoc]] NllbTokenizer
......
...@@ -33,6 +33,14 @@ favorably relative to other efficient self-attention methods. Our code is availa ...@@ -33,6 +33,14 @@ favorably relative to other efficient self-attention methods. Our code is availa
This model was contributed by [novice03](https://huggingface.co/novice03). The original code can be found [here](https://github.com/mlpen/Nystromformer). This model was contributed by [novice03](https://huggingface.co/novice03). The original code can be found [here](https://github.com/mlpen/Nystromformer).
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Token classification task guide](./tasks/token_classification)
- [Question answering task guide](./tasks/question_answering)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Multiple choice task guide](./tasks/multiple_choice)
## NystromformerConfig ## NystromformerConfig
[[autodoc]] NystromformerConfig [[autodoc]] NystromformerConfig
......
...@@ -73,6 +73,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -73,6 +73,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
<PipelineTag pipeline="text-classification"/> <PipelineTag pipeline="text-classification"/>
- A blog post on [outperforming OpenAI GPT-3 with SetFit for text-classification](https://www.philschmid.de/getting-started-setfit). - A blog post on [outperforming OpenAI GPT-3 with SetFit for text-classification](https://www.philschmid.de/getting-started-setfit).
- See also: [Text classification task guide](./tasks/sequence_classification)
<PipelineTag pipeline="text-generation"/> <PipelineTag pipeline="text-generation"/>
...@@ -86,6 +87,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h ...@@ -86,6 +87,7 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
- [Causal language modeling](https://huggingface.co/course/en/chapter7/6?fw=pt#training-a-causal-language-model-from-scratch) chapter of the 🤗 Hugging Face Course. - [Causal language modeling](https://huggingface.co/course/en/chapter7/6?fw=pt#training-a-causal-language-model-from-scratch) chapter of the 🤗 Hugging Face Course.
- [`OpenAIGPTLMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling), [text generation example script](https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-generation/run_generation.py) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb). - [`OpenAIGPTLMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling), [text generation example script](https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-generation/run_generation.py) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
- [`TFOpenAIGPTLMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_clmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb). - [`TFOpenAIGPTLMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_clmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
- See also: [Causal language modeling task guide](./tasks/language_modeling)
<PipelineTag pipeline="token-classification"/> <PipelineTag pipeline="token-classification"/>
......
...@@ -45,7 +45,7 @@ The resource should ideally demonstrate something new instead of duplicating an ...@@ -45,7 +45,7 @@ The resource should ideally demonstrate something new instead of duplicating an
<PipelineTag pipeline="text-classification" /> <PipelineTag pipeline="text-classification" />
- [Token classification](https://huggingface.co/course/chapter7/2?fw=pt) chapter of the 🤗 Hugging Face Course. - [Text classification task guide](sequence_classification.mdx)
- [`OPTForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb). - [`OPTForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb).
<PipelineTag pipeline="question-answering" /> <PipelineTag pipeline="question-answering" />
...@@ -56,7 +56,7 @@ The resource should ideally demonstrate something new instead of duplicating an ...@@ -56,7 +56,7 @@ The resource should ideally demonstrate something new instead of duplicating an
⚡️ Inference ⚡️ Inference
- A blog bost on [How 🤗 Accelerate runs very large models thanks to PyTorch](https://huggingface.co/blog/accelerate-large-models) with OPT. - A blog post on [How 🤗 Accelerate runs very large models thanks to PyTorch](https://huggingface.co/blog/accelerate-large-models) with OPT.
## OPTConfig ## OPTConfig
......
...@@ -102,6 +102,12 @@ All the [checkpoints](https://huggingface.co/models?search=pegasus) are fine-tun ...@@ -102,6 +102,12 @@ All the [checkpoints](https://huggingface.co/models?search=pegasus) are fine-tun
... ) ... )
``` ```
## Documentation resources
- [Causal language modeling task guide](./tasks/language_modeling)
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## PegasusConfig ## PegasusConfig
[[autodoc]] PegasusConfig [[autodoc]] PegasusConfig
......
...@@ -28,6 +28,11 @@ Tips: ...@@ -28,6 +28,11 @@ Tips:
This model was contributed by [zphang](<https://huggingface.co/zphang). The original code can be found [here](https://github.com/google-research/pegasus). This model was contributed by [zphang](<https://huggingface.co/zphang). The original code can be found [here](https://github.com/google-research/pegasus).
## Documentation resources
- [Translation task guide](./tasks/translation)
- [Summarization task guide](./tasks/summarization)
## PegasusXConfig ## PegasusXConfig
[[autodoc]] PegasusXConfig [[autodoc]] PegasusXConfig
......
...@@ -90,6 +90,12 @@ audio classification, video classification, etc. ...@@ -90,6 +90,12 @@ audio classification, video classification, etc.
- Perceiver does **not** work with `torch.nn.DataParallel` due to a bug in PyTorch, see [issue #36035](https://github.com/pytorch/pytorch/issues/36035) - Perceiver does **not** work with `torch.nn.DataParallel` due to a bug in PyTorch, see [issue #36035](https://github.com/pytorch/pytorch/issues/36035)
## Documentation resources
- [Text classification task guide](./tasks/sequence_classification)
- [Masked language modeling task guide](./tasks/masked_language_modeling)
- [Image classification task guide](./tasks/image_classification)
## Perceiver specific outputs ## Perceiver specific outputs
[[autodoc]] models.perceiver.modeling_perceiver.PerceiverModelOutput [[autodoc]] models.perceiver.modeling_perceiver.PerceiverModelOutput
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment