m3hrdadfi commited on
Commit
aa24002
1 Parent(s): faea760

First version of bert2bert-fa-news-headline

Browse files
Files changed (4) hide show
  1. README.md +24 -0
  2. config.json +145 -0
  3. pytorch_model.bin +3 -0
  4. vocab.txt +0 -0
README.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: fa
3
+ license: apache-2.0
4
+ tags:
5
+ - summarization
6
+ ---
7
+
8
+ A Bert2Bert model on VoA Persian Corpus (a medium-sized corpus of 7.9 million words, 2003-2008) generates headlines. The model achieved a 25.30 ROUGE-2 score.
9
+
10
+ For more detail, please follow the [News Headline Generation](https://github.com/m3hrdadfi/news-headline-generation) repo.
11
+
12
+
13
+ ## Eval results
14
+ The following table summarizes the ROUGE scores obtained by the Bert2Bert model.
15
+
16
+ | % | Precision | Recall | FMeasure |
17
+ |:-------:|:---------:|:------:|:--------:|
18
+ | ROUGE-1 | 43.78 | 45.52 | 43.54 |
19
+ | ROUGE-2 | 24.50 | 25.30* | 24.24 |
20
+ | ROUGE-L | 41.20 | 42.22 | 40.76 |
21
+
22
+
23
+ ## Questions?
24
+ Post a Github issue on the [News Headline Generation](https://github.com/hooshvare/news-headline-generation/issues) repo.
config.json ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "EncoderDecoderModel"
4
+ ],
5
+ "decoder": {
6
+ "_name_or_path": "HooshvareLab/bert-fa-base-uncased",
7
+ "add_cross_attention": true,
8
+ "architectures": [
9
+ "BertForMaskedLM"
10
+ ],
11
+ "attention_probs_dropout_prob": 0.1,
12
+ "bad_words_ids": null,
13
+ "bos_token_id": null,
14
+ "chunk_size_feed_forward": 0,
15
+ "decoder_start_token_id": null,
16
+ "do_sample": false,
17
+ "early_stopping": false,
18
+ "eos_token_id": null,
19
+ "finetuning_task": null,
20
+ "gradient_checkpointing": false,
21
+ "hidden_act": "gelu",
22
+ "hidden_dropout_prob": 0.1,
23
+ "hidden_size": 768,
24
+ "id2label": {
25
+ "0": "LABEL_0",
26
+ "1": "LABEL_1"
27
+ },
28
+ "initializer_range": 0.02,
29
+ "intermediate_size": 3072,
30
+ "is_decoder": true,
31
+ "is_encoder_decoder": false,
32
+ "label2id": {
33
+ "LABEL_0": 0,
34
+ "LABEL_1": 1
35
+ },
36
+ "layer_norm_eps": 1e-12,
37
+ "length_penalty": 1.0,
38
+ "max_length": 20,
39
+ "max_position_embeddings": 512,
40
+ "min_length": 0,
41
+ "model_type": "bert",
42
+ "no_repeat_ngram_size": 0,
43
+ "num_attention_heads": 12,
44
+ "num_beams": 1,
45
+ "num_hidden_layers": 12,
46
+ "num_return_sequences": 1,
47
+ "output_attentions": false,
48
+ "output_hidden_states": false,
49
+ "pad_token_id": 0,
50
+ "prefix": null,
51
+ "pruned_heads": {},
52
+ "repetition_penalty": 1.0,
53
+ "return_dict": false,
54
+ "sep_token_id": null,
55
+ "task_specific_params": null,
56
+ "temperature": 1.0,
57
+ "tie_encoder_decoder": false,
58
+ "tie_word_embeddings": true,
59
+ "tokenizer_class": null,
60
+ "top_k": 50,
61
+ "top_p": 1.0,
62
+ "torchscript": false,
63
+ "type_vocab_size": 2,
64
+ "use_bfloat16": false,
65
+ "use_cache": true,
66
+ "vocab_size": 100000,
67
+ "xla_device": null
68
+ },
69
+ "decoder_start_token_id": 2,
70
+ "early_stopping": true,
71
+ "encoder": {
72
+ "_name_or_path": "HooshvareLab/bert-fa-base-uncased",
73
+ "add_cross_attention": false,
74
+ "architectures": [
75
+ "BertForMaskedLM"
76
+ ],
77
+ "attention_probs_dropout_prob": 0.1,
78
+ "bad_words_ids": null,
79
+ "bos_token_id": null,
80
+ "chunk_size_feed_forward": 0,
81
+ "decoder_start_token_id": null,
82
+ "do_sample": false,
83
+ "early_stopping": false,
84
+ "eos_token_id": null,
85
+ "finetuning_task": null,
86
+ "gradient_checkpointing": false,
87
+ "hidden_act": "gelu",
88
+ "hidden_dropout_prob": 0.1,
89
+ "hidden_size": 768,
90
+ "id2label": {
91
+ "0": "LABEL_0",
92
+ "1": "LABEL_1"
93
+ },
94
+ "initializer_range": 0.02,
95
+ "intermediate_size": 3072,
96
+ "is_decoder": false,
97
+ "is_encoder_decoder": false,
98
+ "label2id": {
99
+ "LABEL_0": 0,
100
+ "LABEL_1": 1
101
+ },
102
+ "layer_norm_eps": 1e-12,
103
+ "length_penalty": 1.0,
104
+ "max_length": 20,
105
+ "max_position_embeddings": 512,
106
+ "min_length": 0,
107
+ "model_type": "bert",
108
+ "no_repeat_ngram_size": 0,
109
+ "num_attention_heads": 12,
110
+ "num_beams": 1,
111
+ "num_hidden_layers": 12,
112
+ "num_return_sequences": 1,
113
+ "output_attentions": false,
114
+ "output_hidden_states": false,
115
+ "pad_token_id": 0,
116
+ "prefix": null,
117
+ "pruned_heads": {},
118
+ "repetition_penalty": 1.0,
119
+ "return_dict": false,
120
+ "sep_token_id": null,
121
+ "task_specific_params": null,
122
+ "temperature": 1.0,
123
+ "tie_encoder_decoder": false,
124
+ "tie_word_embeddings": true,
125
+ "tokenizer_class": null,
126
+ "top_k": 50,
127
+ "top_p": 1.0,
128
+ "torchscript": false,
129
+ "type_vocab_size": 2,
130
+ "use_bfloat16": false,
131
+ "use_cache": true,
132
+ "vocab_size": 100000,
133
+ "xla_device": null
134
+ },
135
+ "eos_token_id": 4,
136
+ "is_encoder_decoder": true,
137
+ "length_penalty": 2.0,
138
+ "max_length": 32,
139
+ "min_length": 5,
140
+ "model_type": "encoder-decoder",
141
+ "no_repeat_ngram_size": 3,
142
+ "num_beams": 3,
143
+ "pad_token_id": 0,
144
+ "vocab_size": 100000
145
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76c4ad0427a424efb8b3c8df8499697c61d9bb2be263149150aadc41a12bad2d
3
+ size 1416836998
vocab.txt ADDED
The diff for this file is too large to render. See raw diff