shauryakudiyal commited on
Commit
766154d
1 Parent(s): 26f40a2

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +117 -0
  2. gitattributes.txt +9 -0
  3. merges.txt +0 -0
  4. tokenizer.json +0 -0
  5. vocab.json +0 -0
README.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - summarization
6
+ license: mit
7
+ thumbnail: https://huggingface.co/front/thumbnails/facebook.png
8
+ datasets:
9
+ - cnn_dailymail
10
+ model-index:
11
+ - name: facebook/bart-large-cnn
12
+ results:
13
+ - task:
14
+ type: summarization
15
+ name: Summarization
16
+ dataset:
17
+ name: cnn_dailymail
18
+ type: cnn_dailymail
19
+ config: 3.0.0
20
+ split: train
21
+ metrics:
22
+ - name: ROUGE-1
23
+ type: rouge
24
+ value: 42.9486
25
+ verified: true
26
+ - name: ROUGE-2
27
+ type: rouge
28
+ value: 20.8149
29
+ verified: true
30
+ - name: ROUGE-L
31
+ type: rouge
32
+ value: 30.6186
33
+ verified: true
34
+ - name: ROUGE-LSUM
35
+ type: rouge
36
+ value: 40.0376
37
+ verified: true
38
+ - name: loss
39
+ type: loss
40
+ value: 2.529000997543335
41
+ verified: true
42
+ - name: gen_len
43
+ type: gen_len
44
+ value: 78.5866
45
+ verified: true
46
+ ---
47
+ # BART (large-sized model), fine-tuned on CNN Daily Mail
48
+
49
+ BART model pre-trained on English language, and fine-tuned on [CNN Daily Mail](https://huggingface.co/datasets/cnn_dailymail). It was introduced in the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Lewis et al. and first released in [this repository (https://github.com/pytorch/fairseq/tree/master/examples/bart).
50
+
51
+ Disclaimer: The team releasing BART did not write a model card for this model so this model card has been written by the Hugging Face team.
52
+
53
+ ## Model description
54
+
55
+ BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. BART is pre-trained by (1) corrupting text with an arbitrary noising function, and (2) learning a model to reconstruct the original text.
56
+
57
+ BART is particularly effective when fine-tuned for text generation (e.g. summarization, translation) but also works well for comprehension tasks (e.g. text classification, question answering). This particular checkpoint has been fine-tuned on CNN Daily Mail, a large collection of text-summary pairs.
58
+
59
+ ## Intended uses & limitations
60
+
61
+ You can use this model for text summarization.
62
+
63
+ ### How to use
64
+
65
+ Here is how to use this model with the [pipeline API](https://huggingface.co/transformers/main_classes/pipelines.html):
66
+
67
+ ```python
68
+ from transformers import pipeline
69
+
70
+ summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
71
+
72
+ ARTICLE = """ New York (CNN)When Liana Barrientos was 23 years old, she got married in Westchester County, New York.
73
+ A year later, she got married again in Westchester County, but to a different man and without divorcing her first husband.
74
+ 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.
75
+ 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.
76
+ 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
77
+ 2010 marriage license application, according to court documents.
78
+ Prosecutors said the marriages were part of an immigration scam.
79
+ On Friday, she pleaded not guilty at State Supreme Court in the Bronx, according to her attorney, Christopher Wright, who declined to comment further.
80
+ 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
81
+ Annette Markowski, a police spokeswoman. In total, Barrientos has been married 10 times, with nine of her marriages occurring between 1999 and 2002.
82
+ 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.
83
+ Prosecutors said the immigration scam involved some of her husbands, who filed for permanent residence status shortly after the marriages.
84
+ Any divorces happened only after such filings were approved. It was unclear whether any of the men will be prosecuted.
85
+ The case was referred to the Bronx District Attorney\'s Office by Immigration and Customs Enforcement and the Department of Homeland Security\'s
86
+ Investigation Division. Seven of the men are from so-called "red-flagged" countries, including Egypt, Turkey, Georgia, Pakistan and Mali.
87
+ Her eighth husband, Rashid Rajput, was deported in 2006 to his native Pakistan after an investigation by the Joint Terrorism Task Force.
88
+ If convicted, Barrientos faces up to four years in prison. Her next court appearance is scheduled for May 18.
89
+ """
90
+ print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
91
+ >>> [{'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.'}]
92
+ ```
93
+
94
+ ### BibTeX entry and citation info
95
+
96
+ ```bibtex
97
+ @article{DBLP:journals/corr/abs-1910-13461,
98
+ author = {Mike Lewis and
99
+ Yinhan Liu and
100
+ Naman Goyal and
101
+ Marjan Ghazvininejad and
102
+ Abdelrahman Mohamed and
103
+ Omer Levy and
104
+ Veselin Stoyanov and
105
+ Luke Zettlemoyer},
106
+ title = {{BART:} Denoising Sequence-to-Sequence Pre-training for Natural Language
107
+ Generation, Translation, and Comprehension},
108
+ journal = {CoRR},
109
+ volume = {abs/1910.13461},
110
+ year = {2019},
111
+ url = {http://arxiv.org/abs/1910.13461},
112
+ eprinttype = {arXiv},
113
+ eprint = {1910.13461},
114
+ timestamp = {Thu, 31 Oct 2019 14:02:26 +0100},
115
+ biburl = {https://dblp.org/rec/journals/corr/abs-1910-13461.bib},
116
+ bibsource = {dblp computer science bibliography, https://dblp.org}
117
+ }
gitattributes.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
2
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.h5 filter=lfs diff=lfs merge=lfs -text
5
+ *.tflite filter=lfs diff=lfs merge=lfs -text
6
+ *.tar.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.ot filter=lfs diff=lfs merge=lfs -text
8
+ *.onnx filter=lfs diff=lfs merge=lfs -text
9
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
vocab.json ADDED
The diff for this file is too large to render. See raw diff