model update
Browse files- README.md +144 -0
- config.json +1 -1
- eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_jaquad.default.json +1 -0
- eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_jaquad.default.txt +0 -0
- eval/samples.validation.hyp.paragraph_sentence.answer.lmqg_qg_jaquad.default.txt +0 -0
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
- trainer_config.json +1 -0
README.md
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/qg_jaquad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- answer extraction
|
16 |
+
widget:
|
17 |
+
- text: "『クマのプーさん』の物語はまず1925年12月24日、『イヴニング・ニュース』紙のクリスマス特集号に短編作品として掲載された。これは『クマのプーさん』の第一章にあたる作品で、このときだけは挿絵をJ.H.ダウドがつけている。その後作品10話と挿絵が整い、刊行に先駆けて「イーヨーの誕生日」のエピソードが1926年8月に『ロイヤルマガジン』に、同年10月9日に『ニューヨーク・イヴニング・ポスト』紙に掲載されたあと、同年10月14日にロンドンで(メシュエン社)、21日にニューヨークで(ダットン社)『クマのプーさん』が刊行された。<hl>前著『ぼくたちがとてもちいさかったころ』がすでに大きな成功を収めていたこともあり、イギリスでは初版は前著の7倍に当たる3万5000部が刷られた。<hl>他方のアメリカでもその年の終わりまでに15万部を売り上げている。ただし依然として人気のあった前著を売り上げで追い越すには数年の時間を要した。"
|
18 |
+
example_title: "Answering Extraction Example 1"
|
19 |
+
- text: "フェルメールの作品では、17世紀のオランダの画家、ヨハネス・フェルメールの作品について記述する。フェルメールの作品は、疑問作も含め30数点しか現存しない。<hl>現存作品はすべて油彩画で、版画、下絵、素描などは残っていない。以下には若干の疑問作も含め、37点の基本情報を記載し、各作品について略説する。<hl>収録順序、推定制作年代は『「フェルメールとその時代展」図録』による。日本語の作品タイトルについては、上掲図録のほか、『「フェルメール展」図録』、『フェルメール生涯と作品』による。便宜上「1650年代の作品」「1660年代の作品」「1670年代の作品」の3つの節を設けたが、フェルメールの作品には制作年代不明のものが多く、推定制作年代については研究者や文献によって若干の差がある。"
|
20 |
+
example_title: "Answering Extraction Example 2"
|
21 |
+
model-index:
|
22 |
+
- name: lmqg/mbart-large-cc25-jaquad-ae
|
23 |
+
results:
|
24 |
+
- task:
|
25 |
+
name: Text2text Generation
|
26 |
+
type: text2text-generation
|
27 |
+
dataset:
|
28 |
+
name: lmqg/qg_jaquad
|
29 |
+
type: default
|
30 |
+
args: default
|
31 |
+
metrics:
|
32 |
+
- name: BLEU4 (Answer Extraction)
|
33 |
+
type: bleu4_answer_extraction
|
34 |
+
value: 2.39
|
35 |
+
- name: ROUGE-L (Answer Extraction)
|
36 |
+
type: rouge_l_answer_extraction
|
37 |
+
value: 23.17
|
38 |
+
- name: METEOR (Answer Extraction)
|
39 |
+
type: meteor_answer_extraction
|
40 |
+
value: 12.34
|
41 |
+
- name: BERTScore (Answer Extraction)
|
42 |
+
type: bertscore_answer_extraction
|
43 |
+
value: 67.03
|
44 |
+
- name: MoverScore (Answer Extraction)
|
45 |
+
type: moverscore_answer_extraction
|
46 |
+
value: 57.51
|
47 |
+
- name: AnswerF1Score (Answer Extraction)
|
48 |
+
type: answer_f1_score__answer_extraction
|
49 |
+
value: 16.04
|
50 |
+
- name: AnswerExactMatch (Answer Extraction)
|
51 |
+
type: answer_exact_match_answer_extraction
|
52 |
+
value: 16.02
|
53 |
+
---
|
54 |
+
|
55 |
+
# Model Card of `lmqg/mbart-large-cc25-jaquad-ae`
|
56 |
+
This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25) for answer extraction on the [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
57 |
+
|
58 |
+
|
59 |
+
### Overview
|
60 |
+
- **Language model:** [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25)
|
61 |
+
- **Language:** ja
|
62 |
+
- **Training data:** [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (default)
|
63 |
+
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
64 |
+
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
65 |
+
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
|
66 |
+
|
67 |
+
### Usage
|
68 |
+
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
69 |
+
```python
|
70 |
+
from lmqg import TransformersQG
|
71 |
+
|
72 |
+
# initialize model
|
73 |
+
model = TransformersQG(language="ja", model="lmqg/mbart-large-cc25-jaquad-ae")
|
74 |
+
|
75 |
+
# model prediction
|
76 |
+
answers = model.generate_a("フェルメールの作品では、17世紀のオランダの画家、ヨハネス・フェルメールの作品について記述する。フェルメールの作品は、疑問作も含め30数点しか現存しない。現存作品はすべて油彩画で、版画、下絵、素描などは残っていない。")
|
77 |
+
|
78 |
+
```
|
79 |
+
|
80 |
+
- With `transformers`
|
81 |
+
```python
|
82 |
+
from transformers import pipeline
|
83 |
+
|
84 |
+
pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-jaquad-ae")
|
85 |
+
output = pipe("『クマのプーさん』の物語はまず1925年12月24日、『イヴニング・ニュース』紙のクリスマス特集号に短編作品として掲載された。これは『クマのプーさん』の第一章にあたる作品で、このときだけは挿絵をJ.H.ダウドがつけている。その後作品10話と挿絵が整い、刊行に先駆けて「イーヨーの誕生日」のエピソードが1926年8月に『ロイヤルマガジン』に、同年10月9日に『ニューヨーク・イヴニング・ポスト』紙に掲載されたあと、同年10月14日にロンドンで(メシュエン社)、21日にニューヨークで(ダットン社)『クマのプーさん』が刊行された。<hl>前著『ぼくたちがとてもちいさかったころ』がすでに大きな成功を収めていたこともあり、イギリスでは初版は前著の7倍に当たる3万5000部が刷られた。<hl>他方のアメリカでもその年の終わりまでに15万部を売り上げている。ただし依然として人気のあった前著を売り上げで追い越すには数年の時間を要した。")
|
86 |
+
|
87 |
+
```
|
88 |
+
|
89 |
+
## Evaluation
|
90 |
+
|
91 |
+
|
92 |
+
- ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-jaquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_jaquad.default.json)
|
93 |
+
|
94 |
+
| | Score | Type | Dataset |
|
95 |
+
|:-----------------|--------:|:--------|:-----------------------------------------------------------------|
|
96 |
+
| AnswerExactMatch | 16.02 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
97 |
+
| AnswerF1Score | 16.04 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
98 |
+
| BERTScore | 67.03 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
99 |
+
| Bleu_1 | 5.76 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
100 |
+
| Bleu_2 | 4.37 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
101 |
+
| Bleu_3 | 3.23 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
102 |
+
| Bleu_4 | 2.39 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
103 |
+
| METEOR | 12.34 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
104 |
+
| MoverScore | 57.51 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
105 |
+
| ROUGE_L | 23.17 | default | [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) |
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
## Training hyperparameters
|
110 |
+
|
111 |
+
The following hyperparameters were used during fine-tuning:
|
112 |
+
- dataset_path: lmqg/qg_jaquad
|
113 |
+
- dataset_name: default
|
114 |
+
- input_types: ['paragraph_sentence']
|
115 |
+
- output_types: ['answer']
|
116 |
+
- prefix_types: None
|
117 |
+
- model: facebook/mbart-large-cc25
|
118 |
+
- max_length: 512
|
119 |
+
- max_length_output: 32
|
120 |
+
- epoch: 3
|
121 |
+
- batch: 8
|
122 |
+
- lr: 0.0001
|
123 |
+
- fp16: False
|
124 |
+
- random_seed: 1
|
125 |
+
- gradient_accumulation_steps: 8
|
126 |
+
- label_smoothing: 0.15
|
127 |
+
|
128 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-jaquad-ae/raw/main/trainer_config.json).
|
129 |
+
|
130 |
+
## Citation
|
131 |
+
```
|
132 |
+
@inproceedings{ushio-etal-2022-generative,
|
133 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
134 |
+
author = "Ushio, Asahi and
|
135 |
+
Alva-Manchego, Fernando and
|
136 |
+
Camacho-Collados, Jose",
|
137 |
+
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
138 |
+
month = dec,
|
139 |
+
year = "2022",
|
140 |
+
address = "Abu Dhabi, U.A.E.",
|
141 |
+
publisher = "Association for Computational Linguistics",
|
142 |
+
}
|
143 |
+
|
144 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"_num_labels": 3,
|
4 |
"activation_dropout": 0.0,
|
5 |
"activation_function": "gelu",
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "facebook/mbart-large-cc25",
|
3 |
"_num_labels": 3,
|
4 |
"activation_dropout": 0.0,
|
5 |
"activation_function": "gelu",
|
eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_jaquad.default.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"validation": {"Bleu_1": 0.05645643703619782, "Bleu_2": 0.04276430017361574, "Bleu_3": 0.03134736294419188, "Bleu_4": 0.023271480568021204, "METEOR": 0.12423764908049521, "ROUGE_L": 0.24467888483055625, "BERTScore": 0.6710727007959845, "MoverScore": 0.57632179324568, "AnswerF1Score": 16.18007954641618, "AnswerExactMatch": 16.146230007616147}, "test": {"Bleu_1": 0.05755421008166613, "Bleu_2": 0.04368135514995844, "Bleu_3": 0.03234749894592613, "Bleu_4": 0.023932876965477048, "METEOR": 0.12340099942978819, "ROUGE_L": 0.23168939521160928, "BERTScore": 0.6702997785408686, "MoverScore": 0.5751427530712213, "AnswerF1Score": 16.03621900651604, "AnswerExactMatch": 16.019294237116018}}
|
eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_jaquad.default.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
eval/samples.validation.hyp.paragraph_sentence.answer.lmqg_qg_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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db1e444bddbcf8de60134bd46b289674218d0af0bf914984b4489ac3c75f74e1
|
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": "
|
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": "facebook/mbart-large-cc25",
|
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/qg_jaquad", "dataset_name": "default", "input_types": ["paragraph_sentence"], "output_types": ["answer"], "prefix_types": null, "model": "facebook/mbart-large-cc25", "max_length": 512, "max_length_output": 32, "epoch": 3, "batch": 8, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 8, "label_smoothing": 0.15}
|