vipin22 commited on
Commit
193b264
1 Parent(s): 958ca8d

Upload 6 files

Browse files
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - summarization
5
+ ---
6
+
7
+ ### Pegasus Models
8
+ See Docs: [here](https://huggingface.co/transformers/master/model_doc/pegasus.html)
9
+
10
+ Original TF 1 code [here](https://github.com/google-research/pegasus)
11
+
12
+ Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019
13
+
14
+ Maintained by: [@sshleifer](https://twitter.com/sam_shleifer)
15
+
16
+ Task: Summarization
17
+
18
+ The following is copied from the authors' README.
19
+
20
+ # Mixed & Stochastic Checkpoints
21
+
22
+ We train a pegasus model with sampled gap sentence ratios on both C4 and HugeNews, and stochastically sample important sentences. The updated the results are reported in this table.
23
+
24
+ | dataset | C4 | HugeNews | Mixed & Stochastic|
25
+ | ---- | ---- | ---- | ----|
26
+ | xsum | 45.20/22.06/36.99 | 47.21/24.56/39.25 | 47.60/24.83/39.64|
27
+ | cnn_dailymail | 43.90/21.20/40.76 | 44.17/21.47/41.11 | 44.16/21.56/41.30|
28
+ | newsroom | 45.07/33.39/41.28 | 45.15/33.51/41.33 | 45.98/34.20/42.18|
29
+ | multi_news | 46.74/17.95/24.26 | 47.52/18.72/24.91 | 47.65/18.75/24.95|
30
+ | gigaword | 38.75/19.96/36.14 | 39.12/19.86/36.24 | 39.65/20.47/36.76|
31
+ | wikihow | 43.07/19.70/34.79 | 41.35/18.51/33.42 | 46.39/22.12/38.41 *|
32
+ | reddit_tifu | 26.54/8.94/21.64 | 26.63/9.01/21.60 | 27.99/9.81/22.94|
33
+ | big_patent | 53.63/33.16/42.25 | 53.41/32.89/42.07 | 52.29/33.08/41.66 *|
34
+ | arxiv | 44.70/17.27/25.80 | 44.67/17.18/25.73 | 44.21/16.95/25.67|
35
+ | pubmed | 45.49/19.90/27.69 | 45.09/19.56/27.42 | 45.97/20.15/28.25|
36
+ | aeslc | 37.69/21.85/36.84 | 37.40/21.22/36.45 | 37.68/21.25/36.51|
37
+ | billsum | 57.20/39.56/45.80 | 57.31/40.19/45.82 | 59.67/41.58/47.59|
38
+
39
+ The "Mixed & Stochastic" model has the following changes:
40
+ - trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples).
41
+ - trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity).
42
+ - the model uniformly sample a gap sentence ratio between 15% and 45%.
43
+ - importance sentences are sampled using a 20% uniform noise to importance scores.
44
+ - the sentencepiece tokenizer is updated to be able to encode newline character.
45
+
46
+
47
+ (*) the numbers of wikihow and big_patent datasets are not comparable because of change in tokenization and data:
48
+ - wikihow dataset contains newline characters which is useful for paragraph segmentation, the C4 and HugeNews model's sentencepiece tokenizer doesn't encode newline and loose this information.
49
+ - we update the BigPatent dataset to preserve casing, some format cleanings are also changed, please refer to change in TFDS.
50
+
51
+
52
+ The "Mixed & Stochastic" model has the following changes (from pegasus-large in the paper):
53
+
54
+
55
+ trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples).
56
+ trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity).
57
+ the model uniformly sample a gap sentence ratio between 15% and 45%.
58
+ importance sentences are sampled using a 20% uniform noise to importance scores.
59
+ the sentencepiece tokenizer is updated to be able to encode newline character.
60
+
61
+
62
+ Citation
63
+ ```
64
+
65
+
66
+ @misc{zhang2019pegasus,
67
+ title={PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization},
68
+ author={Jingqing Zhang and Yao Zhao and Mohammad Saleh and Peter J. Liu},
69
+ year={2019},
70
+ eprint={1912.08777},
71
+ archivePrefix={arXiv},
72
+ primaryClass={cs.CL}
73
+ }
74
+ ```
config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dropout": 0.1,
3
+ "activation_function": "relu",
4
+ "add_bias_logits": false,
5
+ "add_final_layer_norm": true,
6
+ "architectures": [
7
+ "PegasusForConditionalGeneration"
8
+ ],
9
+ "attention_dropout": 0.1,
10
+ "bos_token_id": 0,
11
+ "classif_dropout": 0.0,
12
+ "d_model": 1024,
13
+ "decoder_attention_heads": 16,
14
+ "decoder_ffn_dim": 4096,
15
+ "decoder_layerdrop": 0.0,
16
+ "decoder_layers": 16,
17
+ "dropout": 0.1,
18
+ "encoder_attention_heads": 16,
19
+ "encoder_ffn_dim": 4096,
20
+ "encoder_layerdrop": 0.0,
21
+ "encoder_layers": 16,
22
+ "eos_token_id": 1,
23
+ "extra_pos_embeddings": 1,
24
+ "id2label": {
25
+ "0": "LABEL_0",
26
+ "1": "LABEL_1",
27
+ "2": "LABEL_2"
28
+ },
29
+ "init_std": 0.02,
30
+ "is_encoder_decoder": true,
31
+ "label2id": {
32
+ "LABEL_0": 0,
33
+ "LABEL_1": 1,
34
+ "LABEL_2": 2
35
+ },
36
+ "length_penalty": 0.8,
37
+ "max_length": 128,
38
+ "max_position_embeddings": 1024,
39
+ "min_length": 32,
40
+ "model_type": "pegasus",
41
+ "normalize_before": true,
42
+ "normalize_embedding": false,
43
+ "num_beams": 8,
44
+ "num_hidden_layers": 16,
45
+ "pad_token_id": 0,
46
+ "scale_embedding": true,
47
+ "static_position_embeddings": true,
48
+ "vocab_size": 96103
49
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "decoder_start_token_id": 0,
5
+ "eos_token_id": 1,
6
+ "forced_eos_token_id": 1,
7
+ "length_penalty": 0.8,
8
+ "max_length": 128,
9
+ "min_length": 32,
10
+ "num_beams": 8,
11
+ "pad_token_id": 0,
12
+ "transformers_version": "4.27.0.dev0"
13
+ }
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0015189ef36359283fec8b93cf6d9ce51bca37eb1101defc68a53b394913b96c
3
+ size 1912529
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"model_max_length": 1024, "special_tokens_map_file": null, "full_tokenizer_file": null}