Downloads · 30 days
50
0% of all-time downloads
pszemraj/bigbird-pegasus-large-K-booksum
bigbird-pegasus-large-K-booksum is a summarization model from pszemraj. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as apache-2.0.
this is the "latest" version of the model that has been trained the longest, currently at 70k steps
Downloads · 30 days
50
0% of all-time downloads
All-time downloads
13.1K
Public
Parameters
577M
18.9 GB on disk
Likes
6
Public
Click a slice to open those files.
.bin2.3 GB · 32%
From the Hugging Face model README
this is the "latest" version of the model that has been trained the longest, currently at 70k steps
google/bigbird-pegasus-large-bigpatentAn extended example, including a demo of batch summarization, is here.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from transformers import pipeline
model = AutoModelForSeq2SeqLM.from_pretrained(
"pszemraj/bigbird-pegasus-large-K-booksum",
low_cpu_mem_usage=True,
)
tokenizer = AutoTokenizer.from_pretrained(
"pszemraj/bigbird-pegasus-large-K-booksum",
)
summarizer = pipeline(
"summarization",
model=model,
tokenizer=tokenizer,
)
wall_of_text = "your text to be summarized goes here."
result = summarizer(
wall_of_text,
min_length=16,
max_length=256,
no_repeat_ngram_size=3,
clean_up_tokenization_spaces=True,
)
print(result[0]["summary_text"])