SAVRN
Search Contact SAVRN

Open-weight model · Summarization

bigbird-pegasus-large-pubmed

by Google google/bigbird-pegasus-large-pubmed

BigBird, is a sparse-attention based transformer which extends Transformer based models, such as BERT to much longer sequences.

Parameters
Context4,096
Weights2.3 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads3k

Model Card

By Google, published under apache-2.0, revision b33e0e2823c2.

BigBird, is a sparse-attention based transformer which extends Transformer based models, such as BERT to much longer sequences. Moreover, BigBird comes along with a theoretical understanding of the capabilities of a complete transformer that the sparse model can handle. BigBird was introduced in this paper and first released in this repository. Disclaimer: The team releasing BigBird did not write a model card for this model so this model card has been written by the Hugging Face team. BigBird relies on block sparse attention instead of normal attention (i.e. BERT's attention) and can handle sequences up to a length of 4096 at a much lower compute cost compared to BERT. It has achieved SOTA…

Read Google's full model card

BigBirdPegasus model (large)

BigBird, is a sparse-attention based transformer which extends Transformer based models, such as BERT to much longer sequences. Moreover, BigBird comes along with a theoretical understanding of the capabilities of a complete transformer that the sparse model can handle.

BigBird was introduced in this paper and first released in this repository.

Disclaimer: The team releasing BigBird did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

BigBird relies on block sparse attention instead of normal attention (i.e. BERT's attention) and can handle sequences up to a length of 4096 at a much lower compute cost compared to BERT. It has achieved SOTA on various tasks involving very long sequences such as long documents summarization, question-answering with long contexts.

How to use

Here is how to use this model to get the features of a given text in PyTorch:

from transformers import BigBirdPegasusForConditionalGeneration, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("google/bigbird-pegasus-large-pubmed")

# by default encoder-attention is `block_sparse` with num_random_blocks=3, block_size=64
model = BigBirdPegasusForConditionalGeneration.from_pretrained("google/bigbird-pegasus-large-pubmed")

# decoder attention type can't be changed & will be "original_full"
# you can change `attention_type` (encoder only) to full attention like this:
model = BigBirdPegasusForConditionalGeneration.from_pretrained("google/bigbird-pegasus-large-pubmed", attention_type="original_full")

# you can change `block_size` & `num_random_blocks` like this:
model = BigBirdPegasusForConditionalGeneration.from_pretrained("google/bigbird-pegasus-large-pubmed", block_size=16, num_random_blocks=2)

text = "Replace me by any text you'd like."
inputs = tokenizer(text, return_tensors='pt')
prediction = model.generate(**inputs)
prediction = tokenizer.batch_decode(prediction)

Training Procedure

This checkpoint is obtained after fine-tuning BigBirdPegasusForConditionalGeneration for summarization on pubmed dataset from scientific_papers.

BibTeX entry and citation info

@misc{zaheer2021big,
      title={Big Bird: Transformers for Longer Sequences}, 
      author={Manzil Zaheer and Guru Guruganesh and Avinava Dubey and Joshua Ainslie and Chris Alberti and Santiago Ontanon and Philip Pham and Anirudh Ravula and Qifan Wang and Li Yang and Amr Ahmed},
      year={2021},
      eprint={2007.14062},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Configuration

Architecture
BigBirdPegasusForConditionalGeneration
Context length (tokens)
4,096
Layers
16
Vocabulary size
96,103
Model type
bigbird_pegasus

Identity and Version

Repository
google/bigbird-pegasus-large-pubmed
Publisher
Google
Task
Summarization
Modality
Text
Library
transformers
Parameters
Not stated by the source
Languages
en
Revision
b33e0e2823c2195c87d877373285d3e9efb2e3f4
First published
2022-03-02
Last updated
2023-01-24

Files and Weights

9 files, 2.3 GB in total. The weights are 1 file totalling 2.3 GB in bin.

Weights1 file · 2.3 GB
Configuration3 files · 2.1 KB
Tokenizer3 files · 5.4 MB
Documentation1 file · 4.4 KB
Repository1 file · 690 B
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights2.3 GB 52f2ed579040
config.jsonConfiguration1.1 KB
generation_config.jsonConfiguration232 B
special_tokens_map.jsonConfiguration775 B
README.mdDocumentation4.4 KB
.gitattributesRepository690 B
spiece.modelTokenizer1.9 MB fe1b40df7e88
tokenizer.jsonTokenizer3.5 MB
tokenizer_config.jsonTokenizer1.2 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
2.3 GB
Download from Google

Released by Google through its official repository on Hugging Face. Read the license.

Built From

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
scientific_papers Configuration pubmedTask SummarizationMetric ROUGE-1Comparison conditions not established 40.3815 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric ROUGE-2Comparison conditions not established 14.374 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric ROUGE-LComparison conditions not established 23.4773 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric ROUGE-LSUMComparison conditions not established 33.772 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric gen_lenComparison conditions not established 186.2 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric lossComparison conditions not established 3.23505 google
Publisher reported
Evaluated revision not stated
scientific_papers Configuration pubmedTask SummarizationMetric meteorComparison conditions not established 0.3513 google
Publisher reported
Evaluated revision not stated

Memory Requirements

PrecisionWeights in memory
As published2.3 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About bigbird-pegasus-large-pubmed

Can I use bigbird-pegasus-large-pubmed commercially?

Yes. bigbird-pegasus-large-pubmed is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is bigbird-pegasus-large-pubmed's context length?

4,096 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Summarization

distilbart-cnn-12-6

Sam Shleifer

This checkpoint should be loaded into BartForConditionalGeneration.frompretrained. See the BART docs for more information.

Open weights apache-2.0 1,024 tokens transformers

Model · Summarization

pegasus-xsum

Google

Original TF 1 code here Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019 The following is copied from the authors' README. We train a pegasus model with sampled gap sentence ratios on both C4 and HugeNews, and stochastically sample important sentences. The updated the results are reported in this table. The "Mixed & Stochastic" model has the following changes: - trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). - trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). - the model uniformly sample a gap sentence ratio between 15% and 45%. - importance sentences are sampled using a…

Open weights 512 tokens transformers

Model · Summarization

distilbart-xsum-12-6

Sam Shleifer

This checkpoint should be loaded into BartForConditionalGeneration.frompretrained. See the BART docs for more information.

Open weights apache-2.0 1,024 tokens transformers

This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. For finetuning details and scripts, see the paper and the official repository. Scores on the XL-Sum test sets are as follows: Language | ROUGE-1 / ROUGE-2 / ROUGE-L Amharic | 20.0485 / 7.4111 / 18.0753 Arabic | 34.9107 / 14.7937 / 29.1623 Azerbaijani | 21.4227 / 9.5214 / 19.3331 Bengali | 29.5653 / 12.1095 / 25.1315 Burmese | 15.9626 / 5.1477 / 14.1819 Chinese (Simplified) | 39.4071 / 17.7913 / 33.406 Chinese (Traditional) | 37.1866 / 17.1432 / 31.6184 English | 37.601 / 15.1536 / 29.8817 French | 35.3398 / 16.1739 / 28.2041 Gujarati | 21.9619 / 7.7417 / 19.86 Hausa | 39.4375 / 17.6786 / 31.6667…

Open weights transformers