--- license: cc-by-nc-4.0 datasets: - zaemyung/IteraTeR_plus language: - en pipeline_tag: text2text-generation --- # DElIteraTeR-PEGASUS-Multi-Sent-Revision-Generator This model was obtained by fine-tuning [google/pegasus-large](https://huggingface.co/google/pegasus-large) on [IteraTeR+](https://huggingface.co/datasets/zaemyung/IteraTeR_plus) `multi_sent` dataset. Paper: [Improving Iterative Text Revision by Learning Where to Edit from Other Revision Tasks](https://aclanthology.org/2022.emnlp-main.678/)
Authors: Zae Myung Kim, Wanyu Du, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang ## Usage ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("zaemyung/DElIteraTeR-PEGASUS-Multi-Sent-Revision-Generator") model = AutoModelForSeq2SeqLM.from_pretrained("zaemyung/DElIteraTeR-PEGASUS-Multi-Sent-Revision-Generator") before_inputs = [ "These were known as temple rings . They were worn on the head, near the temples of a woman or a girl.", "Andrew Hendy, Hereditary Chief of the Miskitu Nation. Proclaimed by the Nicaraguans on the death of his cousin George V, who died on 8th November 1888. He was repudiated by many people of the Miskitu Nation and abdicated in favour of his cousin Jonathan I, on 8th March 1889. He retired to Nicaraguan territory where he became a Miskitu Jefe Inspector and River Magistrate." ] model_inputs = tokenizer(before_inputs, return_tensors='pt', padding=True) model_outputs = model.generate(**model_inputs, num_beams=8, max_length=1024) after_texts = tokenizer.batch_decode(model_outputs, skip_special_tokens=True) print(after_texts) # 'These were known as temple rings because they were worn on the head, near the temples of a woman or a girl.', # 'Andrew Hendy, Hereditary Chief of the Miskitu Nation. He was proclaimed by the Nicaraguans on the death of his cousin George V, who died on 8th November 1888. He was repudiated by many people of the Miskitu Nation and abdicated in favour of his cousin Jonathan I, on 8th March 1889. He retired to Nicaraguan territory where he became a Miskitu Jefe Inspector and River Magistrate.'] ```