Views
No views yet
xsumbart-base model only fine-tuned on a small part of xsum dataset. Due to lack of resources, using a P100 GPU, we trained it with different stages and data. The progress is described as below. You can train this model on more data before use it.ROUGE-2 score of 21.28, which is the highest reported score on this dataset as of September 2021. The previous state-of-the-art model, google/PEGASUS, achieved a ROUGE-2 score of 21.00. BART also achieved state-of-the-art results on several other metrics such as ROUGE-1 and ROUGE-L.ROUGE-2 score of 22.27, which is the highest reported score on this dataset as of September 2021. The previous state-of-the-art model, T5, achieved a ROUGE-2 score of 22.06. BART also achieved state-of-the-art results on several other metrics such as ROUGE-1 and ROUGE-L.1{
2 'eval_rouge1': 44.16,
3 'eval_rouge2': 21.28,
4 'eval_rougeL': 40.90
5}1{
2 'eval_rouge1': 45.14,
3 'eval_rouge2': 22.27,
4 'eval_rougeL': 37.25
5}1{
2 'eval_loss': 3.34855318069458,
3 'eval_rouge1': 35.1931,
4 'eval_rouge2': 13.7162,
5 'eval_rougeL': 28.4343,
6 'eval_rougeLsum': 28.4329,
7 'eval_gen_len': 19.58,
8 'eval_runtime': 111.2625,
9 'eval_samples_per_second': 8.988,
10 'eval_steps_per_second': 2.247,
11 'epoch': 3.0
12}1{
2 'eval_loss': 3.2764062881469727,
3 'eval_rouge1': 36.4663,
4 'eval_rouge2': 15.1419,
5 'eval_rougeL': 30.0491,
6 'eval_rougeLsum': 30.0254,
7 'eval_gen_len': 19.619,
8 'eval_runtime': 217.6418,
9 'eval_samples_per_second': 9.189,
10 'eval_steps_per_second': 2.297,
11 'epoch': 5.0
12}1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2from transformers import pipeline
3
4checkpoint = 'harouzie/bart-base-xsum'
5tokenizer = AutoTokenizer.from_pretrained(checkpoint)
6model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
7
8# this bit of news link was cited from CNN: https://edition.cnn.com/2023/03/18/americas/ecuador-earthquake
9news = """
10At least 13 people died after a magnitude 6.8 earthquake struck southern Ecuador on Saturday afternoon, according to government officials.
11
12The earthquake struck near the southern town of Baláo and was more than 65 km (nearly 41 miles) deep, according to the United States Geological Survey.
13
14An estimated 461 people were injured in the quake, according to a report from the Ecuadorian president’s office. The government had previously reported that 16 people were killed but later revised the death toll.
15
16In the province of El Oro, at least 11 people died. At least one other death was reported in the province of Azuay, according to the communications department for Ecuador’s president. In an earlier statement, authorities said the person in Azuay was killed when a wall collapsed onto a car and that at least three of the victims in El Oro died when a security camera tower came down.
17"""
18
19summarizer = pipeline(task="summarization", model=model, tokenizer=tokenizer)
20
21summarizer(news)>>>[{'summary_text': 'At least 13 people have been killed and more than 500 injured in an earthquake in Ecuador, officials say.'}]