HF-version model for PRIMERA: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization (ACL 2022).
The original code can be found here. You can find the script and notebook to train/evaluate the model in the original github repo.
- Note: due to the difference between the implementations of the original Longformer and the Huggingface LED model, the results of converted models are slightly different. We run a sanity check on both fine-tuned and non fine-tuned models on the MultiNews dataset, and show the results below:
You can use it by
from transformers import ( AutoTokenizer, LEDConfig, LEDForConditionalGeneration, ) tokenizer = AutoTokenizer.from_pretrained('allenai/PRIMERA') config=LEDConfig.from_pretrained('allenai/PRIMERA') model = LEDForConditionalGeneration.from_pretrained('allenai/PRIMERA')
- Downloads last month