abisee/cnn_dailymail
Viewer • Updated • 936k • 74.1k • 361
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") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Shobhank-iiitdwd/BERT_summary")
model = AutoModelForSeq2SeqLM.from_pretrained("Shobhank-iiitdwd/BERT_summary", device_map="auto")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.