Text summarization task #1079
-
If I want to do text summarization with GPT-2 model using keras_nlp, how do I do it? is there any API available for text summarization? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@ramkumarkoppu yes, you can do this with any There is no special API needed: the general practice is to put a |
Beta Was this translation helpful? Give feedback.
-
Just adding to @jbischof's answer here: if you are looking for summarisation, you can alternatively use BART, an encoder-decoder model (instead of GPT-2). We do have a BART preset available for summarisation (finetuned on the CNN+Daily Mail dataset). You can use it like this:
Not sure what the quality of the summaries will be, depends on your dataset, and whether it lies in the same domain as CNN+DM. If the generated summaries aren't good, you can always finetune the model. |
Beta Was this translation helpful? Give feedback.
-
Yeah +1 to @abheesht17 answer, using the Beyond that, there's a lot of other options you could consider...
|
Beta Was this translation helpful? Give feedback.
Just adding to @jbischof's answer here: if you are looking for summarisation, you can alternatively use BART, an encoder-decoder model (instead of GPT-2). We do have a BART preset available for summarisation (finetuned on the CNN+Daily Mail dataset). You can use it like this:
Not sure what the quality of the summaries will be, depends on your dataset, and whether it lies in the same domain as CNN+DM. If the generated summaries aren't good, you can always finetune the model.