Bisht0538 commited on
Commit
b514b18
1 Parent(s): 48ce78e

Upload 6 files

Browse files
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
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "decoder_start_token_id": 2,
5
+ "early_stopping": true,
6
+ "eos_token_id": 2,
7
+ "forced_bos_token_id": 0,
8
+ "forced_eos_token_id": 2,
9
+ "length_penalty": 2.0,
10
+ "max_length": 142,
11
+ "min_length": 56,
12
+ "no_repeat_ngram_size": 3,
13
+ "num_beams": 4,
14
+ "pad_token_id": 1,
15
+ "transformers_version": "4.27.0.dev0"
16
+ }
generation_config_for_summarization.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "decoder_start_token_id": 2,
5
+ "early_stopping": true,
6
+ "eos_token_id": 2,
7
+ "forced_bos_token_id": 0,
8
+ "forced_eos_token_id": 2,
9
+ "length_penalty": 2.0,
10
+ "max_length": 142,
11
+ "min_length": 56,
12
+ "no_repeat_ngram_size": 3,
13
+ "num_beams": 4,
14
+ "pad_token_id": 1,
15
+ "transformers_version": "4.27.0.dev0"
16
+ }
gitattributes-2.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
gitattributes.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
merges.txt ADDED
The diff for this file is too large to render. See raw diff