asahi417 commited on
Commit
641961d
1 Parent(s): e7d5a0e

model update

Browse files
README.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: cc-by-4.0
4
+ metrics:
5
+ - bleu4
6
+ - meteor
7
+ - rouge-l
8
+ - bertscore
9
+ - moverscore
10
+ language: fr
11
+ datasets:
12
+ - lmqg/qag_frquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - questions and answers generation
16
+ widget:
17
+ - text: "Créateur » (Maker), lui aussi au singulier, « le Suprême Berger » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc."
18
+ example_title: "Questions & Answers Generation Example 1"
19
+ model-index:
20
+ - name: lmqg/mbart-large-cc25-frquad-qag
21
+ results:
22
+ - task:
23
+ name: Text2text Generation
24
+ type: text2text-generation
25
+ dataset:
26
+ name: lmqg/qag_frquad
27
+ type: default
28
+ args: default
29
+ metrics:
30
+ - name: BLEU4 (Question & Answer Generation)
31
+ type: bleu4_question_answer_generation
32
+ value: 2.33
33
+ - name: ROUGE-L (Question & Answer Generation)
34
+ type: rouge_l_question_answer_generation
35
+ value: 15.28
36
+ - name: METEOR (Question & Answer Generation)
37
+ type: meteor_question_answer_generation
38
+ value: 19.18
39
+ - name: BERTScore (Question & Answer Generation)
40
+ type: bertscore_question_answer_generation
41
+ value: 66.36
42
+ - name: MoverScore (Question & Answer Generation)
43
+ type: moverscore_question_answer_generation
44
+ value: 50.56
45
+ - name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
46
+ type: qa_aligned_f1_score_bertscore_question_answer_generation
47
+ value: 77.75
48
+ - name: QAAlignedRecall-BERTScore (Question & Answer Generation)
49
+ type: qa_aligned_recall_bertscore_question_answer_generation
50
+ value: 79.45
51
+ - name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
52
+ type: qa_aligned_precision_bertscore_question_answer_generation
53
+ value: 76.19
54
+ - name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
55
+ type: qa_aligned_f1_score_moverscore_question_answer_generation
56
+ value: 53.5
57
+ - name: QAAlignedRecall-MoverScore (Question & Answer Generation)
58
+ type: qa_aligned_recall_moverscore_question_answer_generation
59
+ value: 54.55
60
+ - name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
61
+ type: qa_aligned_precision_moverscore_question_answer_generation
62
+ value: 52.57
63
+ ---
64
+
65
+ # Model Card of `lmqg/mbart-large-cc25-frquad-qag`
66
+ This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25) for question & answer pair generation task on the [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
67
+
68
+
69
+ ### Overview
70
+ - **Language model:** [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25)
71
+ - **Language:** fr
72
+ - **Training data:** [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) (default)
73
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
74
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
75
+ - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
76
+
77
+ ### Usage
78
+ - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
79
+ ```python
80
+ from lmqg import TransformersQG
81
+
82
+ # initialize model
83
+ model = TransformersQG(language="fr", model="lmqg/mbart-large-cc25-frquad-qag")
84
+
85
+ # model prediction
86
+ question_answer_pairs = model.generate_qa("Créateur » (Maker), lui aussi au singulier, « le Suprême Berger » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.")
87
+
88
+ ```
89
+
90
+ - With `transformers`
91
+ ```python
92
+ from transformers import pipeline
93
+
94
+ pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-frquad-qag")
95
+ output = pipe("Créateur » (Maker), lui aussi au singulier, « le Suprême Berger » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.")
96
+
97
+ ```
98
+
99
+ ## Evaluation
100
+
101
+
102
+ - ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qag/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_frquad.default.json)
103
+
104
+ | | Score | Type | Dataset |
105
+ |:--------------------------------|--------:|:--------|:-------------------------------------------------------------------|
106
+ | BERTScore | 66.36 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
107
+ | Bleu_1 | 9.92 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
108
+ | Bleu_2 | 5.52 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
109
+ | Bleu_3 | 3.47 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
110
+ | Bleu_4 | 2.33 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
111
+ | METEOR | 19.18 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
112
+ | MoverScore | 50.56 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
113
+ | QAAlignedF1Score (BERTScore) | 77.75 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
114
+ | QAAlignedF1Score (MoverScore) | 53.5 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
115
+ | QAAlignedPrecision (BERTScore) | 76.19 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
116
+ | QAAlignedPrecision (MoverScore) | 52.57 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
117
+ | QAAlignedRecall (BERTScore) | 79.45 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
118
+ | QAAlignedRecall (MoverScore) | 54.55 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
119
+ | ROUGE_L | 15.28 | default | [lmqg/qag_frquad](https://huggingface.co/datasets/lmqg/qag_frquad) |
120
+
121
+
122
+
123
+ ## Training hyperparameters
124
+
125
+ The following hyperparameters were used during fine-tuning:
126
+ - dataset_path: lmqg/qag_frquad
127
+ - dataset_name: default
128
+ - input_types: ['paragraph']
129
+ - output_types: ['questions_answers']
130
+ - prefix_types: None
131
+ - model: facebook/mbart-large-cc25
132
+ - max_length: 512
133
+ - max_length_output: 256
134
+ - epoch: 14
135
+ - batch: 2
136
+ - lr: 0.0001
137
+ - fp16: False
138
+ - random_seed: 1
139
+ - gradient_accumulation_steps: 64
140
+ - label_smoothing: 0.0
141
+
142
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qag/raw/main/trainer_config.json).
143
+
144
+ ## Citation
145
+ ```
146
+ @inproceedings{ushio-etal-2022-generative,
147
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
148
+ author = "Ushio, Asahi and
149
+ Alva-Manchego, Fernando and
150
+ Camacho-Collados, Jose",
151
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
152
+ month = dec,
153
+ year = "2022",
154
+ address = "Abu Dhabi, U.A.E.",
155
+ publisher = "Association for Computational Linguistics",
156
+ }
157
+
158
+ ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "lmqg_output/mbart-large-cc25-frquad-qag/best_model",
3
  "_num_labels": 3,
4
  "activation_dropout": 0.0,
5
  "activation_function": "gelu",
 
1
  {
2
+ "_name_or_path": "lmqg_output/mbart-large-cc25-frquad-qag/model_hrqcsz/epoch_5",
3
  "_num_labels": 3,
4
  "activation_dropout": 0.0,
5
  "activation_function": "gelu",
eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_frquad.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.280484007295694, "Bleu_2": 0.17016920349675446, "Bleu_3": 0.10850214395213244, "Bleu_4": 0.07675767048310689, "METEOR": 0.23512622929759355, "ROUGE_L": 0.2407060201716333, "BERTScore": 0.7393606378852079, "MoverScore": 0.5307557710097831, "QAAlignedF1Score (BERTScore)": 0.7959976183698224, "QAAlignedRecall (BERTScore)": 0.7894592275650848, "QAAlignedPrecision (BERTScore)": 0.8035495311526271, "QAAlignedF1Score (MoverScore)": 0.5523084353530766, "QAAlignedRecall (MoverScore)": 0.5449440659460966, "QAAlignedPrecision (MoverScore)": 0.5604759809142831}, "test": {"Bleu_1": 0.0992479700187378, "Bleu_2": 0.055163278694192554, "Bleu_3": 0.03474471559535957, "Bleu_4": 0.02331968844548859, "METEOR": 0.19184708809287473, "ROUGE_L": 0.15278468971081488, "BERTScore": 0.6636021556645595, "MoverScore": 0.5055571079148972, "QAAlignedF1Score (BERTScore)": 0.7775349659485863, "QAAlignedRecall (BERTScore)": 0.7944941795788644, "QAAlignedPrecision (BERTScore)": 0.7619403121714198, "QAAlignedF1Score (MoverScore)": 0.5350198819600969, "QAAlignedRecall (MoverScore)": 0.5454870926150593, "QAAlignedPrecision (MoverScore)": 0.5256663345681905}}
eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_frquad.default.txt ADDED
The diff for this file is too large to render. See raw diff
 
eval/samples.validation.hyp.paragraph.questions_answers.lmqg_qag_frquad.default.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:28b9e340281f4ef9138e3085eeff61ae36d67920ea07688b19a8d2a7d794e3d6
3
- size 2444580125
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d73e13bd8243c124302a1010460c21ae195e2079fcd84110b06ab9873a417bb2
3
+ size 2444587421
tokenizer_config.json CHANGED
@@ -12,7 +12,7 @@
12
  "single_word": false
13
  },
14
  "model_max_length": 1024,
15
- "name_or_path": "lmqg_output/mbart-large-cc25-frquad-qag/best_model",
16
  "pad_token": "<pad>",
17
  "sep_token": "</s>",
18
  "special_tokens_map_file": null,
 
12
  "single_word": false
13
  },
14
  "model_max_length": 1024,
15
+ "name_or_path": "lmqg_output/mbart-large-cc25-frquad-qag/model_hrqcsz/epoch_5",
16
  "pad_token": "<pad>",
17
  "sep_token": "</s>",
18
  "special_tokens_map_file": null,
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset_path": "lmqg/qag_frquad", "dataset_name": "default", "input_types": ["paragraph"], "output_types": ["questions_answers"], "prefix_types": null, "model": "facebook/mbart-large-cc25", "max_length": 512, "max_length_output": 256, "epoch": 14, "batch": 2, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 64, "label_smoothing": 0.0}