EdinburghNLP/xsum
Viewer • Updated • 227k • 33.9k • 145
How to use praf-choub/bart-CaPE-xsum 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="praf-choub/bart-CaPE-xsum") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("praf-choub/bart-CaPE-xsum")
model = AutoModelForSeq2SeqLM.from_pretrained("praf-choub/bart-CaPE-xsum")Citation
@misc{https://doi.org/10.48550/arxiv.2110.07166,
doi = {10.48550/ARXIV.2110.07166},
url = {https://arxiv.org/abs/2110.07166},
author = {Choubey, Prafulla Kumar and Fabbri, Alexander R. and Vig, Jesse and Wu, Chien-Sheng and Liu, Wenhao and Rajani, Nazneen Fatema},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {CaPE: Contrastive Parameter Ensembling for Reducing Hallucination in Abstractive Summarization},
publisher = {arXiv},
year = {2021},
copyright = {Creative Commons Attribution 4.0 International}
}