Update README.md
Browse files
README.md
CHANGED
@@ -20,7 +20,27 @@ Fine-tuned on a synthetic dataset of curated long-context text and `GPT-3.5-turb
|
|
20 |
|
21 |
Try it in [gradio demo](https://huggingface.co/spaces/pszemraj/document-summarization) | [.md with example outputs](evals-outputs/GAUNTLET.md) (gauntlet)
|
22 |
|
23 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
This model is a fine-tuned version of [pszemraj/pegasus-x-large-book-summary](https://huggingface.co/pszemraj/pegasus-x-large-book-summary) on the None dataset.
|
26 |
It achieves the following results on the evaluation set:
|
|
|
20 |
|
21 |
Try it in [gradio demo](https://huggingface.co/spaces/pszemraj/document-summarization) | [.md with example outputs](evals-outputs/GAUNTLET.md) (gauntlet)
|
22 |
|
23 |
+
## Usage
|
24 |
+
|
25 |
+
It's recommended to use this model with [beam search decoding](https://huggingface.co/docs/transformers/generation_strategies#beamsearch-decoding). If interested, you can also use the `textsum` [util repo](https://github.com/pszemraj/textsum) to have most of this abstracted out for you:
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
```bash
|
30 |
+
pip install -U textsum
|
31 |
+
```
|
32 |
+
|
33 |
+
```python
|
34 |
+
from textsum.summarize import Summarizer
|
35 |
+
|
36 |
+
model_name = "pszemraj/pegasus-x-large-book_synthsumm"
|
37 |
+
summarizer = Summarizer(model_name) # GPU auto-detected
|
38 |
+
text = "put the text you don't want to read here"
|
39 |
+
summary = summarizer.summarize_string(text)
|
40 |
+
print(summary)
|
41 |
+
```
|
42 |
+
|
43 |
+
## Details
|
44 |
|
45 |
This model is a fine-tuned version of [pszemraj/pegasus-x-large-book-summary](https://huggingface.co/pszemraj/pegasus-x-large-book-summary) on the None dataset.
|
46 |
It achieves the following results on the evaluation set:
|