# Help Improving Abstractive Summarization

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhelp-improving-abstractive-summarization%2F6225%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 18, 2021, 11:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhelp-improving-abstractive-summarization%2F6225 "2021-05-18T11:05:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haithembrr](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@haithembrr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhaithembrr)%5C
**Post date:** [May 18, 2021, 11:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhelp-improving-abstractive-summarization%2F6225%2F1 "2021-05-18T11:05:18Z")

</div>

Hey everyone,

Hope you’re doing great!  
I’m a beginner when it comes to using `transformers`.  
I’ve been working on book summarization project for a while, the idea is to split the book into chapters then the chapter into chunks and summarize the chunks separately.  
I’ve tried several models and the summaries provided aren’t that good. Some of the problems are:

- Some sentences aren’t fully generated.
- The context is lost most of the time.

Do you guys have any suggestions please?  
Also, I have found these two papers:

1. [Mind The Facts: Knowledge-Boosted Coherent Abstractive Text Summarization](https://arxiv.org/abs/2006.15435)
2. [Enhancing Factual Consistency of Abstractive Summarization](https://arxiv.org/abs/2003.08612)

But I couldn’t find any code implementation of these models. If you have any implementations please let me know.

Thank you for your time!  
Have a good day.

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [May 18, 2021, 1:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhelp-improving-abstractive-summarization%2F6225%2F2 "2021-05-18T13:02:19Z")

</div>

hey @haithembrr, your approach sounds very sensible 🙂

have you tried playing around with the parameters of the model’s `generate` function, e.g. `max_len` and trying different strategies like beam search vs sampling (see [docs](https://huggingface.co/transformers/main_classes/model.html?highlight=generate#transformers.generation_utils.GenerationMixin.generate))?

alternatively, you could have a look at the discussion in this thread to see if someone has also run into the same problem: [Summarization on long documents](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsummarization-on-long-documents%2F920)

---

<div class="post-metadata">

**Author:** ![haithembrr](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@haithembrr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhaithembrr)%5C
**Post date:** [May 19, 2021, 9:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhelp-improving-abstractive-summarization%2F6225%2F3 "2021-05-19T09:07:16Z")

</div>

Thank you so much for your feedback @lewtun ! I highly appreciate it.  
Actually I didn’t experiment with generation function parameters! I’ll make sure to do so and will get back to you as soon as have some results! 😄
