abisee/cnn_dailymail
Viewer • Updated • 936k • 146k • 343
How to use Shobhank-iiitdwd/BERT_summary 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="Shobhank-iiitdwd/BERT_summary") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Shobhank-iiitdwd/BERT_summary")
model = AutoModelForSeq2SeqLM.from_pretrained("Shobhank-iiitdwd/BERT_summary")Bert2Bert Summarization with 🤗EncoderDecoder Framework This model is a warm-started BERT2BERT model fine-tuned on the CNN/Dailymail summarization dataset.
The model achieves a 18.22 ROUGE-2 score on CNN/Dailymail's test dataset.