Creating summaries of fixed length with PEGASUS model
Hi all,I am using a Pegasus model (google/pegasus-multi_news) to generate summaries from new articles and trying to get short summaries (20-50 words).model_name = 'google/pegasus-multi_news'
model = PegasusForConditionalGeneration.from_pretrained(model_name)
model.generate(**batch, **kwargs)I tried adjusting themax_length,length_penalty,early_stoppingarguments but they don’t change the output for me.max_new_tokensdoes give me a shorter output but it is essentially truncated text so not that useful.Is there a way to force/strongly guide the model to generate a summary of roughly the desired length?
2022-07-13T13:12:23Z
I’m afraid there’s no way to do this in Pegasus, or any abstractive summarisation model.