autoevaluator
HF staff
Add verifyToken field to verify evaluation results are produced by Hugging Face's automatic model evaluator
1377381
metadata
language:
- en
license: mit
tags:
- summarization
- t5-large-summarization
- pipeline:summarization
model-index:
- name: sysresearch101/t5-large-finetuned-xsum"
results:
- task:
type: summarization
name: Summarization
dataset:
name: xsum
type: xsum
config: 3.0.0
split: train
metrics:
- type: rouge
value: <TODO>
name: ROUGE-1
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNmE1YjI2OWVjMGRiZWU3MjJhOTViMWIzNWU3MDNlZmFkMmNhZTFiN2RhOTc0ZjkyNzc5ZDg1YWZiZWFhMTEyZiIsInZlcnNpb24iOjF9.ye9137aCRynwSZM0YD2k4_LIcrRU4EyCRjBB8YQ0kUCImJyHNVFPFbbzObfLSM3XQ_tauALczriBCMJ7IGxeDQ
- type: rouge
value: <TODO>
name: ROUGE-2
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYWYzYzZlZTEwYThhYjJkYzE0MzA1ZjE2NDBiMDNjOTNlZWNjNmMxNDJiMDE4OTJhMjdhNGI3OWRiZjQ1M2RhOSIsInZlcnNpb24iOjF9.-6WOpeYKgyiQSvWIeCfJWWTzI8kt_Q5by31r-ceBF384NMf6APLA94jKpLdE2HDbDgUtuxF9LAHFz9jmhkqKCA
- type: rouge
value: <TODO>
name: ROUGE-L
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNDAxODg3ZjRlMmUwZTdjYmRmYTZhMzEwYTg4MmU4NmY2MmJlZTE5N2MxYjY4YmE4NGM0NDJkNDRiYjc2OTQwMSIsInZlcnNpb24iOjF9.iWTpIMKC2HGkJMYOQviXBnc-lj4pHLWVyfMXSfbz26s1KUi5gOD97eEaHeBmUW5IMs64dosTVa6xo3T-5_FdDA
- type: rouge
value: <TODO>
name: ROUGE-LSUM
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMGU2YzFiMDRkOTc2OTFjMGI1MzA3MTgwMzczMjhkMTMxNzkyNDVlZGUzMGM3OTk4ODk0YjQ4MzRjYTVlNmZmNiIsInZlcnNpb24iOjF9.K1duMlA1zQpSiencBbbhpShckuvEb8zspnJG5jf1n65KmNY4Md3VA96ERKixUOIymnTo-gKyS9QEDKblPmR_Ag
- type: loss
value: <TODO>
name: loss
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDQ4MDI4MzgyOWUwYzI0YTE3MTE2ODdhYjU3MGE1MTg1NTU4OTM4NzlmYjE1MDY5M2Q2OTVkZjY4MzRlZTYzOCIsInZlcnNpb24iOjF9.5BMk4fs-oVoDNJnPBpDlSkywd3Qogat4_N8_IdS26AObm2i1blwonx4sy8l8RK50pq16bJbplBEEG-3HuTz9DQ
- type: gen_len
value: <TODO>
name: gen_len
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOTE4ZTAzNmYxMzE2NGYzYTM2MzMxNTNlN2M4YmJlOWI3ZWFkMGRlMTc5NGMzNjBlZjg1MjJhZDdlNDIwZTAwNyIsInZlcnNpb24iOjF9._JTVMjukkupE4_QWOQZZZVwmnXSh-ppo7jlGdk0CUxNIIVTStxQhex09O1H6-Ilk9dtYk1PVCNNg8alZAFHeDQ
- task:
type: summarization
name: Summarization
dataset:
name: xsum
type: xsum
config: default
split: test
metrics:
- type: rouge
value: 26.8921
name: ROUGE-1
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZmFkMTFiNmM3YmRkZDk1Y2FhM2EwOTdiYmUwYjBhMGEzZmIyZmIwNWI5OTVmY2U0N2QzYzgxYzM0OTEzMjFjNSIsInZlcnNpb24iOjF9.fOq4zI_BWvTLFJFQOWNk3xEsDIu3aAeboGYPw5TiBqdJJjvdyKmLbfj2WVnNboWbrmp1PuL01iJjTi2Xj6PUAA
- type: rouge
value: 6.9411
name: ROUGE-2
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTBlZmI3NjQ3M2JiYzI4MTg3YmJkMjg0ZmE5MDUwNzljNTYyM2M0NzA3YTNiNTA2Nzk4MDhhYWZjZjgyMmE1MCIsInZlcnNpb24iOjF9.rH0DY2hMz2rXaK29vkt7xah-3G95rY4MOS2oVKjXmw4TijB-ZVytfLJAlBmyqA8HYAythRCywmLSjjCDWc66Cg
- type: rouge
value: 21.2832
name: ROUGE-L
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiODAwZDYzNTc0NjZhNzNiMDE2ZDY2NjNjNmViNTc0NDVjNTZkYjljODhmYmNiMWFhY2NkZjU5MzQ0NmM0OTcyMSIsInZlcnNpb24iOjF9.5duHtdjZ8dwtbp1HKyMR4mVK9IIlEZvuWGjQMErpE7VNyKPhMOT6Avh_vXFQz6q_jBzqpZGGREho1mt50yBsDw
- type: rouge
value: 21.284
name: ROUGE-LSUM
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMGQ2NmNhZTZmZDFkNTcyYjQ4MjhhYWJhODY1ZGRjODY2ZTE5MmRmZDRlYTk4NWE4YWM1OWY2M2NjOWQ3YzU0OCIsInZlcnNpb24iOjF9.SJ8xTcAVWrRDmJmQoxE1ADIcdGA4tr3V04Lv0ipMJiUksCdNC7FO8jYbjG9XmiqbDnnr5h4XoK4JB4-GsA-gDA
- type: loss
value: 2.5411810874938965
name: loss
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZGViNTVlNGI0Njk4NmZmZjExNDBkNTQ4N2FhMzRkZjRjNDNlYzFhZDIyMjJhMmFiM2ZhMTQzYTM4YzNkNWVlNyIsInZlcnNpb24iOjF9.p9n2Kf48k9F9Bkk9j7UKRayvVmOr7_LV80T0ti4lUWFtTsZ91Re841xnEAcKSYgQ9-Bni56ldq9js3kunspJCw
- type: gen_len
value: 18.7755
name: gen_len
verified: true
verifyToken: >-
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZmQ1ZWUxNmFjNmU0OGI4MDQyZDNjMWQwZGViNDhlMzE1OGE3YmYwYzZjYmM1NWEwMjk2MDFiMjQ4ZThhMjg5YyIsInZlcnNpb24iOjF9.aNp-NFzBSm84GnXuDtYuHaOsSk7zw8kjCphowYFciwt-aDnhwwurYIr59kMT8JNFMnRInsDi8tvYdapareV3DA
T5-large Summarization Model Trained on the XSUM Dataset
Finetuned T5 Large summarization model.
Finetuning Corpus
t5-large-finetuned-xsum
model is based on t5-large model
by huggingface, finetuned using XSUM datasets.
Load Finetuned Model
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, DataCollatorForSeq2Seq, Seq2SeqTrainingArguments, Seq2SeqTrainer
tokenizer = AutoTokenizer.from_pretrained("sysresearch101/t5-large-finetuned-xsum")
model = model = AutoModelForSeq2SeqLM.from_pretrained("sysresearch101/t5-large-finetuned-xsum")
ARTICLE_TO_SUMMARIZE = "..."
# generate summary
input_ids = tokenizer.encode(ARTICLE_TO_SUMMARIZE, return_tensors='pt')
summary_ids = model.generate(input_ids,
min_length=20,
max_length=80,
num_beams=10,
repetition_penalty=2.5,
length_penalty=1.0,
early_stopping=True,
no_repeat_ngram_size=2,
use_cache=True,
do_sample = True,
temperature = 0.8,
top_k = 50,
top_p = 0.95)
summary_text = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(summary_text)
Output: <TODO>
How to use via a pipeline
Here is how to use this model with the pipeline API:
from transformers import pipeline
summarizer = pipeline("summarization", model="sysresearch101/t5-large-finetuned-xsum")
ARTICLE = """ New York (CNN)When Liana Barrientos was 23 years old, she got married in Westchester County, New York.
A year later, she got married again in Westchester County, but to a different man and without divorcing her first husband.
Only 18 days after that marriage, she got hitched yet again. Then, Barrientos declared "I do" five more times, sometimes only within two weeks of each other.
In 2010, she married once more, this time in the Bronx. In an application for a marriage license, she stated it was her "first and only" marriage.
Barrientos, now 39, is facing two criminal counts of "offering a false instrument for filing in the first degree," referring to her false statements on the
2010 marriage license application, according to court documents.
Prosecutors said the marriages were part of an immigration scam.
On Friday, she pleaded not guilty at State Supreme Court in the Bronx, according to her attorney, Christopher Wright, who declined to comment further.
After leaving court, Barrientos was arrested and charged with theft of service and criminal trespass for allegedly sneaking into the New York subway through an emergency exit, said Detective
Annette Markowski, a police spokeswoman. In total, Barrientos has been married 10 times, with nine of her marriages occurring between 1999 and 2002.
All occurred either in Westchester County, Long Island, New Jersey or the Bronx. She is believed to still be married to four men, and at one time, she was married to eight men at once, prosecutors say.
Prosecutors said the immigration scam involved some of her husbands, who filed for permanent residence status shortly after the marriages.
Any divorces happened only after such filings were approved. It was unclear whether any of the men will be prosecuted.
The case was referred to the Bronx District Attorney\'s Office by Immigration and Customs Enforcement and the Department of Homeland Security\'s
Investigation Division. Seven of the men are from so-called "red-flagged" countries, including Egypt, Turkey, Georgia, Pakistan and Mali.
Her eighth husband, Rashid Rajput, was deported in 2006 to his native Pakistan after an investigation by the Joint Terrorism Task Force.
If convicted, Barrientos faces up to four years in prison. Her next court appearance is scheduled for May 18.
"""
print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
>>> [{'summary_text': 'Liana Barrientos, 39, is charged with two counts of "offering a false instrument for filing in the first degree" In total, she has been married 10 times, with nine of her marriages occurring between 1999 and 2002. She is believed to still be married to four men.'}]