# Default models for pipeline tasks

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%3E%5C
**Category:** 🤗Transformers\
**Created:** [December 4, 2020, 5:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559 "2020-12-04T17:55:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buckeyes2019](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Buckeyes2019](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuckeyes2019)%5C
**Post date:** [December 4, 2020, 5:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F1 "2020-12-04T17:55:45Z")

</div>

What are the default models used for the various pipeline tasks? I assume the “SummarizationPipeline” uses Bart-large-cnn or some variant of T5, but what about the other tasks?

|ConversationalPipeline|?|  
|FeatureExtractionPipeline|?|  
|FillMaskPipeline|?|  
|QuestionAnsweringPipeline|?|  
|SummarizationPipeline|BART or T5 (?)|  
|TextClassificationPipeline|?|  
|TextGenerationPipeline|?|  
|TokenClassificationPipeline|?|  
|TranslationPipeline|?|  
|ZeroShotClassificationPipeline|?|  
|Text2TextGenerationPipeline|?|

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [December 4, 2020, 6:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F2 "2020-12-04T18:12:57Z")

</div>

You can find all the defaults here:

> <https://github.com/huggingface/transformers/blob/71688a8889c4df7dd6d90a65d895ccf4e33a1a56/src/transformers/pipelines.py#L2716-L2804>

---

<div class="post-metadata">

**Author:** ![meshalawy](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@meshalawy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmeshalawy)%5C
**Post date:** [December 27, 2023, 2:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F3 "2023-12-27T14:31:38Z")

</div>

Thanks. @BramVanroy  
Any idea on what basis these defaults were chosen for each task?

---

<div class="post-metadata">

**Author:** ![MarkusEicher](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/markuseicher/32/52883_2.png) [@MarkusEicher](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMarkusEicher)%5C
**Post date:** [August 23, 2025, 8:43pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F4 "2025-08-23T20:43:45Z")

</div>

Hi Bram. Many thanks for pointing to the repo. I already learned yesterday about sentiment-analysis being an “alias” to the text-analysis pipeline. I am interested in the same question as the original poster was. Finding out what the default models for the various tasks I can use with the pipeline library. If you use CTRL-SPACE in VSCode to get autocompletion for the pipeline item, you get about 30 different options you can use with the pipeline. Things like “audio-classification”, “depht-estimation”, “image-to-text”, visual question.-answering and many more. I added screenshots about all the options I get from this. I tried to find them in the transformers/pipeline.py file but I missed. Where could I find the corresponding default models used for these tasks? Not truly urgent but I am building a GUI for handling pipeline tasks and I would like to download the correct models upfront for offline use. Many thanks for any hints.

 ![Screenshot 2025-08-23 222653](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/d/1dfb20a6e8e608cec0f47a70ffdc6f5e920b0d1c.png)

 ![Screenshot 2025-08-23 222529](https://us1.discourse-cdn.com/hellohellohello/original/3X/f/0/f0fd547c1194378d2cbbb234a2229cdbfa128295.png)

 ![Screenshot 2025-08-23 222436](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/1/11c5fe4462a857c785f6d5f7263787d07ac8ccf9.png)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [August 24, 2025, 12:03am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F5 "2025-08-24T00:03:52Z")

</div>

I feel like [this is hard-coded](https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/ __init__.py#L160)…

---

<div class="post-metadata">

**Author:** ![dkleine](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dkleine/32/33964_2.png) [@dkleine](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdkleine)%5C
**Post date:** [August 24, 2025, 12:10am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F6 "2025-08-24T00:10:12Z")

</div>

Yes, exactly. There is no `pipelines.py` file anymore, the relevant code has been moved to ` __init__.py`. The pre-configs are all stored in the `SUPPORTED_TASKS` variable, as already explained here:

> [@Text-Classification Pipeline - Newbie question](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-classification-pipeline-newbie-question%2F167640%2F2)%3A
>
> Hi Markus, “sentiment-analysis” is the task specifying what you want a large language model to perform on the text. Sentiment analysis practically changes the model’s head to a classifier, which you can see here: This pipeline is pre-configured, the settings can be found below in the same file defined here:

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [August 24, 2025, 12:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F7 "2025-08-24T00:17:34Z")

</div>

Code snippet to get a dict of default models.

```py
from transformers.pipelines import SUPPORTED_TASKS
def_models = {k: v["default"]["model"]["pt"][0] for k, v in SUPPORTED_TASKS.items() if "model" in v["default"].keys()}
print(def_models)
# {'audio-classification': 'superb/wav2vec2-base-superb-ks', 'automatic-speech-recognition': 'facebook/wav2vec2-base-960h', 'text-to-audio': 'suno/bark-small',
# 'feature-extraction': 'distilbert/distilbert-base-cased', 'text-classification': 'distilbert/distilbert-base-uncased-finetuned-sst-2-english',
# 'token-classification': 'dbmdz/bert-large-cased-finetuned-conll03-english', 'question-answering': 'distilbert/distilbert-base-cased-distilled-squad',
# 'table-question-answering': 'google/tapas-base-finetuned-wtq', 'visual-question-answering': 'dandelin/vilt-b32-finetuned-vqa',
# 'document-question-answering': 'impira/layoutlm-document-qa', 'fill-mask': 'distilbert/distilroberta-base', 'summarization': 'sshleifer/distilbart-cnn-12-6',
# 'text2text-generation': 'google-t5/t5-base', 'text-generation': 'openai-community/gpt2', 'zero-shot-classification': 'facebook/bart-large-mnli',
# 'zero-shot-image-classification': 'openai/clip-vit-base-patch32', 'zero-shot-audio-classification': 'laion/clap-htsat-fused',
# 'image-classification': 'google/vit-base-patch16-224', 'image-feature-extraction': 'google/vit-base-patch16-224',
# 'image-segmentation': 'facebook/detr-resnet-50-panoptic', 'image-to-text': 'ydshieh/vit-gpt2-coco-en',
# 'object-detection': 'facebook/detr-resnet-50', 'zero-shot-object-detection': 'google/owlvit-base-patch32',
# 'depth-estimation': 'Intel/dpt-large', 'video-classification': 'MCG-NJU/videomae-base-finetuned-kinetics', 'mask-generation': 'facebook/sam-vit-huge', 'image-to-image': 'caidas/swin2SR-classical-sr-x2-64'} 

```

---

<div class="post-metadata">

**Author:** ![MarkusEicher](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/markuseicher/32/52883_2.png) [@MarkusEicher](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMarkusEicher)%5C
**Post date:** [August 24, 2025, 9:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F8 "2025-08-24T21:40:54Z")

</div>

Many thanks for your patience, sir. I missed that the other “aliases” could be in the same file you told me about when I asked about “sentiment-analysis”. Should have come to my mind by myself to check this. Thanks.

---

<div class="post-metadata">

**Author:** ![MarkusEicher](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/markuseicher/32/52883_2.png) [@MarkusEicher](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMarkusEicher)%5C
**Post date:** [August 24, 2025, 9:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefault-models-for-pipeline-tasks%2F2559%2F9 "2025-08-24T21:41:35Z")

</div>

Grate idea, thank you very much.
