asahi417 commited on
Commit
c3796f8
1 Parent(s): 2012b16

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: ja
11
+ datasets:
12
+ - lmqg/qag_jaquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - questions and answers generation
16
+ widget:
17
+ - text: "ゾフィーは貴族出身ではあったが王族出身ではなく、ハプスブルク家の皇位継承者であるフランツ・フェルディナントとの結婚は貴賤結婚となった。皇帝フランツ・ヨーゼフは、2人の間に生まれた子孫が皇位を継がないことを条件として結婚を承認していた。視察が予定されている6月28日は2人の14回目の結婚記念日であった。"
18
+ example_title: "Questions & Answers Generation Example 1"
19
+ model-index:
20
+ - name: lmqg/mbart-large-cc25-jaquad-qag
21
+ results:
22
+ - task:
23
+ name: Text2text Generation
24
+ type: text2text-generation
25
+ dataset:
26
+ name: lmqg/qag_jaquad
27
+ type: default
28
+ args: default
29
+ metrics:
30
+ - name: BLEU4 (Question & Answer Generation)
31
+ type: bleu4_question_answer_generation
32
+ value: 11.63
33
+ - name: ROUGE-L (Question & Answer Generation)
34
+ type: rouge_l_question_answer_generation
35
+ value: 32.09
36
+ - name: METEOR (Question & Answer Generation)
37
+ type: meteor_question_answer_generation
38
+ value: 24.5
39
+ - name: BERTScore (Question & Answer Generation)
40
+ type: bertscore_question_answer_generation
41
+ value: 68.71
42
+ - name: MoverScore (Question & Answer Generation)
43
+ type: moverscore_question_answer_generation
44
+ value: 52.42
45
+ - name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
46
+ type: qa_aligned_f1_score_bertscore_question_answer_generation
47
+ value: 72.68
48
+ - name: QAAlignedRecall-BERTScore (Question & Answer Generation)
49
+ type: qa_aligned_recall_bertscore_question_answer_generation
50
+ value: 73.79
51
+ - name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
52
+ type: qa_aligned_precision_bertscore_question_answer_generation
53
+ value: 71.67
54
+ - name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
55
+ type: qa_aligned_f1_score_moverscore_question_answer_generation
56
+ value: 51.93
57
+ - name: QAAlignedRecall-MoverScore (Question & Answer Generation)
58
+ type: qa_aligned_recall_moverscore_question_answer_generation
59
+ value: 52.62
60
+ - name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
61
+ type: qa_aligned_precision_moverscore_question_answer_generation
62
+ value: 51.31
63
+ ---
64
+
65
+ # Model Card of `lmqg/mbart-large-cc25-jaquad-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_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) (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:** ja
72
+ - **Training data:** [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) (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="ja", model="lmqg/mbart-large-cc25-jaquad-qag")
84
+
85
+ # model prediction
86
+ question_answer_pairs = model.generate_qa("フェルメールの作品では、17世紀のオランダの画家、ヨハネス・フェルメールの作品について記述する。フェルメールの作品は、疑問作も含め30数点しか現存しない。現存作品はすべて油彩画で、版画、下絵、素描などは残っていない。")
87
+
88
+ ```
89
+
90
+ - With `transformers`
91
+ ```python
92
+ from transformers import pipeline
93
+
94
+ pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-jaquad-qag")
95
+ output = pipe("ゾフィーは貴族出身ではあったが王族出身ではなく、ハプスブルク家の皇位継承者であるフランツ・フェルディナントとの結婚は貴賤結婚となった。皇帝フランツ・ヨーゼフは、2人の間に生まれた子孫が皇位を継がないことを条件として結婚を承認していた。視察が予定されている6月28日は2人の14回目の結婚記念日であった。")
96
+
97
+ ```
98
+
99
+ ## Evaluation
100
+
101
+
102
+ - ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-jaquad-qag/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_jaquad.default.json)
103
+
104
+ | | Score | Type | Dataset |
105
+ |:--------------------------------|--------:|:--------|:-------------------------------------------------------------------|
106
+ | BERTScore | 68.71 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
107
+ | Bleu_1 | 24.36 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
108
+ | Bleu_2 | 18.51 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
109
+ | Bleu_3 | 14.55 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
110
+ | Bleu_4 | 11.63 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
111
+ | METEOR | 24.5 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
112
+ | MoverScore | 52.42 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
113
+ | QAAlignedF1Score (BERTScore) | 72.68 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
114
+ | QAAlignedF1Score (MoverScore) | 51.93 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
115
+ | QAAlignedPrecision (BERTScore) | 71.67 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
116
+ | QAAlignedPrecision (MoverScore) | 51.31 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
117
+ | QAAlignedRecall (BERTScore) | 73.79 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
118
+ | QAAlignedRecall (MoverScore) | 52.62 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
119
+ | ROUGE_L | 32.09 | default | [lmqg/qag_jaquad](https://huggingface.co/datasets/lmqg/qag_jaquad) |
120
+
121
+
122
+
123
+ ## Training hyperparameters
124
+
125
+ The following hyperparameters were used during fine-tuning:
126
+ - dataset_path: lmqg/qag_jaquad
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: 11
135
+ - batch: 8
136
+ - lr: 0.0001
137
+ - fp16: False
138
+ - random_seed: 1
139
+ - gradient_accumulation_steps: 8
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-jaquad-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-jaquad-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-jaquad-qag/model_ydlknu/epoch_5",
3
  "_num_labels": 3,
4
  "activation_dropout": 0.0,
5
  "activation_function": "gelu",
eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_jaquad.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.442425707446017, "Bleu_2": 0.34062893462177907, "Bleu_3": 0.27324593851993145, "Bleu_4": 0.22277827358204308, "METEOR": 0.25514187814910827, "ROUGE_L": 0.353652061262317, "BERTScore": 0.7325376251375317, "MoverScore": 0.5409912970264227, "QAAlignedF1Score (BERTScore)": 0.7306552396522141, "QAAlignedRecall (BERTScore)": 0.7272063496921992, "QAAlignedPrecision (BERTScore)": 0.7349615001495196, "QAAlignedF1Score (MoverScore)": 0.5246417485149184, "QAAlignedRecall (MoverScore)": 0.520391255222933, "QAAlignedPrecision (MoverScore)": 0.5297114583004668}, "test": {"Bleu_1": 0.24361536503944461, "Bleu_2": 0.18514842538799742, "Bleu_3": 0.1454816801738468, "Bleu_4": 0.11625217922996045, "METEOR": 0.24501471846078107, "ROUGE_L": 0.3208797270874647, "BERTScore": 0.6871284615211799, "MoverScore": 0.5242115426392946, "QAAlignedF1Score (BERTScore)": 0.7268055902636072, "QAAlignedRecall (BERTScore)": 0.7379401674085392, "QAAlignedPrecision (BERTScore)": 0.7166540428393525, "QAAlignedF1Score (MoverScore)": 0.519264226027171, "QAAlignedRecall (MoverScore)": 0.5262232772896484, "QAAlignedPrecision (MoverScore)": 0.513072398320057}}
eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_jaquad.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_jaquad.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:29dcde17764c861f128d4ec78203885261a9bf799fdbca73b2c080ad06625ad1
3
- size 2444576505
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08cff8bffe4bdd68339cae554bef4b6265cfbb46895f1240a7eb70d2eed1e466
3
+ size 2444583801
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-jaquad-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-jaquad-qag/model_ydlknu/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_jaquad", "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": 11, "batch": 8, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 8, "label_smoothing": 0.0}