Summarization
Transformers
PyTorch
English
bigbird_pegasus
text2text-generation
Eval Results (legacy)
Instructions to use google/bigbird-pegasus-large-pubmed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/bigbird-pegasus-large-pubmed with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="google/bigbird-pegasus-large-pubmed")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("google/bigbird-pegasus-large-pubmed") model = AutoModelForSeq2SeqLM.from_pretrained("google/bigbird-pegasus-large-pubmed") - Notebooks
- Google Colab
- Kaggle
the gradient_checkpointing option is always False in BigBirdPegasusEncoder, BigBirdPegasusDecoder class
#9
by hseom - opened
Thanks for this great work!
I found this: in BigBirdPegasusEncoder, BigBirdPegasusDecoder class, the gradient_checkpointing option is always False so the GPU memory is accumlated.
please make it optional again :)
# modling_bigbird_pegasus.py, line 1768~
# BigBridPegasusEncoder class
...
...
self.layers = nn.ModuleList([BigBirdPegasusEncoderLayer(config, seed=i) for i in range(config.encoder_layers)])
self.layernorm_embedding = nn.LayerNorm(embed_dim)
self.gradient_checkpointing = False