# Seq2Seq model for distilgpt2

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fseq2seq-model-for-distilgpt2%2F20274%3E%5C
**Category:** Beginners\
**Created:** [July 12, 2022, 1:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fseq2seq-model-for-distilgpt2%2F20274 "2022-07-12T13:46:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfedrau](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@mfedrau](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmfedrau)%5C
**Post date:** [July 12, 2022, 1:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fseq2seq-model-for-distilgpt2%2F20274%2F1 "2022-07-12T13:46:47Z")

</div>

Hello everybody,

I want to do a summarization task (like here [Summarization](https://huggingface.co/docs/transformers/tasks/summarization)), but I want to use “distilgpt2” instead of “t5-small”. When replacing “t5-small” with “distilgpt2”, I get the following error:

ValueError: Unrecognized configuration class \<class ‘transformers.models.gpt2.configuration\_gpt2.GPT2Config’\> for this kind of AutoModel: AutoModelForSeq2SeqLM.  
Model type should be one of BartConfig, BigBirdPegasusConfig, BlenderbotConfig, BlenderbotSmallConfig, EncoderDecoderConfig, FSMTConfig, LEDConfig, LongT5Config, M2M100Config, MarianConfig, MBartConfig, MT5Config, PegasusConfig, PLBartConfig, ProphetNetConfig, T5Config, XLMProphetNetConfig.

My interpretation is, that there is no model for “distilgpt2” for seq2seq tasks. Is that the case or did I miss something?

Assuming there is no model I can use, do I have to do something like this:

> **[Generating Text Summaries Using GPT-2 on PyTorch | Paperspace Blog](https://blog.paperspace.com/generating-text-summaries-gpt-2/)**
>
> In this article I will discuss an efficient abstractive text summarization approach using GPT-2 on PyTorch with the CNN/Daily Mail dataset.

Or is there an easier way to do it?

Thanks in advance
