# GPT2 summarization performance

**URL:** <https://discuss.huggingface.co/t/gpt2-summarization-performance/11218>\
**Category:** 🤗Transformers\
**Created:** [October 30, 2021, 5:03pm UTC](https://discuss.huggingface.co/t/gpt2-summarization-performance/11218 "2021-10-30T17:03:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpraveenk](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bpraveenk](https://discuss.huggingface.co/u/bpraveenk)\
**Post date:** [October 30, 2021, 5:03pm UTC](https://discuss.huggingface.co/t/gpt2-summarization-performance/11218/1 "2021-10-30T17:03:07Z")

</div>

Has anyone run benchmark studies to evaluate the generation/summarization performance of GPT2 on datasets such as “xsum” ? If so could you share the performance numbers (in-terms of ROUGE scores) you got? I search for these results online, but couldn’t find any.

---

<div class="post-metadata">

**Author:** ![Kirili4ik](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kirili4ik/32/2911_2.png) [@Kirili4ik](https://discuss.huggingface.co/u/Kirili4ik)\
**Post date:** [October 31, 2021, 11:16am UTC](https://discuss.huggingface.co/t/gpt2-summarization-performance/11218/2 "2021-10-31T11:16:50Z")

</div>

Hi,

I can suggest starting looking here:

> **[Papers with Code - XSum Dataset](https://paperswithcode.com/dataset/xsum)**
>
> The Extreme Summarization (XSum) dataset is a dataset for evaluation of abstractive single-document summarization systems. The goal is to create a short, one-sentence new summary answering the question “What is the article about?”. The dataset...

I haven’t found neither to be honest. But!

As I believe it seems smarter to use encoder-decoder style models (like PEGASUS or BART) for summarization. Decoder-only language models like GPT were not only trained to continue texts (unlike ~BART), but also they don’t extract the idea of the given texts. Though encoder can be interpreted as an “idea extractor” and the decoder as the generator for natural language text.

P.S. I know one paper that tries to prove the point on summarizing using GPT3 is better than using BART. Even though it heavily relies on Russian language in experiments - you can use the references in the paper to look deeper and find what you are looking for. Paper arxiv link:

> **[Fine-tuning GPT-3 for Russian Text Summarization](https://arxiv.org/abs/2108.03502)**
>
> Automatic summarization techniques aim to shorten and generalize information
> given in the text while preserving its core message and the most relevant
> ideas. This task can be approached and treated with a variety of methods,
> however, not many...

Good luck and let me know if you find anything,  
Kirill

---

<div class="post-metadata">

**Author:** ![bpraveenk](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bpraveenk](https://discuss.huggingface.co/u/bpraveenk)\
**Post date:** [November 1, 2021, 8:26pm UTC](https://discuss.huggingface.co/t/gpt2-summarization-performance/11218/3 "2021-11-01T20:26:25Z")

</div>

Thank you Kirill, for sharing the pointers. I agree with you that BART and PEGASUS are better for text summarization, over decoder only models. However, I was curious if some one had experimented with GPT2 variants for text generation. I found some sample implementations online, but no metrics on the performance evaluation on standard datasets. I feel it is also not straightforward to run inference (e.g., summaries) for text generation using GPT2. Some caveats such as penalizing long summaries, using special tokens to use a decoder only model for training & inference and not-immediately-obvious decoding strategies make inference tricky IMO. I ran a few tests and found the performance to be way below-par, contrary to some claims made in papers about the obviousness of achieving performance improvement on supervised tasks using GPT2 style models, esp., for text generation. Nevertheless, I will keep looking and update this thread if I find any relevant articles or if I find a robust way of doing summary generation using GPT2.

---

<div class="post-metadata">

**Author:** ![amka66](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@amka66](https://discuss.huggingface.co/u/amka66)\
**Post date:** [July 17, 2022, 8:46am UTC](https://discuss.huggingface.co/t/gpt2-summarization-performance/11218/4 "2022-07-17T08:46:53Z")

</div>

Any updates on that?

Do we need to conclude that decoder-only models are not suited for text summarization?

And how does it apply to GPT-3 – the latter seems to summarize quite well – do we expect a 175B parameter seq2seq model to perform considerably better?
